Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rulesets): make rule oas2-operation-formData-consume-check consistent with Swagger Editor similar rule #2542

Closed

Conversation

pavelkornev
Copy link
Contributor

@pavelkornev pavelkornev commented Oct 6, 2023

Swagger Editor has a similar rule to check values of consumes array:
https://github.com/swagger-api/swagger-editor/blob/249d4f0044d2104fdbe582cf53f27f3538b361d7/src/plugins/validate-semantic/validators/form-data.js#L50-L96

The difference is that Spectral rule does not fail if consumes array is completely missing which seems to be a mistake.

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

Potentially, it might be a breaking change for those who use this rule as it will though an additional validation issue in this edge case.

@pavelkornev pavelkornev requested a review from a team as a code owner October 6, 2023 12:01
@pavelkornev
Copy link
Contributor Author

@P0lip, where can i find the failing test file?
test-harness/tests/examples.oas2/examples.oas2.test.js

@P0lip
Copy link
Contributor

P0lip commented Oct 9, 2023

@P0lip P0lip force-pushed the develop branch 3 times, most recently from dc90b7a to c22f408 Compare April 4, 2024 13:29
@mnaumanali94
Copy link
Contributor

Closing as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants