Skip to content

Commit

Permalink
dont check parameter for example
Browse files Browse the repository at this point in the history
  • Loading branch information
coliu19 committed Mar 8, 2023
1 parent e82542d commit 6bace9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export default {
'$.paths.*.*.*.*.content[?(@ && @.schema)]',
'$.paths.*.*.*.content[?(@ && @.schema)]',
'$.paths.*.*.responses[*].headers[?(@ && @.schema)]',
'$.paths.*.*.parameters[?(@ && @.schema)]',
'$.paths.*.*.responses[?(@ && @.schema)]',
"$.paths.*.*.parameters[?(@ && @.schema && @.in === 'body')]",
],
'then': {
'function': ensureExamples,
Expand Down
22 changes: 0 additions & 22 deletions test/examples-for-every-schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,6 @@ describe(ruleName, () => {
const res = await spectral.run(spec.toString());

expect(res).toEqual([
{
code: ruleName,
message: 'For every schema provided in the OAS document, at least one example must be present; example or examples is missing in the object',
path: [
'paths',
'/test',
'get',
'parameters',
'0',
],
range: {
end: {
character: 34,
line: 37,
},
start: {
character: 11,
line: 30,
},
},
severity: 1,
},
{
code: ruleName,
message: 'For every schema provided in the OAS document, at least one example must be present; example or examples is missing in the object',
Expand Down

0 comments on commit 6bace9e

Please sign in to comment.