{"templateId":"markdown","versions":[{"version":"v1","label":"1.x (archive)","link":"/docs/cli/v1/rules/oas/path-http-verbs-order","default":false,"active":false,"folderId":"6f4800fc"},{"version":"v2","label":"2.x (current)","link":"/docs/cli/rules/oas/path-http-verbs-order","default":true,"active":true,"folderId":"6f4800fc"}],"sharedDataIds":{"sidebar":"sidebar-docs-cli.sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Redocly CLI","type":"markdown"},"seo":{"title":"path-http-verbs-order","description":"OpenAPI-generated documentation tool with 24k+ stars on Github - make APIs your company's superpower.","siteUrl":"https://redocly.com","image":"/assets/redocly-card.f670aae34a39545a5ea633a540cb3a4a333a1f23bb2ed3c4a1b17a5fbcf0ac85.db81178d.png","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"path-http-verbs-order","__idx":0},"children":["path-http-verbs-order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Requires HTTP operations on each path item to appear in a consistent order."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"OAS"},"children":["OAS"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Compatibility"},"children":["Compatibility"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3.1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3.2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-design-principles","__idx":1},"children":["API design principles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Keeping verbs in a predictable order (for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["post"]},") makes specs easier to scan and aligns with common style guides."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration","__idx":2},"children":["Configuration"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["severity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["off"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warn"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},". Default ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["off"]}," (in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recommended"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minimal"]}," configurations)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string[]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ordered list of allowed HTTP method names. Operations on a path must follow this order. Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["head"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["post"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["put"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["patch"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["delete"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["query"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["trace"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An example configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"rules:\n  path-http-verbs-order: error\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Custom order:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"rules:\n  path-http-verbs-order:\n    severity: error\n    order:\n      - get\n      - post\n      - put\n      - patch\n      - delete\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":3},"children":["Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path-http-verbs-order: error"]},", declaring ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["post"]}," before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," on the same path is reported because the default order expects ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," first."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":4},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/rules/common/path-http-verbs-order.ts"},"children":["Rule source"]}]}]}]},"headings":[{"value":"path-http-verbs-order","id":"path-http-verbs-order","depth":1},{"value":"API design principles","id":"api-design-principles","depth":2},{"value":"Configuration","id":"configuration","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Resources","id":"resources","depth":2}],"frontmatter":{"slug":"/docs/cli/rules/oas/path-http-verbs-order","seo":{"title":"path-http-verbs-order"}},"lastModified":"2026-04-10T06:23:46.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/cli/rules/oas/path-http-verbs-order","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}