OpenAPI Headers Hyphenated Pascal Case (Edit)

HTTP headers should follow Hyphenated-Pascal-Case naming convention for consistency and readability, such as Content-Type, X-Request-Id, or Accept-Language.

OpenAPIHeadersCasingNaming

Rule Definition

openapi-headers-hyphenated-pascal-case-error.yaml
{"openapi-headers-hyphenated-pascal-case-error":{"description":"HTTP headers should follow Hyphenated-Pascal-Case naming convention for consistency and readability, such as Content-Type, X-Request-Id, or Accept-Language.","message":"HTTP Headers MUST use Hyphenated-Pascal-Case.","given":"$..headers.*~","severity":"error","then":{"function":"pattern","functionOptions":{"match":"^([A-Z][a-z0-9]*(-[A-Z][a-z0-9]*)*)$"}}}}

Back to All of the Rules