Closed t0rs closed 1 month ago
This is so strange. You're the second person to report this but I can't seem to reproduce this 😢
Okay, I've got it reproduced. Unfortunately I'm not sure if there is much that I can do about it yet.
Relevant issue: https://github.com/OAI/OpenAPI-Specification/issues/1706
@mbuhot Maybe you have some thoughts here? We have a parameter
of style :deepObject
. It has some fields who's values are :object
and some who's value are not (or could be a union of string or object even). The value is being encoded as a JSON string which seems like a very very strange choice. I have a "fix" which is that if the inner things are marked as a :deepObject
also (for whatever reason), it just shows a "regular" text box. I could then detect the value of "filter"
being a string
and query decode it as an object 😂
We should set up a test project we can run locally to try out swagger UI, because I don't have a great way to share an example here currently aside from saying mix igniter.new --with phx.new --install ash,ash_json_api --example --extend json_api
and then add an index route.
Okay, @t0rs I've "fixed" this in main
in a way I'm not very happy with. Now you type in the query string directly. i.e first_name[eq]=foo&last_name[eq]=bar
I'm not really sure any other way to fix this given the behavior in swagger_ui
🤷
When trying to filter on something like this:
Image:
It does not generate the correct url which has this included:
But instead generates: