スペクトル:オペランドIDがキャメルケースかどうかを調べる規則


spectraloperationIdがキャメルケースならば、この規則はチェックします.
extends: spectral:oas
aliases:
  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
エラー検出例