-
Notifications
You must be signed in to change notification settings - Fork 1
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
Thefr0gger fix validation errors #19
base: master
Are you sure you want to change the base?
Thefr0gger fix validation errors #19
Conversation
Fix validation error
assets/api-swagger/swagger.json
Outdated
@@ -802,7 +802,7 @@ | |||
"name": "id", | |||
"in": "path", | |||
"description": "The id of the profile to merge.", | |||
"required": false, | |||
"required":true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this does not really match the code here - the implementation has both, id and email_address, optional (technically), and only if both are missing, the API call returns with an appropriate error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I've got this the wrong way round, new commit below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I know almost nothing about Swagger, so I can only guess. "Required: false" seems correct to me, as technically, neither id nor email is required, the user needs to be able to omit one or the other. If he omits both, he will get an appropriate failure message (at least one is generated by the service, I only assume the requestor gets it in a response).
Regarding path/query I'm only guessing that this means how the parameter has to be specified, and I think both are specified as an optional query parameter. That should be right, but to be sure, I'd have to go back and try to understand the code.
In case it helps, I'll unblock you with an approval.
Description
OpenAPI schema validation failed.
ENUM must be equal to one of the allowed values
(query)
4807 | {
4808 | "name": "id",
Change required to true
Tasks