OpenAPITools / OpenAPITools/openapi-generator

[REQ] Generate response skeletons too when generating a postman collection (Only generating requests but no responses)

Open
#17,163 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

When generating a postman collection json from the CLI using a docker image, it generates all requests and folders, but does not generate responses as it does when you import the swagger/openapi into the postman desktop or web application.
For me, and surely for other people, this is very useful when creating API mocks as the collection contains the skeleton of the responses and the data types

Describe the solution you'd like

I would like that when generating the postman collection it would be as complete as when importing it into the postman application, and that not only the requests but also the responses would be generated

Describe alternatives you've considered

I am not sure if there are alternatives as the problem is the lack of richness of the generated document

Additional context

Screenshot of a postman collection created by importing the swagger file into the postman desktop app
(You can see how the request contains examples of the responses)
image

Screenshot of a postman collection generated with openapi-generator using the following command:
docker run --rm -v C:/openapigenerator:/etc/ openapitools/openapi-generator-cli generate -i /etc/swagger-petstore.yaml -g postman-collection -o /etc/out/postman
(Only contains the request)
image

Thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CLI postman-collection generation entry point used by the Docker command and inspect the output produced from swagger-petstore.yaml. Compare it with a collection imported into Postman; done means generated requests also contain response skeletons and data types.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postman
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.