You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('will fail when simple example is invalid (examples)',async()=>{constresults=awaits.run({openapi: '3.0.0',[path]: {xoxo: {schema: {type: 'string',},examples: {test1: {value: 123},},},},});expect(results).toEqual([expect.objectContaining({severity: DiagnosticSeverity.Error,code: ruleName,message: '`examples.*.value` property type should be string',}),]);});
and run: npm test "oas3-valid-oas-header", it doesn't check the examples.test.value value.
Expected behavior
All examples should be checked.
Environment (remove any that are not applicable):
Library version: 5.0.0
OS: Windows 10
The text was updated successfully, but these errors were encountered:
Describe the bug
This is somewhat related to #882: All the oas-valid-...-example rules only check the examples in
example
, but not the examples inexamples.*.value
.To Reproduce
OAS3 file adapted from the second test in src/rulesets/tests/templates/_oas-examples.ts:
If I add to the test:
and run:
npm test "oas3-valid-oas-header"
, it doesn't check the examples.test.value value.Expected behavior
All examples should be checked.
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: