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

docs(repo): update rulesets docs #2310

Merged
merged 40 commits into from
Oct 27, 2022
Merged

Conversation

heitortsergent
Copy link
Contributor

@heitortsergent heitortsergent commented Oct 14, 2022

Fixes #2231.

Preview link:

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

@heitortsergent
Copy link
Contributor Author

@philsturgeon would you mind taking a look at this and telling me what you think? I took a pass at reorganizing the Rulesets and Custom Rulesets page.

I think there's still some work to do here in the Custom Rulesets Overview page (some reorganizing and rewriting), but want to get your thoughts before I make more changes.

This link should work to see it in the docs view: https://docs.stoplight.io/docs/spectral/branches/docs%2Freorganize-rulesets/01baf06bdd05a-rulesets

@philsturgeon
Copy link
Contributor

Custom Rulesets starts with this which no longer makes sense in the move:

Customizing existing rulesets might be all you need at first, but at some point, you will want to make a custom ruleset.

Let's start from scratch.

Lets look through the various keywrods that make up a ruleset, so you can learn to tweak a distributed ruleset to work for you, or make your own ruleset from scratch to power your organizations API Style Guide or some other custom situation.

@philsturgeon
Copy link
Contributor

Generally this is looking amazing! Using a group is a fantastic way to break it down.

@philsturgeon
Copy link
Contributor

Btw I noticed an old mistake I made, I had given: $.paths.[*][get,post,put,delete,options] but it should be given: $.paths[*][get,post,put,delete,options].

From @P0lip:

$.paths.[*] acts as $.paths..[*] so it goes deep - it's incorrect if you only want to target an operation object.

@heitortsergent
Copy link
Contributor Author

@philsturgeon thanks!! I fixed the given example you mentioned.

I'll go ahead and update the intro to Custom Rulesets and make some more changes then. I'll tag you again once it's ready for another look. :)

@heitortsergent
Copy link
Contributor Author

@philsturgeon I think it's ready for another look if you have some time? :D

  • Renamed the Rulesets page to Create a Ruleset - I think that makes more sense in terms of that page being a part of the "Getting Started" section
  • Renamed "Custom Rulesets" to "Rulesets"
  • Updated the intro to "Rulesets" page to emphasize "Custom Ruleset" a bit less (like you mentioned in your previous comment)
  • Split up "Rules" into its own separate page - I was struggling a little bit with having the Ruleset Properties and Rule Properties in the same page, I think this might work better

I don't love having the Rulesets group now with: Overview, Rules, and then specific pages for certain Ruleset Properties (Aliases, etc.), but I'm not sure having a subgroup in there is a good idea... I'm thinking if this seems like a better organization, I could also stop at this point for this PR and just fix the links, and we can play around with a bit more in a separate PR.

Let me know what you think! 🙏

@heitortsergent heitortsergent marked this pull request as ready for review October 20, 2022 19:20
@heitortsergent heitortsergent requested review from a team as code owners October 20, 2022 19:20
pamgoodrich
pamgoodrich previously approved these changes Oct 20, 2022
Copy link
Contributor

@pamgoodrich pamgoodrich left a comment

Choose a reason for hiding this comment

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

Great updates!

docs/getting-started/3-rulesets.md Outdated Show resolved Hide resolved
docs/getting-started/3-rulesets.md Outdated Show resolved Hide resolved
docs/getting-started/3-rulesets.md Outdated Show resolved Hide resolved
docs/guides/4-custom-rulesets.md Outdated Show resolved Hide resolved
docs/guides/4-custom-rulesets.md Outdated Show resolved Hide resolved
@@ -0,0 +1,110 @@
## JavaScript Ruleset Format

Spectral v6.0 added support for a JavaScript ruleset format, similar to the JSON and YAML formats.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I asked before. Do we need the v6.0 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You did, and I tagged other folks in that comment but didn't get a reply, so it stayed in there since I wasn't sure if it was ok to remove.

docs/guides/4f-js-rulesets.md Outdated Show resolved Hide resolved
docs/guides/4f-js-rulesets.md Outdated Show resolved Hide resolved
docs/guides/4f-js-rulesets.md Outdated Show resolved Hide resolved
docs/guides/4f-js-rulesets.md Outdated Show resolved Hide resolved
@heitortsergent heitortsergent merged commit 8c67e80 into develop Oct 27, 2022
@heitortsergent heitortsergent deleted the docs/reorganize-rulesets branch October 27, 2022 18:00
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 6.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

docs: reorganize rulesets and custom rulesets pages
5 participants