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

Documentation Rewrite #417

Merged
merged 19 commits into from
Aug 8, 2019
Merged

Documentation Rewrite #417

merged 19 commits into from
Aug 8, 2019

Conversation

philsturgeon
Copy link
Contributor

Fixes #302.

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

tbarn
tbarn previously requested changes Aug 2, 2019
Copy link
Contributor

@tbarn tbarn left a comment

Choose a reason for hiding this comment

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

Left a few comments. One other thing that you haven't touched is, fields. We got a request on the forum to have more documentation on what fields they can use and how.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/getting-started/openapi.md Outdated Show resolved Hide resolved
docs/migration-guides/4.0.md Outdated Show resolved Hide resolved
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.

Left a few comments. Looking good at first glance, but when just briefly through it.

src/rulesets/oas/index.json Show resolved Hide resolved
docs/reference/functions.md Outdated Show resolved Hide resolved
docs/reference/functions.md Outdated Show resolved Hide resolved
Phil Sturgeon and others added 2 commits August 2, 2019 20:51
Co-Authored-By: Jakub Rożek <P0lip@users.noreply.github.com>
Co-Authored-By: Jakub Rożek <P0lip@users.noreply.github.com>
@philsturgeon
Copy link
Contributor Author

@tbarn fixed most of it, but what are fields?

@tbarn
Copy link
Contributor

tbarn commented Aug 2, 2019

Someone asked:

Is there a lookup for all the fields I can refer to?

I thought it would be helpful for people writing custom rulesets.

@philsturgeon
Copy link
Contributor Author

Right but I don’t know what fields this person is talking about.

@tbarn
Copy link
Contributor

tbarn commented Aug 2, 2019

Anything that goes in these:

Image 2019-08-02 at 2 58 01 PM

@philsturgeon
Copy link
Contributor Author

philsturgeon commented Aug 2, 2019 via email

@philsturgeon
Copy link
Contributor Author

philsturgeon commented Aug 2, 2019 via email

@tbarn
Copy link
Contributor

tbarn commented Aug 2, 2019

Looking good. I'll approve if you remove all the occurrences of "just."

@philsturgeon
Copy link
Contributor Author

just removed the justs!

@philsturgeon philsturgeon dismissed tbarn’s stale review August 5, 2019 14:11

did most of it

Copy link
Contributor

@marbemac marbemac left a comment

Choose a reason for hiding this comment

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

Haven't looked at actual content yet, but have some quick structural things related to platform publishing for you to take a look at. LMK if you have any questions about it!

docs/getting-started/concepts.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
tbarn
tbarn previously approved these changes Aug 6, 2019
@philsturgeon philsturgeon dismissed stale reviews from tbarn and chris-miaskowski via 3bbeb6f August 6, 2019 10:17
@philsturgeon philsturgeon force-pushed the docs/rewrite branch 4 times, most recently from de07aa2 to 083a2cb Compare August 6, 2019 10:41

## Features

- Create custom rules to lint JSON or YAML objects
- Ready to use rules to validate and lint OpenAPI v2 _and_ v3 documents
- Use JSON path to apply rules to specific parts of your objects
- Built-in set of functions to help [create custom rules](./docs/rulesets.md). Functions include pattern checks, parameter checks, alphabetical ordering, a specified number of characters, provided keys are present in an object, etc.
- Built-in set of functions to help [create custom rules](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md#adding-a-rule). Functions include pattern checks, parameter checks, alphabetical ordering, a specified number of characters, provided keys are present in an object, etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Built-in set of functions to help [create custom rules](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md#adding-a-rule). Functions include pattern checks, parameter checks, alphabetical ordering, a specified number of characters, provided keys are present in an object, etc.
- Built-in set of functions to help [create custom rules](docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md#adding-a-rule). Functions include pattern checks, parameter checks, alphabetical ordering, a specified number of characters, provided keys are present in an object, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @philsturgeon shouldnt that be relative?

### CLI

After installing via one of the methods above, Spectral can be used via your command-line. Take a look at the [CLI docs](./docs/cli.md) for information on the options available.
For more installation options, see [Getting Started > Installation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/installation.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For more installation options, see [Getting Started > Installation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/installation.md)
For more installation options, see [Getting Started > Installation](docs/getting-started/installation.md)

- [Enabling specific OpenAPI rules](./docs/rulesets.md#enabling-specific-openapi-rules)
- [Disabling specific OpenAPI rules](./docs/rulesets.md#disabling-specific-openapi-rules)
- [Changing the severity of a rule](./docs/rulesets.md#changing-the-severity-of-a-rule)
After [installation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/installation.md) take a look at our [getting started documentation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/concepts.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
After [installation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/installation.md) take a look at our [getting started documentation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/concepts.md).
After [installation](docs/getting-started/installation.md) take a look at our [getting started documentation](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/concepts.md).

## Programmatic usage

Spectral is written in TypeScript (then compiled to JavaScript) and can be used directly for when you need to use Spectral programmatically. Take a look at our ["JavaScript API documentation"](docs/js-api.md).
- [Adding a rule](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md#adding-a-rule)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [Adding a rule](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md#adding-a-rule)
- [Adding a rule](docs/getting-started/rulesets.md#adding-a-rule)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seeing as the README is not going to be read by platform these links will not be transformed to docs URLs and we'll be sending our GitHub users to the markdown files here in the repo. This is temporary until we get symlinks supported in Studio, and can symlink the README.md to docs/intro.md.

Copy link
Contributor

@chris-miaskowski chris-miaskowski left a comment

Choose a reason for hiding this comment

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

Hey @philsturgeon I did another pass. Added one or two suggestions (change URLs from absolute to relative) but not sure if they make sense. If they do then please fix and feel free to merge.

@philsturgeon philsturgeon merged commit 1ded368 into develop Aug 8, 2019
@philsturgeon philsturgeon deleted the docs/rewrite branch August 8, 2019 10:43
philsturgeon pushed a commit that referenced this pull request Aug 8, 2019
New documentation covering CLI and JS APIs, rulesets, workflows, core rules, etc.
philsturgeon pushed a commit that referenced this pull request Aug 8, 2019
* docs: include 2.x/3.x to 4.0 migration guide (#381)

* docs: include 2.x/3.x to 4.0 migration guide

* cleaned up migration guide

* remove periods for consistency

* docs: feedback from @philsturgeon

* docs: cover recommended property

* clearing a few things up

* Update 4.0.md

* fix typo

* Documentation Rewrite (#417)

New documentation covering CLI and JS APIs, rulesets, workflows, core rules, etc.
philsturgeon pushed a commit that referenced this pull request Aug 20, 2019
* docs: include 2.x/3.x to 4.0 migration guide (#381)

* docs: include 2.x/3.x to 4.0 migration guide

* cleaned up migration guide

* remove periods for consistency

* docs: feedback from @philsturgeon

* docs: cover recommended property

* clearing a few things up

* Update 4.0.md

* fix typo

* Documentation Rewrite (#417)

New documentation covering CLI and JS APIs, rulesets, workflows, core rules, etc.
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

Successfully merging this pull request may close these issues.

Document Core Functions
6 participants