unhelpful open API warning
Yesterday, while attempting to commit changes to an api.yaml file, IntelliJ warned me about problems with $ref references.
Warning:(143, 11) Schema validation: Property '$ref' is not allowed
Warning:(144, 11) Schema validation: Property 'example' is not allowed
I consulted the swagger editor, which I trust more in this context, and it found no problems. (The api.yaml gets correctly digested by both the openapi code generator and other processes that need to parse it.)
Questions:
1) Is there perhaps some kind of configuration I need to update?
2) Can I disable categories of warnings when, as in this case, they are unhelpful?
- - -
I'm using
IntelliJ IDEA 2022.2 (Ultimate Edition)
Build #IU-222.3345.118, built on July 26, 2022
Licensed to ...
Runtime version: 17.0.3+7-b469.32 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
- - -
Your API insists I choose a topic. The one I chose has "Open API" in it, though I am not doing Plugin Development and don't really know what this topic refers to.
Please sign in to leave a comment.
Hi Tim T Hanson Can you please provide yaml file example for the investigation? Thank you!
hi, Egor, sure. https://editor.swagger.io/ is perfectly happy with this api.yaml (a much scaled-down version of what we do):
but my IntelliJ warns when I try to commit it:
Warning:(29, 11) Schema validation: Property '$ref' is not allowed
Warning:(30, 11) Schema validation: Property 'example' is not allowed
Any updates here? I'm having same issue
It also shows the warning in the https://editor.swagger.io/ .