Skip to content

Commit 58233ce

Browse files
committed
docs: update the 'how to read these guidelines' section to defer to the central 'about' page
1 parent c72e8e5 commit 58233ce

2 files changed

Lines changed: 15 additions & 20 deletions

File tree

docs/api-guidelines/index.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Standardising API design reduces friction, making APIs easier to understand, use
1616

1717
These guidelines will ensure that all APIs follow accepted design, security and governance models, thereby raising the bar on API quality across the organisation.
1818

19+
## Scope and audience
20+
21+
Please refer to [Scope and audience][1] for details of the scope and intended audience for these guidelines.
22+
1923
## When to use these guidelines
2024

2125
These guidelines follow the principles of Representational State Transfer (REST), using HTTP methods and stateless communication between client and server. The guidelines cover these use cases:
@@ -32,17 +36,7 @@ If your product API is based on a different API technology, such as GraphQL or g
3236

3337
## How to read the guidelines
3438

35-
The **CAPITALISED** words throughout these guidelines have a special meaning:
36-
37-
The following key words are used throughout this guidance to indicate the strength of each requirement. These are adapted from [RFC2119][1] and contextualised for UKHSA:
38-
39-
| Key words | UKHSA Interpretation |
40-
| :---: | --- |
41-
| **MUST** | This word, or the terms "**REQUIRED**" or "**SHALL**", mean that the requirement is mandatory. It applies universally and must be followed without exception unless formally approved. |
42-
| **MUST NOT** | This phrase, or the phrase "**SHALL NOT**", mean that this action is explicitly prohibited. It must not be taken under any circumstances unless an approved exception is in place. |
43-
| **SHOULD** | This word, or the adjective "**RECOMMENDED**", mean that this is a strong recommendation. There may be valid reasons to deviate, but the implications must be understood, justified and documented. |
44-
| **SHOULD NOT** | This phrase, or the phrase "**NOT RECOMMENDED**", mean that this is a strong recommendation against a practice. Exceptions may exist, but they must be carefully considered, justified and documented. |
45-
| **MAY** | This word, or the adjective "**OPTIONAL**", mean that this is an optional practice or recommendation. Teams may choose to adopt it based on context, value or preference. |
39+
The **CAPITALISED** words throughout these guidelines have a special meaning, please refer to [How to read the guidelines][2] for guidance on interpreting them.
4640

4741
## How to use these guidelines
4842

@@ -58,4 +52,5 @@ Ensure your API is well-documented including error scenarios and example respons
5852

5953
Use the recommended tools for linting, validating and testing your OpenAPI definition and other aspects of your API.
6054

61-
[1]: https://datatracker.ietf.org/doc/html/rfc2119
55+
[1]: /about.md#scope-and-audience
56+
[2]: /about.md#how-to-read-the-guidelines

docs/spectral-rules/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
# npx spectral lint "@(openapi|swagger|*api)*.{json,yml,yaml}" -r ${{ GITHUB.WORKSPACE }}/node_modules/@ukhsa-collaboration/spectral-rules/.spectral.yaml -f github-actions
105105
```
106106
107-
The above example uses [glob syntax][13] to target only OpenAPI specification files.
107+
The above example uses [glob syntax][10] to target only OpenAPI specification files.
108108
109109
The glob pattern `@(openapi|swagger|*api)*.{json,yml,yaml}` matches:
110110

@@ -125,10 +125,10 @@ The global pattern does not match:
125125

126126
| Tool | Description |
127127
| - | - |
128-
| [VS Code Extension][10] | Official spectral VS Code extension provides real time linting / intellisense on your OpenAPI definition. |
129-
| [Github Action][11] | Official spectral Github action provides ability to lint your OpenAPI definition in CI/CD workflows. |
128+
| [VS Code Extension][11] | Official spectral VS Code extension provides real time linting / intellisense on your OpenAPI definition. |
129+
| [Github Action][12] | Official spectral Github action provides ability to lint your OpenAPI definition in CI/CD workflows. |
130130

131-
Read the [official spectral documentation][12] for more development workflows.
131+
Read the [official spectral documentation][13] for more development workflows.
132132

133133
[1]: ../api-guidelines/index.md
134134
[2]: https://docs.stoplight.io/docs/spectral/0a73453054745-recommended-or-all
@@ -139,7 +139,7 @@ Read the [official spectral documentation][12] for more development workflows.
139139
[7]: https://docs.stoplight.io/docs/spectral/b8391e051b7d8-installation
140140
[8]: https://meta.stoplight.io/docs/spectral/7895ff1196448-sharing-and-distributing-rulesets#npm
141141
[9]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package
142-
[10]: https://marketplace.visualstudio.com/items?itemName=stoplight.spectral
143-
[11]: https://github.com/marketplace/actions/spectral-linting
144-
[12]: https://docs.stoplight.io/docs/spectral/ecaa0fd8a950d-workflows
145-
[13]: https://github.com/mrmlnc/fast-glob
142+
[10]: https://github.com/mrmlnc/fast-glob
143+
[11]: https://marketplace.visualstudio.com/items?itemName=stoplight.spectral
144+
[12]: https://github.com/marketplace/actions/spectral-linting
145+
[13]: https://docs.stoplight.io/docs/spectral/ecaa0fd8a950d-workflows

0 commit comments

Comments
 (0)