Rule no-invalid-media-type-examples not properly evaluated for types using allOf
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 228
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 48
Description
Describe the bug
Rule no-invalid-media-type-examples is not triggered for unevaluated properties for examples of allOf types.
To Reproduce
Steps to reproduce the behavior:
- Given this
redocly.yamlconfiguration
lint:
extends:
- recommended
- And this (zipped) OpenAPI file: bikes.yaml.zip
- Run this command with these arguments...
redocly lint bikes.yaml - See linting output
Only one warning is produced:
Example value must conform to the schema: must NOT have unevaluated properties 'unevaluatedProperty2'.
Expected behavior
Two warnings should be included in the linting output:
Example value must conform to the schema: must NOT have unevaluated properties 'unevaluatedProperty1'.
Example value must conform to the schema: must NOT have unevaluated properties 'unevaluatedProperty2'.
Redocly Version(s)
1.0.0-beta.112
Node.js Version(s)
v18.2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied bikes.yaml.zip example and the redocly.yaml configuration, then run redocly lint bikes.yaml to reproduce the single warning. Trace the no-invalid-media-type-examples rule while evaluating the allOf example, and verify completion when the lint output includes warnings for both unevaluatedProperty1 and unevaluatedProperty2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100