Open adamaltman opened 9 months ago
If I understood this correctly, it's not do-able with configurable rules since we'd need to check the type of a key.
Update: had a quick look at a custom plugin but it looks like the data is already stringified when it gets to that stage - we need to look at the internals and hook in earlier to pick up this scenario.
The YAML parser we're using doesn't distinguish between numeral and string keys on the AST level. We may need to use another parser to detect what the key type actually is.
Describe the bug
This excerpt is incorrect but the lint tool doesn't catch that the 200 needs to be a string '200' and the yaml parses it into a number:
Quoting the spec:
To Reproduce Steps to reproduce the behavior:
Expected behavior
Logs
n/a
OpenAPI description
3.0/3.1
Redocly Version(s)
1.0-1.5
Node.js
Version(s)18
Additional context
Inspired by #1331