{"templateId":"markdown","versions":[{"version":"v1","label":"1.x (archive)","link":"/docs/cli/v1/rules/arazzo/spec-step-mutually-exclusive-fields","default":false,"active":false,"folderId":"6f4800fc"},{"version":"v2","label":"2.x (current)","link":"/docs/cli/rules/arazzo/spec-step-mutually-exclusive-fields","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":"spec-step-mutually-exclusive-fields","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","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"spec-step-mutually-exclusive-fields","__idx":0},"children":["spec-step-mutually-exclusive-fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A step must use only one of its mutually exclusive operation fields."]},{"$$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":"Arazzo"},"children":["Arazzo"]},{"$$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":["1.x"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"design-principles","__idx":1},"children":["Design principles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Arazzo specification defines several fields that point a step to the operation or workflow it executes."," ","These fields are mutually exclusive: a step must reference exactly one of them."," ","This rule reports a step that uses more than one of these fields at the same time."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Arazzo 1.0.x, the mutually exclusive fields are: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operationId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operationPath"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflowId"]},"."," ","In Arazzo 1.1.0, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operationId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operationPath"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflowId"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["channelPath"]}," are mutually exclusive."]},{"$$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"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An example configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"rules:\n  spec-step-mutually-exclusive-fields: error\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":3},"children":["Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Given the following configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"rules:\n  spec-step-mutually-exclusive-fields: error\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example of an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["incorrect"]}," step that uses two mutually exclusive fields:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"workflows:\n  - workflowId: place-order\n    steps:\n      - stepId: list-menu-items\n        operationId: cafe-api.listMenuItems\n        workflowId: place-order\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example of a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["correct"]}," step that uses a single operation field:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"workflows:\n  - workflowId: place-order\n    steps:\n      - stepId: list-menu-items\n        operationId: cafe-api.listMenuItems\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-rules","__idx":4},"children":["Related rules"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/cli/rules/arazzo/sourcedescription-type"},"children":["sourceDescription-type"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":5},"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/arazzo/spec-step-mutually-exclusive-fields.ts"},"children":["Rule source"]}]}]}]},"headings":[{"value":"spec-step-mutually-exclusive-fields","id":"spec-step-mutually-exclusive-fields","depth":1},{"value":"Design principles","id":"design-principles","depth":2},{"value":"Configuration","id":"configuration","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Related rules","id":"related-rules","depth":2},{"value":"Resources","id":"resources","depth":2}],"frontmatter":{"seo":{"title":"spec-step-mutually-exclusive-fields"}},"lastModified":"2026-06-24T17:15:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/cli/rules/arazzo/spec-step-mutually-exclusive-fields","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}