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

feat: removing some rules people dont like #1304

Merged
merged 5 commits into from
Aug 20, 2020
Merged

Conversation

philsturgeon
Copy link
Contributor

@philsturgeon philsturgeon commented Aug 18, 2020

Fixes #1273
Fixes #1132

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

We're preparing for v6.0, which will include some major and excellent changes, but also some breaking changes to the bundled OpenAPI ruleset. These rules come from a bunch of feedback from the community about which rules should be showing up by default, and which are useful for "strict mode" (running with extends: [[spectral:oas, all]].

If you want any of these rules to stick around, speak now or forever hold your peace!

TLDR

  1. Bumping openapi-tag out to recommended: false(loads of people don't use tags and Studio doesn't help enough to make this easy for people who dont know what they are anyway). Unrecommend openapi-tags #1132
  2. Changed operation-2xx-response to operation-success-response to solve operation-2xx-response rule should not be recommended #1273.
  3. Removing operation-default-response altogether.

@philsturgeon philsturgeon requested review from P0lip and nulltoken and removed request for P0lip August 18, 2020 12:31
@@ -292,17 +288,6 @@ Use just one tag for an operation, which is helpful for some documentation syste

**Recommended:** No

### operation-summary-formatted
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we're prepping for v6 we can remove notes about v5.

@@ -253,10 +253,6 @@ Why? Well, you _can_ reference tags arbitrarily in operations, and definition is

Defining tags allows you to add more information like a `description`. For more information see [tag-description](#tag-description).

**Recommended:** Yes

### operation-default-response
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes very little sense to me, as the spec only says MAY have a default response.

@philsturgeon philsturgeon requested review from P0lip and marbemac August 18, 2020 12:43
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.

Looks good to me.

.nvmrc Show resolved Hide resolved
Phil Sturgeon added 5 commits August 19, 2020 19:09
The spec says: The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.

There's no need to suggest anyone default is any more important than optional.
lets let people run this with whatever version and the CI will confirm it works with versions we care about.
If you want to use it, switch from  to

fixes #1132
@philsturgeon
Copy link
Contributor Author

Hey @lornajane you might like this one!

@philsturgeon
Copy link
Contributor Author

@P0lip ready for thumbs!

@P0lip
Copy link
Contributor

P0lip commented Aug 19, 2020

Seems like we need to update test harness cases.

@P0lip P0lip added breaking Pull requests that introduce a breaking change enhancement New feature or request labels Aug 19, 2020
@P0lip P0lip changed the title Removing some rules people dont like feat: removing some rules people dont like Aug 19, 2020
@philsturgeon philsturgeon merged commit 1b17eeb into develop Aug 20, 2020
@philsturgeon philsturgeon deleted the remove-bad-rules branch August 20, 2020 09:00
@P0lip
Copy link
Contributor

P0lip commented Aug 20, 2020

@philsturgeon why did we merge this?
the tests weren't passing.

@philsturgeon
Copy link
Contributor Author

philsturgeon commented Aug 20, 2020 via email

@dillonredding
Copy link

Any updates on this? I'd really like to get the operation-success-response rule 😁

@philsturgeon
Copy link
Contributor Author

@dillonredding v6.0 is not yet released but if you'd like to go ahead and use this new rule you can always require the npm module via git and point it at the develop branch: https://stackoverflow.com/questions/39732397/install-specific-branch-from-github-using-npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Pull requests that introduce a breaking change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

operation-2xx-response rule should not be recommended Unrecommend openapi-tags
3 participants