`example-value-or-externalValue` should only target OAS3
See original GitHub issue#882 puts under the light a minor issue: value
or externalValue
only make sense in the context of OAS3, but the rule example-value-or-externalValue
apply to both OAS2 and OAS3.
#882 could be merged without incurring any breaking change. However, maybe should we rename the rule to examples-value-or-externalValue
(and update the doco accordingly) to make it clear what it actually targets.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
OpenAPI Specification - Version 3.0.3
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and ...
Read more >OpenAPI Rules | Spectral
These rules will only be applied to OpenAPI v3.0 documents. oas3-api-servers. OpenAPI servers must be present and non-empty array. Recommended ...
Read more >OpenAPI Specification v3.0.3 | Introduction, Definitions, & ...
A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to...
Read more >API import restrictions and known issues - Azure
If you prefer a different behavior, you can either: ... be used in a schema, only the target namespace can be used to...
Read more >Customization
Once modified and compiled, you can use your new codegen just like any ... java -cp out/generators/my-codegen/target/my-codegen-openapi- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should be fixed with the PRs mentioned above. We just need a new release…
There’s a bit of a windy path here and I’m curious if the issue I’m seeing is related or something new.
I have an OAS3 doc like this, where the example is on the object in the schema rather than on the request/response. The
example-value-or-externalValue
in Spectral 5.0.0 catches the example there and complains there’s novalue
… but I think what I have is valid. If I try to put avalue
property underexample
then theoas-valid-schema-example
rule fails.I’m thinking the rule should only catch
examples
(plural) notexample
(singular).