IBM / openapi-validator

Configurable and extensible validator/linter for OpenAPI documents
Apache License 2.0
481 stars 88 forks source link

feat(ibm-operation-responses): introduce new validation rule #632

Closed padamstx closed 11 months ago

padamstx commented 11 months ago

PR summary

This commit introduces the 'ibm-operation-responses' rule which verifies that each operation has a "responses" field. This rule is used only for openapi 3.1.x documents because this check is included in the Spectral oas3-schema rule for openapi 3.0.x documents.

Edit: I was able to take a shortcut with this rule because it truly only needs to check the existence of the "responses" field for each operation. The 'ibm-response-status-codes' rule will verify that the "responses" field contains at least one successful response code.

PR Checklist

General checklist

Please make sure that your PR fulfills the following requirements:

Checklist for adding a new validation rule:

ibm-devx-sdk commented 11 months ago

:tada: This PR is included in version 1.11.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

ibm-devx-sdk commented 11 months ago

:tada: This PR is included in version 1.11.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

ibm-devx-sdk commented 6 months ago

:tada: This PR is included in version 1.3.1 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket: