-
-
Notifications
You must be signed in to change notification settings - Fork 219
Examples with same ID causes error #773
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
Comments
The error seems to come from |
The problem still keeps occurring. Is there any chance that some maintainer could apply the idea from the PR to all examples? As mentioned in this comment , the PR only remove top level examples under components. Thanks |
fixed by #890 |
[1] did some work to resolve a false positive schema validation issue[2]. It's about examples with the "id" property. As reported in [3] there may be examples with such property for schemas where type is not object. This patch hopefully fixes all remaining instances of the problem. [1] 0ad49ec ("remove examples from schema (cdimascio#890)") [2] cdimascio#773 [3] cdimascio#890 (comment)
Cross-referencing a new issue: #931. |
Describe the bug
Seems like examples rely on an internal 'id' field to identify them within the
express-openapi-validator
lib. If you have multiple examples, and they share the same ID - requests to your API error out.Example open-api doc here: https://github.com/HairyMike/bug-express-openapi-validator/blob/master/openapi.yaml
You will get a response like this:
To Reproduce
Actual behavior
I get the following message:
Expected behavior
Should see:
Examples and context
This is the open-api snippet that is causing the issue. Note the identical IDs:
The text was updated successfully, but these errors were encountered: