spectral
spectral copied to clipboard
Spectral Schema checking issue with property name "type" is used in a schema example
Given a response body schema that returns an array of items and the item contains a property called type and it contains another property called default that is type boolean
When a schema level example is provided
Spectral gives an error incorrectly

In the example you can see where the type was set to boolean (its just a property and a value) there was no error when type has any other value the default boolean property is errored.
This doesnt happen on in-lined examples. Only schema level examples.
Example OpenAPI here that shows the issue: https://app.swaggerhub.com/apis/AdvancedComputerSoft/broken-example-default-property/1.0.0