-
Notifications
You must be signed in to change notification settings - Fork 216
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 "Could not resolve pointer" with namespaced keys #1172
Comments
This seems like the correct output. Are you able to post a more complete (but minimal) example? Or at least the relevant parts of the |
I can try yes to have a minimal example but I guess it cannot be correct if swagger is returning a big red error. |
Oh I see what you mean now. I somehow thought the two would need to match. To put it another way you are saying that Thanks btw - I have just read that I guess we probably should not use them anyway (see swagger-api/swagger-ui#4161 (comment)). |
Maybe they do need to match in some tooling, and probably openapi. I see that even reitit's openapi support does exactly the same thing Though it mentions this is banned in openapi https://github.com/metosin/reitit/blob/58195eed68bc3413704c20e95b4bf7bd7abb8c7e/test/cljc/reitit/openapi_test.clj#L1023-L1025 |
Yes this whole thing with |
@opqdonut the problem is that if you use namespaced keys in your |
Yes! To be clear, what I meant was: malli should replace |
"/" had to be encoded as "~1", and the encoding wasn't really supported by many tools. See eg. #1172
Hi there, from Slack, opening a bug report for a problem we have when using
reitit.swagger/create-swagger-handler
.We register malli spec with a namespace:
(r/register! :survey/site-type [:enum ...])
and we use it in another schema, say:
The generated ref for the parent object is
"#ref": "$ref":"#/definitions/survey~1site-type"
while in"definitions"
we see{"survey/site-type": ...}
.This results in a Swagger error:
Could not resolve reference: Could not resolve pointer: #/definitions/survey~1site-type
.Thanks for taking a look - let me know if you want me to test the fix locally.
The text was updated successfully, but these errors were encountered: