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

Generate json raw based on swagger definition #1885

Open
matthieugeerebaert opened this issue Mar 18, 2016 · 19 comments
Open

Generate json raw based on swagger definition #1885

matthieugeerebaert opened this issue Mar 18, 2016 · 19 comments

Comments

@matthieugeerebaert
Copy link

As soap-ui does for soap ws

@czardoz
Copy link

czardoz commented Mar 18, 2016

@Treabereeg We use this module to convert Swagger to Postman collections: https://github.com/postmanlabs/swagger2-to-postman

For sample usage, see the tests: https://github.com/postmanlabs/swagger2-to-postman/blob/b28db9cf42a95456a658e40046ffa88bd5db4b75/test/converter-spec.js

@matthieugeerebaert
Copy link
Author

I meant body request generation, inside a generated collection :) I imported swagger and the code snippet generator doesn't generate json example value. Swagger ui does.

capture d ecran 2016-03-18 a 14 05 04

@czardoz czardoz reopened this Mar 19, 2016
@czardoz
Copy link

czardoz commented Mar 19, 2016

Well, I completely misunderstood you there! Marking this as a feature request.

@replaysMike
Copy link

I just came here to say this. I was wondering why Postman does not have this if it bothered to import the swagger schema. It's great to have a list of endpoints and all, but pretty useless if I can't even view the request object schema and/or generate sample request objects (like Swagger UI does).

@ghost
Copy link

ghost commented Jun 13, 2016

👍 Yea this is a major drawback. Was hoping to use Postman for convenience. Looks like it's pulling from the Parameter Definition Object's description property when in: body and ignoring any examples/ Definition Objects referenced in the spec.

Found this definitions.request.oneOf[0].properties.body.properties.mode.enum in v2.0.0 only has

  • raw
  • urlencoded
  • formdata

Would this have to be updated to include json? Right now I've created an x-postman-json-body field under responses that replaces the description field with an example payload.

@kovacs
Copy link

kovacs commented Mar 1, 2017

+1 I'm trying to migrate our services from depending upon using an embedded swagger UI to using Postman and this is just about a deal breaker because of how painful it is to not be able to easily construct payload objects. Is there a timeline for adding this? I can't imagine what could possibly be higher priority than such a fundamental feature outage.

@beingmohit
Copy link

+1

9 similar comments
@nubitech
Copy link

+1

@moberacker
Copy link

+1

@karolpyrek
Copy link

+1

@nottyo
Copy link

nottyo commented Sep 16, 2017

+1

@slashsbin
Copy link

👍

@xavier-b
Copy link

+1

@l2eady
Copy link

l2eady commented Jan 12, 2018

+1

@DeshpandeO1
Copy link

+1

@kishorwsfl
Copy link

+1

@pombuppa
Copy link

pombuppa commented Mar 26, 2018

Yet no support with such a simple feature so far.

I am considering use Postman as our testing tool but have to reconsider when even this basic feature is not available.

@a85 a85 added the Plugin label Jun 16, 2018
@a85 a85 self-assigned this Jun 29, 2018
@a85
Copy link
Contributor

a85 commented May 5, 2019

Everyone, this is part of a much larger initiative but we are introducing the ability to define APIs in Postman using schemas. You will be able to document schemas for both requests and responses using whatever format you typically use. Postman will then take this as another input in generating docs, building mocks, or adding tests. It looks like this:

Screenshot 2019-04-30 14 02 13

Eventually, this will also allow you to link multiple collections to the same schema and reference individual schemas for each request inside a collection. We feel this is a much more scalable way to handle reusability issues. Essentially this is a kind of request inheritance but instead of doing this from one request in another collection, you'll be doing this through a schema. We will start with OpenAPI and RAML in the beginning but will be extending this to GraphQL and the Collections format itself.

We'd love your feedback!

@keremcankabadayi
Copy link

keremcankabadayi commented May 6, 2019

What a great news! @a85 . When will it be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Plugins
Suggestions
Development

No branches or pull requests