Describe the bug
Docker image stoplight/spectral:6.11 is returning a oas3-server-variables error for a relative URL server that has a variable substitution.
To Reproduce
Given spec.yaml, an OpenAPI document (only servers: -url is important and the rest is to avoid errors/warnings):
openapi: 3.1.0
info:
title: title
description: description
version: version
contact:
name: name
email: email
servers:
- url: /example/{version}
variables:
version:
default: version
paths:
/:
get:
description: description
operationId: get
tags:
- tag
responses:
'200':
description: description
tags:
- name: tag
description: description
and spectral.yaml config file,
extends: spectral:oas
rules: {}
Run docker run --rm -v $PWD:/data -w /data stoplight/spectral:6.11 lint spec.yaml and it returns:
/data/spec.yaml
11:15 error oas3-server-variables A few substitutions of server variables resulted in invalid URLs: /example/version servers[0].variables
Expected behavior
It should pass like it does for version 6.10 (No results with a severity of 'error' found!).
Note that it does pass for version 6.11 if the /{version} is removed from the url or if the url is an absolute URL.
Environment
Docker image stoplight/spectral version 6.11
Describe the bug Docker image
stoplight/spectral:6.11
is returning aoas3-server-variables
error for a relative URL server that has a variable substitution.To Reproduce Given
spec.yaml
, an OpenAPI document (onlyservers: -url
is important and the rest is to avoid errors/warnings):and
spectral.yaml
config file,Run
docker run --rm -v $PWD:/data -w /data stoplight/spectral:6.11 lint spec.yaml
and it returns:Expected behavior It should pass like it does for version 6.10 (
No results with a severity of 'error' found!
).Note that it does pass for version 6.11 if the
/{version}
is removed from theurl
or if theurl
is an absolute URL.Environment Docker image stoplight/spectral version 6.11