8000 externalValue doesn't permit for relative references · Issue #2819 · stoplightio/spectral · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

externalValue doesn't permit for relative references #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spiderPan opened this issue May 8, 2025 · 0 comments
Open

externalValue doesn't permit for relative references #2819

spiderPan opened this issue May 8, 2025 · 0 comments

Comments

@spiderPan
Copy link

Please delete this section, and any sections below that you don't use, before creating the issue.

Describe the bug

Starting from OAS 3.1.0, the externalValue should allow relative reference, See the documentation

To Reproduce

  1. Create a schema as following using openapi:3.1.0
Response:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseSchema'
          examples:
            jsonObject:
              externalValue: "./components/response.json"
  1. Attempt to use spectral to validate this schema with spectral:oas rule.
  2. Validation failed with
error  oas3-schema            "externalValue" property must match format "uri".

Expected behavior
Spectral validation should pass and allow for relative URLs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0