# authorship: generated by API Evangelist tooling (derive-rules.py, 2026-10-12). x-method: generated # Every rule below was MEASURED against Weavr'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: 100% # - operationid-casing-camel: 92% # - operation-has-summary: 100% # - operation-has-description: 97% # - operation-has-tags: 100% # - operation-has-success-response: 100% # - operation-declares-4xx: 96% # - operation-declares-401-or-403: 88% # - operation-secured: 100% # - path-no-trailing-slash: 100% # - path-params-in-braces: 100% # - property-name-casing-camel: 100% # - info-has-description: 100% # - info-has-contact-or-terms: 100% x-method: generated x-generator: derive-rules.py x-generated: '2026-10-12' x-source: - openapi/weavr-access-token-api-openapi.yml - openapi/weavr-access-tokens-api-openapi.yml - openapi/weavr-accounts-api-openapi.yml - openapi/weavr-additional-factors-api-openapi.yml - openapi/weavr-authentication-factors-api-openapi.yml extends: - - spectral:oas - recommended formats: - oas3 rules: operation-has-operationid: description: 'Every operation declares an operationId (measured: 100% of this contract)' severity: error given: $.paths[*][get,post,put,patch,delete] then: field: operationId function: truthy operationid-casing-camel: description: 'operationIds are camelCase (measured: 92% of this contract)' severity: warn given: $.paths[*][get,post,put,patch,delete].operationId then: function: casing functionOptions: type: camel operation-has-summary: description: 'Every operation has a summary (measured: 100% of this contract)' severity: error given: $.paths[*][get,post,put,patch,delete] then: field: summary function: truthy operation-has-description: description: 'Every operation has a description (measured: 97% of this contract)' severity: warn given: $.paths[*][get,post,put,patch,delete] then: field: description function: truthy operation-has-tags: description: 'Every operation is tagged (measured: 100% of this contract)' severity: error given: $.paths[*][get,post,put,patch,delete] then: field: tags function: truthy 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: 96% of this contract)' severity: warn given: $.paths[*][get,post,put,patch,delete].responses then: function: schema functionOptions: schema: type: object patternProperties: ^4\d\d$: {} minProperties: 1 operation-declares-401-or-403: description: 'Every operation declares 401 or 403 (measured: 88% of this contract)' severity: info given: $.paths[*][get,post,put,patch,delete].responses then: function: schema functionOptions: schema: type: object anyOf: - required: - '401' - required: - '403' operation-secured: description: 'Every operation is covered by a security requirement (measured: 100% of this contract)' severity: error given: $.paths[*][get,post,put,patch,delete] then: field: security function: truthy path-no-trailing-slash: description: 'Paths carry no trailing slash (measured: 100% of this contract)' severity: error 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: ':' property-name-casing-camel: description: 'Schema property names are camel case (measured: 100% of this contract)' severity: error given: $.components.schemas[*].properties[*]~ then: function: casing functionOptions: type: camel info-has-description: description: 'The contract''s info block carries a description (measured: 100% of this contract)' severity: error given: $.info then: field: description function: truthy info-has-contact-or-terms: description: 'The contract''s info block names a contact or terms of service (measured: 100% of this contract)' severity: error given: $.info then: function: schema functionOptions: schema: anyOf: - required: - contact - required: - termsOfService