-
-
Notifications
You must be signed in to change notification settings - Fork 546
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 getMany query params wrong type on "filter" "or" "sort" "join" #196
Comments
since it's working nice. do you mean here? crud/packages/crud/src/crud/swagger.helper.ts Lines 113 to 120 in b1f0924
filter is string . and it's a query param. so it can be repeat like ?filter=a||eq||1&filter=b||eq||2 .
|
Yes exactly. Sure it works, but it doesn't comply with the swagger spec. https://swagger.io/docs/specification/2-0/describing-parameters/#array If you generate a consumer api out of the swagger.json you most likely end up with an api wich only accepts one filter parameter. Passing something like I have tried to change the meta in swagger.helper.ts. That worked great. Also in the swagger interface you have separate input fields per parameter. |
Adding many filter params is very cumbersome this way in the text box: user_id||eq||1&filter=region||eq||Poland&filter=year||eq||2012 And requires typing in &filter over and over again, the collectionFormat = multi is nicer, the UI provides an option to click a button and add additional form fields for each additional filter parameter |
I experiencing some issues with the types of the getMany query params.
The types of
filter
or
sort
andjoin
are reflected with"type": "string"
where in my opinion they should have the typeThe text was updated successfully, but these errors were encountered: