Created
October 13, 2023 05:01
-
-
Save kevinswiber/19d4215b19dfd6096fcf2cea13a0ff16 to your computer and use it in GitHub Desktop.
Spectral de-dupe minimal repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
missing_error_response_content: | |
given: '$..responses[?(@property && @property.match(/^(4|5)/))]' | |
then: | |
field: content | |
function: defined | |
formats: | |
- oas3 | |
severity: warn | |
message: Error response should contain a response body. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.1.0 | |
info: | |
title: De-duplicated Spectral results example | |
version: 0.1.0 | |
paths: | |
/test: | |
get: | |
responses: | |
"400": | |
$ref: "#/components/responses/default" | |
"500": | |
$ref: "#/components/responses/default" | |
components: | |
responses: | |
default: | |
description: default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment