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.84k stars 839 forks source link

Remote reference in OpenAPI 3 #8827

Open seranotannason opened 4 years ago

seranotannason commented 4 years ago

Currently, Postman doesn't seem to allow an API spec that is composed of multiple files. This would've been perfect for modularization and avoiding one single large file, i.e. the main file is smaller and can simply indicate $ref to other smaller files.

kinlane commented 4 years ago

Hey there @seranotannason! As of Postman v7.20.0, you can "Now you can import OpenAPI schemas that are split across multiple files." I was able to import the new GitHub OpenAPI 3 into Postman successfully. Let us know if you still having issues so we can help troubleshoot.

kinlane commented 4 years ago

Apologies I spoke incorrectly -- we can't do remote. The GitHub I did was local ref.

theletterf commented 3 years ago

@kinlane This is so essential. I guess external refs are not enabled out of security concerns, but how do you even ref other specs within Postman (like you do in SwaggerHub) if external refs are not possible?

pedrojuk commented 3 years ago

Considering whether to use Postman for a large industry-wide set of APIs. Management of shared referred items via external references (as per Swaggerhub Domains) will be critical.

theletterf commented 3 years ago

Then I'd say don't, @pedrojuk , though @loopDelicious told me it's in the roadmap.

theletterf commented 3 years ago

Any status update on this? OpenAPI 3.0 is several years old now.

savage-alex commented 3 years ago

Thanks @VShingala for the fast triage. Sorry I missed this ticket and raised a duplicate. It does have some specific cases you could test / use for requirements though.

akshaydeo commented 2 years ago

@theletterf, we are working on this feature, and we will release it by the end of July 2022 in a staged manner 🙇

jjkirby commented 2 years ago

Will this also support a "local" ref? For example, we use a mono repo where common schema models such as 404 response models are kept in another directory in the repo. It would be nice when you import/sync with GitHub that you can pull down those model files as well. Currently, Postman doesn't recognize them so you can't import them

ejackson2019 commented 2 years ago

@akshaydeo Hi, any word on a timeline when this will be released?

akshaydeo commented 2 years ago

👋 @ejackson2019, we will release multi-file support for the schema (and many more features) next month. This feature will allow you to use references in your schema within Postman.

We are evaluating support for remote references and schema registry at the moment.

johannesehrhart commented 1 year ago

Hi @akshaydeo we have the following structure in our repository.

index.yaml

Will it be possible when this issue is resolved that we can resolve subsequent references? For now none of the following references can be found.

File Contracts.Service-A/openapi.yaml ... responses: 404: $ref: '../Contracts.WellKnownTypes/openapi.yaml#/components/responses/NotFoundResponse

File index.yaml ... paths: /some/path/service-a $ref: 'Contracts.Service-A/openapi.yaml#/components/paths/SomePath'

jaumard commented 1 year ago

Hello, I've tried to import an openapi definition that contains references to other local file but look like nothing is imported, here is the result of my import:

Screenshot 2023-01-07 at 14 12 01

References stay as references instead of being resolved.

Screenshot 2023-01-07 at 14 12 21
dsigmund89 commented 1 year ago

Is there any update on this? We're wanting to move from Swaggerhub to Postman, but as @pedrojuk mentioned. Postman doesn't seem to support remote/external references at the moment. Unless I'm missing that feature.

Within a single workspace, it would be really nice if multiple APIs could reference the yaml files from each other.

shashankawasthi88 commented 1 year ago

@dsigmund89 @jaumard we are actively working on supporting remote references as well as common components that can be used across different APIs. Is it possible for us to get on a short call and validate the solution that we have in our mind? You can schedule a call using - https://calendly.com/shashank-awasthi/30min-1

lucadirocco commented 1 year ago

Any update on this feature? I'm using version 10.17.5, and still external references are not imported.