Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thefr0gger
Copy link
Contributor

@thefr0gger thefr0gger commented Feb 8, 2023

Description

OpenAPI schema validation failed.

ENUM must be equal to one of the allowed values
(query)

4807 | {
4808 | "name": "id",

4809 | "in": "path",
| ^^^^^^ 👈🏽 Did you mean query here?
4810 | "description": "The id of the profile to merge.",
4811 | "required": false,
4812 | "schema": {

Change required to true

Tasks

  • [*] Added correct pull request label (work in progress, DO NOT MERGE, ready for review) etc

@thefr0gger thefr0gger requested a review from a team as a code owner February 8, 2023 13:48
@@ -802,7 +802,7 @@
"name": "id",
"in": "path",
"description": "The id of the profile to merge.",
"required": false,
"required":true,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@WernerHungerOM WernerHungerOM left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants