Skip to content
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

Allow relative urls in securitySchemes-oauth-http #320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JonasGroeger
Copy link

@JonasGroeger JonasGroeger commented Aug 23, 2021

Allows now https:// (as before) well as relative urls like /token (new).
Relative URLs must start with a /.

Fixes #319

…mes-oauth-http

Allows now `https://` (as before) well as relative urls like `/token` (new).
Relative URLs must start with a `/`.

Fixes italia#319
@vercel
Copy link

vercel bot commented Aug 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dip-trasformazione-digitale/api-oas-checker/BWbMKCdHH1TnTzbj7ThfdX2mVpFA
✅ Preview: https://api-oas-checker-git-fork-cod-64b333-dip-trasformazione-digitale.vercel.app

@JonasGroeger JonasGroeger changed the title feat(319-relative-security-urls): Allow relative urls in securitySche… Allow relative urls in securitySchemes-oauth-http Aug 23, 2021
@ioggstream
Copy link
Collaborator

A proper way to implement this requires writing a custom function that:

  1. if relative URL in securitySchemes
  2. then checks server.url

Currently spectral yaml ruleset do not support accessing the whole document, but only the selected part.

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

Successfully merging this pull request may close these issues.

Allow for relative OAuth token URLs
2 participants