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
using the spectral rule
formats: ["oas3","oas2"]
functions: [serverUrl]
rules:
OAPI-U1-server-dns-oas3:
description: The service server is available via a DNS name
message: '{{description}}. {{error}}'
severity: error
given: "$.servers[*]"
formats: [oas3]
then:
function: serverUrl
functionOptions:
test: OAPIU1
Describe the bug
severity displayed into the output should take into account severity returned by custom function
To Reproduce
using the following swagger petstore-openapi.json
using the spectral rule
formats: ["oas3","oas2"]
functions: [serverUrl]
rules:
OAPI-U1-server-dns-oas3:
description: The service server is available via a DNS name
message: '{{description}}. {{error}}'
severity: error
given: "$.servers[*]"
formats: [oas3]
then:
function: serverUrl
functionOptions:
test: OAPIU1
with the following custom function
serverUrl.js.txt
Run this CLI command 'spectral lint petstore-openapi.json --format json --ruleset spectral.yaml'
See error
Expected behavior
severity displayed into the output should take into account severity returned by custom function
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (remove any that are not applicable):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: