postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.85k stars 839 forks source link

Generate json raw based on swagger definition #1885

Open matthieugeerebaert opened 8 years ago

matthieugeerebaert commented 8 years ago

As soap-ui does for soap ws

czardoz commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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

replaysMike commented 8 years ago

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 commented 8 years ago

:+1: 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

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 commented 7 years ago

+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 commented 7 years ago

+1

nubitech commented 7 years ago

+1

moberacker commented 7 years ago

+1

karolpyrek commented 7 years ago

+1

nottyo commented 7 years ago

+1

slashsbin commented 7 years ago

👍

xavier-b commented 7 years ago

+1

l2eady commented 6 years ago

+1

DeshpandeO1 commented 6 years ago

+1

kishorwsfl commented 6 years ago

+1

pombuppa commented 6 years ago

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 commented 5 years ago

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 commented 5 years ago

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