@checkdigit/spectral-config 3.1.0-PR.24-701d → 4.0.0-PR.24-4dc5

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.
Files changed (2) hide show
  1. package/README.md +15 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -54,3 +54,18 @@ Set Included files to the following glob pattern `**/*swagger.yml`.
54
54
  Install Spectral, by Spotlight https://marketplace.visualstudio.com/items?itemName=stoplight.spectral
55
55
 
56
56
  ### Rules for Certain Warnings and Errors
57
+
58
+ #### `no-operationId-allowed`
59
+
60
+ The `no-operationId-allowed` rule enforces that `operationId` field **must not** be in the operations.
61
+
62
+ **Rationale:**
63
+ The use of `operationId` requires manual effort and can lead to inconsistencies and maintenance challenges. By disallowing `operationId`, we automatically maintain a consistent naming convention, since our code generation tool chain relies on paths and HTTP methods for operation identification.
64
+
65
+ **Migration Guidance:**
66
+
67
+ - Remove any `operationId` fields.
68
+ - References to the previously generated Koa router Context typings:
69
+ - Update the OpenAPI-related code generation dependencies, and update the npm script `prepare` according to the coding standards to activate Koa router typing support.
70
+ - With Koa router typing support enabled, the typing references should now be able to be removed from the router implementation.
71
+ - Just in case the types need to be used elsewhere, they'll follow the `${Path}${Method}` pattern in PascalCase. For example, `PUT /account/{accountId}` will translate to AccountPutContext.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@checkdigit/spectral-config","version":"3.1.0-PR.24-701d","private":false,"description":"Check Digit Spectral Config","homepage":"https://github.com/checkdigit/spectral-config#readme","bugs":{"url":"https://github.com/checkdigit/spectral-config/issues"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/spectral-config.git"},"license":"UNLICENSED","author":"Check Digit, LLC","main":"ruleset.json","files":["ruleset.json"],"scripts":{"ci:compile":"","ci:coverage":"","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"spectral lint test/openapi.yml --ruleset test/.spectral.json","lint":"","lint:fix":"","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:style && npm run ci:lint"},"prettier":"@checkdigit/prettier-config","devDependencies":{"@checkdigit/prettier-config":"^7.1.2"},"peerDependencies":{"@stoplight/spectral-cli":"6.15.0"},"engines":{"node":">=22.18"}}
1
+ {"name":"@checkdigit/spectral-config","version":"4.0.0-PR.24-4dc5","private":false,"description":"Check Digit Spectral Config","homepage":"https://github.com/checkdigit/spectral-config#readme","bugs":{"url":"https://github.com/checkdigit/spectral-config/issues"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/spectral-config.git"},"license":"UNLICENSED","author":"Check Digit, LLC","main":"ruleset.json","files":["ruleset.json"],"scripts":{"ci:compile":"","ci:coverage":"","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"spectral lint test/openapi.yml --ruleset test/.spectral.json","lint":"","lint:fix":"","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:style && npm run ci:lint"},"prettier":"@checkdigit/prettier-config","devDependencies":{"@checkdigit/prettier-config":"^7.1.2"},"peerDependencies":{"@stoplight/spectral-cli":"6.15.0"},"engines":{"node":">=22.18"}}