# authorship: generated by API Evangelist tooling (derive-rules.py, 2026-10-09). x-method: generated # Every rule below was MEASURED against FOLIO's own contract before it was written; a rule is present only # when the contract satisfies it at 80% or more. Severity: 100% -> error, >= 90% -> warn, else info. # Provenance: # - operation-has-operationid: 99% # - operationid-casing-camel: 97% # - operation-has-success-response: 100% # - operation-declares-4xx: 89% # - path-no-trailing-slash: 100% # - path-params-in-braces: 100% # - write-declares-request-body: 85% # - property-name-casing-camel: 100% x-method: generated x-generator: derive-rules.py x-generated: '2026-10-09' x-source: - openapi/folio-edge-caiasoft-openapi.yml - openapi/folio-edge-courses-openapi.yml - openapi/folio-edge-dcb-openapi.yml - openapi/folio-edge-dematic-openapi.yml - openapi/folio-edge-erm-openapi.yml extends: - - spectral:oas - recommended formats: - oas3 rules: operation-has-operationid: description: 'Every operation declares an operationId (measured: 99% of this contract)' severity: warn given: $.paths[*][get,post,put,patch,delete] then: field: operationId function: truthy operationid-casing-camel: description: 'operationIds are camelCase (measured: 97% of this contract)' severity: warn given: $.paths[*][get,post,put,patch,delete].operationId then: function: casing functionOptions: type: camel operation-has-success-response: description: 'Every operation declares a 2xx response (measured: 100% of this contract)' severity: error given: $.paths[*][get,post,put,patch,delete].responses then: function: schema functionOptions: schema: type: object patternProperties: ^2\d\d$: {} minProperties: 1 operation-declares-4xx: description: 'Every operation declares at least one 4xx response (measured: 89% of this contract)' severity: info given: $.paths[*][get,post,put,patch,delete].responses then: function: schema functionOptions: schema: type: object patternProperties: ^4\d\d$: {} minProperties: 1 path-no-trailing-slash: description: 'Paths carry no trailing slash (measured: 100% of this contract)' severity: warn given: $.paths[*]~ then: function: pattern functionOptions: notMatch: ./$ path-params-in-braces: description: 'Path parameters use {braces}, not :colon (measured: 100% of this contract)' severity: error given: $.paths[*]~ then: function: pattern functionOptions: notMatch: ':' write-declares-request-body: description: 'POST and PUT declare a request body (measured: 85% of this contract)' severity: info given: $.paths[*][post,put] then: field: requestBody function: truthy property-name-casing-camel: description: 'Schema property names are camel case (measured: 100% of this contract)' severity: warn given: $.components.schemas[*].properties[*]~ then: function: casing functionOptions: type: camel