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

fix(ruleset): Allow single trailing slash for oas3 server url #1427

Merged
merged 2 commits into from
Dec 29, 2020

Conversation

mkistler
Copy link
Contributor

This PR makes a small modification to the oas3-server-trailing-slash rule to allow the url value to be a single slash.

According to the description of the servers field of an OpenAPI object in the OpenAPI specification:

the default value would be a Server Object with a url value of /

Since the default value for the url is a single slash (/), this should be considered a valid value and not generate a warning message.

Checklist

  • Tests added / updated
  • Docs added / updated (NA)

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Contributor

@P0lip P0lip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR.
Left 2 very minor comments.

src/rulesets/oas/index.json Outdated Show resolved Hide resolved
@P0lip P0lip added the t/bug Something isn't working label Dec 28, 2020
Co-authored-by: Jakub Rożek <jakub@rozek.tech>
@mkistler mkistler requested a review from P0lip December 28, 2020 22:35
@P0lip P0lip merged commit 8ceab21 into stoplightio:develop Dec 29, 2020
@P0lip
Copy link
Contributor

P0lip commented Dec 29, 2020

Thanks again!

P0lip added a commit that referenced this pull request Jan 4, 2021
* fix(ruleset): Allow single trailing slash for oas3 server url

* Apply suggestions from code review

Co-authored-by: Jakub Rożek <jakub@rozek.tech>

Co-authored-by: Jakub Rożek <jakub@rozek.tech>
@mkistler mkistler deleted the mdk/oas3-server-trailing-slash branch January 16, 2021 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants