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

@json_schema is missing in sub-app API spec #76

Open
m3th0d opened this issue Dec 24, 2019 · 0 comments
Open

@json_schema is missing in sub-app API spec #76

m3th0d opened this issue Dec 24, 2019 · 0 comments

Comments

@m3th0d
Copy link

m3th0d commented Dec 24, 2019

Hi,

I have 2 aiohttp sub-apps. Both of them handle same route with @json_schema(SomeSchema) applied. I'd like to have separate Swagger UI + API spec for each of the sub-apps

So I call setup_aiohttp_apispec() for the first sub-app and then for the second one. When I run my app, the first created sub-app contains Some schema in spec definitions. But the second one doesn't. So I get

Could not resolve reference: Could not resolve pointer: /definitions/Some does not exist in document

error in Swagger UI for the endpoint in the second sub-app

It's the only schema missing in the spec. Also I use @docs (responses), @match_info_schema, @querystring_schema. All of them work fine in this scenario

Validation still works fine for missing schema though

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

No branches or pull requests

1 participant