@aep_dev/aep-openapi-linter 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,30 +14,53 @@ Proposals].
14
14
 
15
15
  ### Dependencies
16
16
 
17
- The Spectral Ruleset requires Node version 20 or later.
17
+ The Spectral Ruleset requires:
18
18
 
19
- ### Install Spectral
19
+ - Node version 20 or later.
20
+ - The [@stoplight/spectral-cli] npm package.
20
21
 
21
- `npm i @stoplight/spectral-cli -g`
22
+ [@stoplight/spectral-cli]:
23
+ https://www.npmjs.com/package/@stoplight/spectral-cli
24
+
25
+ ### Installation
26
+
27
+ You can use the aep-openapi-linter as an npm package or directly from GitHub.
28
+
29
+ If you choose to use it as an npm package, install it in your project as you
30
+ would any other npm package:
31
+
32
+ ```sh
33
+ npm install @aep_dev/aep-openapi-linter
34
+ ```
22
35
 
23
36
  ### Usage
24
37
 
25
- You can specify the ruleset directly on the command line:
38
+ To use the aep-openapi-linter, create a Spectral configuration file
39
+ (`.spectral.yaml`) that references the ruleset. If you installed the
40
+ aep-openapi-linter npm package into your project, you can just reference the
41
+ ruleset by name:
26
42
 
27
- `spectral lint -r https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/main/spectral.yaml <api definition file>`
43
+ ```yaml
44
+ extends:
45
+ - '@aep_dev/aep-openapi-linter'
46
+ ```
47
+
48
+ Note that the quotes are required by yaml syntax.
28
49
 
29
- Or you can create a Spectral configuration file (`.spectral.yaml`) that
30
- references the ruleset:
50
+ You can also bypass installing the npm aep-openapi-linter package and reference
51
+ the ruleset directly from GitHub:
31
52
 
32
53
  ```yaml
33
54
  extends:
34
55
  - https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/main/spectral.yaml
35
56
  ```
36
57
 
37
- ### Example
58
+ You can pin to a specific release of the ruleset by replacing `main` with the
59
+ tag for the release. E.g.
38
60
 
39
- ```bash
40
- spectral lint -r https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/main/spectral.yaml petstore.yaml
61
+ ```yaml
62
+ extends:
63
+ - https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/refs/tags/v0.5.1/spectral.yaml
41
64
  ```
42
65
 
43
66
  ### Using the Spectral VSCode extension
package/aep/0132.yaml CHANGED
@@ -95,7 +95,7 @@ rules:
95
95
  type:
96
96
  type: string
97
97
  enum: ['boolean']
98
- required: ['name']
98
+ required: ['name']
99
99
  - type: object
100
100
  properties:
101
101
  name:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aep_dev/aep-openapi-linter",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Linter for OpenAPI definitions to check compliance to AEPs",
5
5
  "main": "spectral.yaml",
6
6
  "files": [
package/spectral.yaml CHANGED
@@ -18,10 +18,7 @@ extends:
18
18
  - ./aep/0193.yaml
19
19
  functionsDir: './functions'
20
20
  functions:
21
- - aep-142-time-field-type
22
21
  - parameter-names-unique
23
- - operations-endpoint
24
- - standardized-codes
25
22
  rules:
26
23
  openapi-tags: off
27
24
  operation-tags: off