-
Notifications
You must be signed in to change notification settings - Fork 212
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
Swagger JSON missing global definitions from schema used in request spec #1002
Comments
Might be related to metosin/reitit#616 |
But only very loosely. As far as I understand, metosin/reitit#616 is about the overall location of definitions for the OpenAPI schema, whereas here it is about missing parts in the definition. |
Thanks for the report! I only noticed it now since it's in this repo and not reitit. I think I see the where the problem is. |
I'm unable to reproduce this with malli 0.16.0 and the latest reitit master. The code in malli does look a bit suspicious. Do you have a working reproduction @mkreis ? |
I can try to reproduce it with malli 0.16.0 and add the results here. |
Hi @opqdonut , I managed to recreate it with a simple project: https://github.com/mkreis/malli-issue-1002 |
Thanks! I'll try to have a look tomorrow. |
Cool, thank you! Also I just noticed that it works if key :body is the first key in the :parameters map. So it might be easy to fix... I hope. |
I think I found a bug regarding Swagger Schema generation:
Only definitions from schemas referred to in responses are shown as global definitions in
/definitions
, but those from requests are missing.With the following Reitit route config
only company2 will be in
/definitions
(although theref$
to both def’s are there, thus causing a missing/invalid reference to company1).I'm using Malli 0.14.0 and Reitit 0.7.0-alpha7
The text was updated successfully, but these errors were encountered: