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

Spectral Schema checking issue with property name "type" is used in a schema example #2385

Open
savage-alex opened this issue Jan 24, 2023 · 0 comments
Labels

Comments

@savage-alex
Copy link

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

image

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

@mnaumanali94 mnaumanali94 added t/bug Something isn't working p/medium labels Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants