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
Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. RFC-3986 section 4.2 link
I'm assuming that tokenUrl should in fact permit relative paths and default to a baseURL as defined by the Server Object
This would make sense because using tools such as editor-next.swagger.io, Authorize button should allow for baseUrl selection from the Servers drop-down. If tokenUrl cannot use relative paths, it will not work with this drop-down.
To Reproduce
define a security schema as follows using openapi: 3.1.0 header:
Attempt to use spectral to validate this schema with spectral:oas rule.
Schema validation will fail with:
error oas3-schema "Oauth2" property must not have unevaluated properties. components.securitySchemes.Oauth2
error oas3-schema "tokenUrl" property must match format "uri". components.securitySchemes.Oauth2.flows.clientCredentials.tokenUrl
Expected behavior
Spectral validation should pass and allow for relative URLs
Environment (remove any that are not applicable):
Library version: 6.11.1
OS: MacOS Sonoma 14.4
Browser: [N/A]
The text was updated successfully, but these errors were encountered:
Describe the bug
In OAS 3.0 tokenUrl was of uri-reference type but in 3.1 it seemed to be switched back to uri
As per OAS 3.1 documentation tokenUrl should be of type
URL
and as per section Relative References in URLs:I'm assuming that tokenUrl should in fact permit relative paths and default to a baseURL as defined by the Server Object
This would make sense because using tools such as editor-next.swagger.io, Authorize button should allow for baseUrl selection from the Servers drop-down. If tokenUrl cannot use relative paths, it will not work with this drop-down.
To Reproduce
openapi: 3.1.0
header:spectral:oas
rule.Expected behavior
Spectral validation should pass and allow for relative URLs
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: