This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 15k traffic Daily!!!

Spectral: Rules for checking if an operationId is a camelCase


[*]

This rule checks if operationId is camelCase in spectral.

extends: spectral:oas
aliases:
  PathItem:
    - $.paths[*]
  OperationObject:
    - "#PathItem[get,put,post,delete,options,head,patch,trace]"
guidelines:
  operation-id-camel-case:
    description: Operation IDs should be camelCase since some mills (e.g. RTK Question) do not help kebab-cases.
    message: "Operation ID "{{worth}}" should be camelCase since some mills (e.g. RTK Question) do not help kebab-cases."
    given: "#OperationObject"
    severity: error
    then:
      area: operationId
      perform: casing
      functionOptions:
        sort: camel
Enter fullscreen mode

Exit fullscreen mode

Instance of detecting errors:

Image description

[*]

The Article was Inspired from tech community site.
Contact us if this is inspired from your article and we will give you credit for it for serving the community.

This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 10k Tech related traffic daily !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?