Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response examples do not show request body #28

Closed
mnich0ls opened this issue May 7, 2020 · 6 comments
Closed

Response examples do not show request body #28

mnich0ls opened this issue May 7, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@mnich0ls
Copy link
Contributor

mnich0ls commented May 7, 2020

First off, this is a great little tool. I love it!

The "examples" for a request do not include the request body for each response example. I see how I can work around it by creating a new top-level request for each example, but it seems to clutter the interface in Postman by having to create a lot of requests for each API, rather than using the examples concept that seems to solve that problem quite nicely. I'm happy to reorganize my requests and APIs, but I'm curious if there's a way to have an optional flag to also include the request body for each example?

My API folders and routes in Postman:
image

An example request/response in Postman:
image

The resulting markdown without the request body:
image

Thanks!

@thedevsaddam
Copy link
Owner

Assuming you are talking about including the request body.

The documentation should add the request body. Please check the input JSON file.

Input:

Screenshot 2020-05-07 10 31 09

Markdown documentation:

Screenshot 2020-05-07 10 31 59

HTML documentation:

Screenshot 2020-05-07 10 31 26

Unfortunately, I could not simulate the response, but it will work fine.

Docgen version: v2.3
Support postman collection version > 2.1

Thanks for the appreciation!

@mnich0ls
Copy link
Contributor Author

mnich0ls commented May 7, 2020

I believe what you demonstrated is that the request body is shown for the “main” request, but they are not shown for the “examples” for the request. I can send more screen shots later this morning when I’m at my computer, if that helps.

I also need to get more familiar with better ways of organizing my collection. I’m using Postman “requests” to define specific routes of my API, rather than define many requests with different examples for the same route, if that makes sense..

@mnich0ls
Copy link
Contributor Author

mnich0ls commented May 7, 2020

The examples for a request:
image
image

Examples show up in the documentation as "responses" not as "examples" as they're named in Postman.

@thedevsaddam thedevsaddam added the enhancement New feature or request label May 10, 2020
@thedevsaddam thedevsaddam self-assigned this May 10, 2020
@thedevsaddam
Copy link
Owner

Please use the latest v3.0.0-rc

curl https://raw.githubusercontent.com/thedevsaddam/docgen/v3/install.sh -o install.sh && sudo chmod +x install.sh && sudo ./install.sh

Don't forget to provide feedback and close the opened issue.

@mnich0ls
Copy link
Contributor Author

I will try this today. Thank you!

@mnich0ls
Copy link
Contributor Author

This is great @thedevsaddam. I have some other suggestions, but I will put them in a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants