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

API spec with separate common files #209

Open
rshrimp opened this issue Jul 12, 2019 · 1 comment
Open

API spec with separate common files #209

rshrimp opened this issue Jul 12, 2019 · 1 comment

Comments

@rshrimp
Copy link

rshrimp commented Jul 12, 2019

Hi Wicked
While configuring my APIs, I realized that I cannot add a common file (OAS2.0) which contains some global components for e.g. date-time, phone number, etc. which are used in the API spec and referred through $ref.
Does Wicked not allow $ref outside of the current api file? Swagger-UI throws all kinds of errors due to this.

I looked at the directory structure which stores directories for each api and copied the common files but still not able to make swagger-ui work and thus apis are broken.
Help appreciated
Thank you

@DonMartin76
Copy link
Member

Yes, you're probably right on this one. When this was initially implemented one or two years ago, this was actually not possible (afaik). Thus, wicked does not yet have any support for it. It expects the swagger/OpenAPI file to be self-sufficient.

Ideas how a solution for this could look like? Swagger-UI pulls the files from the UI container via an endpoint, and this endpoint does currently not support pulling other references from somewhere else. If you provide fully qualified references to some other place, it might work, but I haven't tried it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants