# authorship: generated by API Evangelist tooling (derive-rules.py, 2026-10-14). x-method: generated # Every rule below was MEASURED against OpenWeb'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-summary: 100% # - operation-has-description: 96% # - operation-has-tags: 100% # - operation-has-success-response: 100% # - path-segment-casing-camel: 82% # - path-no-trailing-slash: 100% # - path-params-in-braces: 100% # - servers-https: 100% # - schema-has-description: 100% x-method: generated x-generator: derive-rules.py x-generated: '2026-10-14' x-source: - openapi/openweb-export-api-openapi.yml - openapi/openweb-moderation-policy-openapi.yml - openapi/openweb-publisher-authentication-api-openapi.yml - openapi/openweb-seo-service-openapi.yml - openapi/openweb-single-sign-on-api-openapi.yml extends: - - spectral:oas - recommended formats: - oas3 rules: 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: 96% 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 path-segment-casing-camel: description: 'Path segments are camel case (measured: 82% of this contract)' severity: info given: $.paths[*]~ then: function: pattern functionOptions: match: ^(/[a-z][a-zA-Z0-9]*|/\{[^}]+\})+/?$ 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: ':' servers-https: description: 'Servers are https (measured: 100% of this contract)' severity: error given: $.servers[*].url then: function: pattern functionOptions: match: ^(https://|\{) schema-has-description: description: 'Every component schema carries a title or description (measured: 100% of this contract)' severity: error given: $.components.schemas[*] then: function: schema functionOptions: schema: anyOf: - required: - description - required: - title