Skip to content

Commit cffce47

Browse files
chore(rulesets): add Arazzo to rulesets docs (#2703)
* chore(rulesets): add Arazzo to rulesets docs * chore(rulesets): add missing Arazzo docs --------- Co-authored-by: Nauman <[email protected]>
1 parent 49a0fe0 commit cffce47

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

docs/getting-started/1-concepts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ To achieve this, Spectral has three key concepts:
88
- **Functions** accept a value and return issues if the value is incorrect.
99
- **Rulesets** act as a container for rules and functions.
1010

11-
Spectral comes bundled with a [set of core functions](../reference/functions.md) and rulesets for working with [OpenAPI v2 and v3](./4-openapi.md) and [AsyncAPI v2](./5-asyncapi.md) that you can chose to use or extend, but Spectral is about far more than just checking your OpenAPI/AsyncAPI documents are valid.
11+
Spectral comes bundled with a [set of core functions](../reference/functions.md) and rulesets for working with [OpenAPI v2 and v3](./4-openapi.md), [AsyncAPI v2](./5-asyncapi.md), and [Arazzo v1](./6-arazzo.md) that you can chose to use or extend, but Spectral is about far more than just checking your OpenAPI/AsyncAPI/Arazzo documents are valid.
1212

13-
By far the most popular use-case of Spectral is automating [API Style Guides](https://stoplight.io/api-style-guides-guidelines-and-best-practices?utm_source=github&utm_medium=spectral&utm_campaign=docs), implementing rules that your Architecture, DevOps, API Governance or "Center of Excellence" teams have decided upon. Companies generally write these style guides as wiki pages, and several can be found on [API Stylebook](http://apistylebook.com/), but most of these rules could be automated with Spectral. For example:
13+
By far the most popular use-case of Spectral is automating [API Style Guides](https://stoplight.io/api-style-guides-guidelines-and-best-practices?utm_source=github&utm_medium=spectral&utm_campaign=docs), implementing rules that your Architecture, DevOps, API Governance, "Center for Enablement", or "Center of Excellence" teams have decided upon. Companies generally write these style guides as wiki pages, and several can be found on [API Stylebook](http://apistylebook.com/), but most of these rules could be automated with Spectral. For example:
1414

1515
- Paths must be `/kebab-case` ([more ideas for URL rules](https://blog.stoplight.io/consistent-api-urls-with-openapi-and-style-guides))
1616
- HTTP Basic isn't allowed

docs/getting-started/3-rulesets.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ Rules take certain parameters and then call functions on parts of another YAML o
1010

1111
The fastest way to create a ruleset is to use the `extends` property to leverage an existing ruleset.
1212

13-
Spectral comes with two built-in rulesets:
13+
Spectral comes with three built-in rulesets:
1414

1515
- `spectral:oas` - [OpenAPI v2/v3 rules](./4-openapi.md)
1616
- `spectral:asyncapi` - [AsyncAPI v2 rules](./5-asyncapi.md)
17+
- `spectral:arazzo` - [Arazzo v1 rules](./6-arazzo.md)
1718

1819
To create a ruleset that extends both rulesets, open your terminal and run:
1920

2021
```bash
21-
echo 'extends: ["spectral:oas", "spectral:asyncapi"]' > .spectral.yaml
22+
echo 'extends: ["spectral:oas", "spectral:asyncapi", "spectral:arazzo"]' > .spectral.yaml
2223
```
2324

2425
The newly created ruleset file can then be used to lint any OpenAPI v2/v3 or AsyncAPI descriptions using the `spectral lint` command:

docs/guides/2-cli.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Here you can build a [custom ruleset](../getting-started/3-rulesets.md), or exte
6060

6161
- [OpenAPI ruleset](../reference/openapi-rules.md)
6262
- [AsyncAPI ruleset](../reference/asyncapi-rules.md)
63+
- [Arazzo ruleset](../reference/arazzo-rules.md)
6364

6465
> If you use rules created or updated in a hosted [Stoplight API project](https://docs.stoplight.io/docs/platform/branches/pam-716-updated-landing-page/c433d678d027a-create-rules) with the Spectral CLI, you must publish the project from Stoplight before rule updates are used for linting.
6566

docs/guides/4-custom-rulesets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rulesets
22

3-
Spectral comes with two rulesets built-in: [OpenAPI](../reference/openapi-rules.md) and [AsyncAPI](../reference/asyncapi-rules.md). They're good starting points, but the true power of Spectral comes with customizing and creating a ruleset that fits your project or organization. Creating a ruleset can help you and your team improve your API design and API development process, and help you create better APIs.
3+
Spectral comes with three rulesets built-in: [OpenAPI](../reference/openapi-rules.md), [AsyncAPI](../reference/asyncapi-rules.md), and [Arazzo](../reference/arazzo-rules.md). They're good starting points, but the true power of Spectral comes with customizing and creating a ruleset that fits your project or organization. Creating a ruleset can help you and your team improve your API design and API development process, and help you create better APIs.
44

55
Let's look through the keywords that make up a ruleset, so you can learn how to tweak a distributed ruleset to work for you, or make your own ruleset from scratch to power your organizations [API Style Guide](https://stoplight.io/api-style-guides-guidelines-and-best-practices/?utm_source=github&utm_medium=spectral&utm_campaign=docs).
66

@@ -22,6 +22,7 @@ Rules are the most important part of a ruleset. For more details on rules and it
2222

2323
Formats are an optional way to specify which API description formats a rule, or ruleset, is applicable to. Currently Spectral supports these formats:
2424

25+
- `arazzo1_0` (Arazzo v1.0.x)
2526
- `aas2` (AsyncAPI v2.x)
2627
- `aas2_0` (AsyncAPI v2.0.0)
2728
- `aas2_1` (AsyncAPI v2.1.0)

0 commit comments

Comments
 (0)