-
Notifications
You must be signed in to change notification settings - Fork 137
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
problem with oneOf: string/integer #286
Comments
Committee can't decide which type this is. See interagent/committee#286 Fixes sul-dlss/argo#2253 Ref sul-dlss/cocina-models#144
Committee can't decide which type this is. See interagent/committee#286 Fixes sul-dlss/argo#2253 Ref sul-dlss/cocina-models#144
Committee can't decide which type this is. See interagent/committee#286 Fixes sul-dlss/argo#2253 Ref sul-dlss/cocina-models#144
I understand this bug. committee convert string to integer for form parameters (the values are send as strings by browser) so it caused this bug. For example, we use this schema.
When we send the string value which can't convert integer (like But, when we send string value which can convert integer (like '42'), When the request is 'application/json', we don't convert the value (without 'date-time' convert) Ok, I'm going to fix 🙋 |
Oh, yeah, that's tricky. Thanks @ota42y! |
Committee can't decide which type this is. See interagent/committee#286 Fixes sul-dlss/argo#2253 Ref sul-dlss/cocina-models#144
Committee can't decide which type this is. See interagent/committee#286 Fixes sul-dlss/argo#2253 Ref sul-dlss/cocina-models#144 Ref sul-dlss/dor-services-app#1073
I have added a rails application here that illustrates the problem: https://github.com/jcoyne/comittee-bug
It has a failing test which you can run by doing:
Committee reports
{"id":"bad_request","message":"7116 isn't one of in #/components/schemas/Title/properties/value"}
I believe this is because of: https://github.com/jcoyne/comittee-bug/blob/master/openapi.yml#L32-L34
If I comment out the line:
then it works fine.
If I change this line of the test:
https://github.com/jcoyne/comittee-bug/blob/master/spec/requests/resources_request_spec.rb#L6
to look like a string, e.g. (
{ "title":{"value":"Number 7116"}}
) it also works fine.The text was updated successfully, but these errors were encountered: