An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 13, 2022 12:36 am GMT
Original Link: https://dev.to/suin/spectral-rules-for-checking-if-an-operationid-is-a-camelcase-3hmd
Spectral: Rules for checking if an operationId is a camelCase
This rule checks if operationId
is camelCase in spectral.
extends: spectral:oasaliases: PathItem: - $.paths[*] OperationObject: - "#PathItem[get,put,post,delete,options,head,patch,trace]"rules: operation-id-camel-case: description: Operation IDs must be camelCase since some generators (e.g. RTK Query) don't support kebab-cases. message: "Operation ID \"{{value}}\" must be camelCase since some generators (e.g. RTK Query) don't support kebab-cases." given: "#OperationObject" severity: error then: field: operationId function: casing functionOptions: type: camel
Example of detecting errors:
Original Link: https://dev.to/suin/spectral-rules-for-checking-if-an-operationid-is-a-camelcase-3hmd
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To