@json_schema is missing in sub-app API spec
Opened this issue · 0 comments
m3th0d commented
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