Closed padamstx closed 1 year ago
Hi, would it be possible for someone to review and possibly merge this PR? This issue seems to be a common problem for folks that use spectral to validate openapi documents.
@padamstx thank you for the PR. The team is a bit busy with some other feature development. We'll be going through this and replying in a couple of weeks.
@mnaumanali94 Please don't forget about this PR :)
Hi there, any news? We have the same issue
@mnaumanali94, sorry to be a pest about this one, but I was wondering if you have an updated ETA when this PR might be reviewed. Here at IBM, we have a validator (https://github.com/IBM/openapi-validator) that is dependent on Spectral, including a custom ruleset that inherits from Spectral's oas ruleset, so our users are running into this issue. Depending on when this PR might be able to be reviewed/merged, we might need to solve the issue by replacing the oas3-valid-schema-example
rule with our own version that includes the fixed oasExample function. Thanks!
@P0lip Thank you for merging. I'll keep an eye out for a new spectral release so that we can move our validator project up to the latest.
@padamstx the new version of the @stoplight/spectral-rulesets
is already out :)
You can bump it
@P0lip excellent, that was quick!
Fixes #2081.
Checklist
Does this PR introduce a breaking change?
Screenshots
If applicable, add screenshots or gifs to help demonstrate the changes. If not applicable, remove this screenshots section before creating the PR.
Additional context
This commit modifies the oasExample function so that example fields are removed from the schema to be used for validation. This is needed because the presence of an "example" field in a schema confuses ajv in certain scenarios. References: