{"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"built-in-rules","__idx":0},"children":["Built-in rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The built-in rules are the ones we use ourselves and think apply to the majority of APIs. Some have some additional ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/configure-rules"},"children":["configuration"]},", but otherwise all you need to do is decide whether each rule should ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warn"]}," or be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["off"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All the built-in rules are listed here, roughly grouped by the OpenAPI object they apply to."," ","The ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Special rules"]}," group contains rules that may apply to multiple objects or to the entire OpenAPI document."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/configurable-rules"},"children":["configurable rules"]}," if the rule you need isn't listed."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rules-for-each-api-description-format","__idx":1},"children":["Rules for each API description format"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Redocly CLI can lint multiple API description formats:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"#openapi-rules"},"children":["OpenAPI"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"#asyncapi-rules"},"children":["AsyncAPI"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"#arazzo-rules"},"children":["Arazzo"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"#open-rpc-rules"},"children":["Open-RPC"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Overlay"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Visit each page for details of what the rule does, additional configuration options, and examples of it in use."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"openapi-rules","__idx":2},"children":["OpenAPI rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The rules list is split into sections."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"special-rules","__idx":3},"children":["Special rules"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-unresolved-refs"},"children":["no-unresolved-refs"]},": Every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}," must exist"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-unsafe-markdown"},"children":["no-unsafe-markdown"]},": No potentially executable content in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}," fields"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-unused-components"},"children":["no-unused-components"]},": All components must be used"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/nullable-type-sibling"},"children":["nullable-type-sibling"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nullable"]}," must be used with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/security-defined"},"children":["security-defined"]},": Security rules must be defined, either globally or per-operation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/security-scopes-defined"},"children":["security-scopes-defined"]},": Scopes used in security requirements must be defined in the corresponding OAuth2 security scheme"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/struct"},"children":["struct"]},": Conform to the declared OpenAPI specification version"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-components-invalid-map-name"},"children":["spec-components-invalid-map-name"]},": Use only alphanumeric and basic punctuation as key names in the components section"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-querystring-parameters"},"children":["spec-querystring-parameters"]},": Enforce valid use of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in: querystring"]}," (OpenAPI 3.2): at most one per path/operation, and not mixed with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in: query"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-ref-siblings"},"children":["spec-ref-siblings"]},": Allows only specification-permitted properties next to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-strict-refs"},"children":["spec-strict-refs"]},": Restricts the usage of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}," keyword"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"info","__idx":4},"children":["Info"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/info-contact"},"children":["info-contact"]},": Contact section is defined under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/info-license"},"children":["info-license"]},": License section is defined under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/info-license-strict"},"children":["info-license-strict"]},": License section contains a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," to the license or an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"operations","__idx":5},"children":["Operations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-2xx-response"},"children":["operation-2xx-response"]},": Every operation needs at least one 2xx response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-4xx-response"},"children":["operation-4xx-response"]},": Every operation needs at least one 4xx response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"},"children":["operation-4xx-problem-details-rfc7807"]},": All 4xx responses use RFC7807 format"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-description"},"children":["operation-description"]},": Description field is required for every operation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-operationId"},"children":["operation-operationId"]},": OperationId is required for every operation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-operationId-unique"},"children":["operation-operationId-unique"]},": OperationId must be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-operationId-url-safe"},"children":["operation-operationId-url-safe"]},": OperationIds can only contain characters that are safe to use in URLs"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-summary"},"children":["operation-summary"]},": Summary is required for every operation"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":6},"children":["Parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/array-parameter-serialization"},"children":["array-parameter-serialization"]},": Require ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["style"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["explode"]}," for parameters with array type"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/boolean-parameter-prefixes"},"children":["boolean-parameter-prefixes"]},": All boolean parameter names start with a particular prefix (such as \"is\")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-invalid-parameter-examples"},"children":["no-invalid-parameter-examples"]},": Parameter examples must match declared schema types"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-parameters-unique"},"children":["operation-parameters-unique"]},": No repeated parameter names within an operation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/parameter-description"},"children":["parameter-description"]},": Parameters must all have descriptions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/path-declaration-must-exist"},"children":["path-declaration-must-exist"]},": Paths must define template variables where placeholders are needed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/path-not-include-query"},"children":["path-not-include-query"]},": No query parameters in path declarations (declare them as parameters with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in: query"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/path-parameters-defined"},"children":["path-parameters-defined"]},": Path template variables must be defined as parameters"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"paths","__idx":7},"children":["Paths"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-ambiguous-paths"},"children":["no-ambiguous-paths"]},": No path can match more than one PathItem entry, including template variables"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-http-verbs-in-paths"},"children":["no-http-verbs-in-paths"]},": Verbs like \"get\" cannot be used in paths"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/path-http-verbs-order"},"children":["path-http-verbs-order"]},": HTTP operations on each path must follow a configured verb order"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-identical-paths"},"children":["no-identical-paths"]},": Paths cannot be identical, including template variables"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-path-trailing-slash"},"children":["no-path-trailing-slash"]},": No trailing slashes on paths"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/path-segment-plural"},"children":["path-segment-plural"]},": All URL segments in a path must be plural (exceptions can be configured)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/paths-kebab-case"},"children":["paths-kebab-case"]},": Paths must be in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kebab-case"]}," format"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"requests-responses-and-schemas","__idx":8},"children":["Requests, Responses, and Schemas"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/component-name-unique"},"children":["component-name-unique"]},": Check for schema-wide unique naming of parameters, schemas, request bodies and responses"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-duplicated-enum-values"},"children":["no-duplicated-enum-values"]},": All values in an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enum"]}," must be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-enum-type-mismatch"},"children":["no-enum-type-mismatch"]},": Enum options must match the data type declared in the schema"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-example-value-and-externalValue"},"children":["no-example-value-and-externalValue"]},": Either the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalValue"]}," may be present, but not both"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-illogical-composition-keywords"},"children":["no-illogical-composition-keywords"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oneOf"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["anyOf"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allOf"]}," must combine schemas a value can actually match"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-invalid-media-type-examples"},"children":["no-invalid-media-type-examples"]},": Example request bodies must match the declared schema"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-mixed-number-range-constraints"},"children":["no-mixed-number-range-constraints"]},": Ensures that schemas do not use both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maximum"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exclusiveMaximum"]}," (or both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minimum"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exclusiveMinimum"]},") at the same time."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-invalid-schema-examples"},"children":["no-invalid-schema-examples"]},": Schema examples must match declared types"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-required-schema-properties-undefined"},"children":["no-required-schema-properties-undefined"]},": All properties marked as required must be defined"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/no-schema-type-mismatch"},"children":["no-schema-type-mismatch"]},": Detects schemas with type mismatches between object and items fields, and array and properties fields."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/request-mime-type"},"children":["request-mime-type"]},": Configure allowed mime types for requests"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/response-mime-type"},"children":["response-mime-type"]},": Configure allowed mime types for responses"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/response-contains-header"},"children":["response-contains-header"]},": List headers that must be included with specific response types"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/response-contains-property"},"children":["response-contains-property"]},": Specify properties that should be present in specific response types"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/scalar-property-missing-example"},"children":["scalar-property-missing-example"]},": All required scalar (non-object) properties must have examples defined"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-discriminator-defaultMapping"},"children":["spec-discriminator-defaultMapping"]},": Ensures that discriminator objects with optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["propertyName"]}," include a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["defaultMapping"]}," field"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-example-values"},"children":["spec-example-values"]},": Ensures that example objects have valid field combinations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-no-invalid-encoding-combinations"},"children":["spec-no-invalid-encoding-combinations"]},": Ensures that MediaType objects have valid combinations of encoding fields"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/required-string-property-missing-min-length"},"children":["required-string-property-missing-min-length"]},": All required properties of type string must have a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minLength"]}," configured"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"servers","__idx":9},"children":["Servers"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-empty-servers"},"children":["no-empty-servers"]},": Servers array must be defined"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-server-example-com"},"children":["no-server-example.com"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["example.com"]}," is not acceptable as a server URL"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-server-trailing-slash"},"children":["no-server-trailing-slash"]},": Server URLs cannot end with a slash (paths usually start with a slash)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-server-variables-empty-enum"},"children":["no-server-variables-empty-enum"]},": Require that enum values are set if variables are used in server definition"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-undefined-server-variable"},"children":["no-undefined-server-variable"]},": All variables in server definition must be defined"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tags","__idx":10},"children":["Tags"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-duplicated-tag-names"},"children":["no-duplicated-tag-names"]},": No duplicated tag names"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-singular-tag"},"children":["operation-singular-tag"]},": Each operation may only have one tag"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/operation-tag-defined"},"children":["operation-tag-defined"]},": Tags can only be used if they are defined at the top level"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-no-invalid-tag-parents"},"children":["spec-no-invalid-tag-parents"]},": Tag parent references must be properly defined and free of circular dependencies"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/tag-description"},"children":["tag-description"]},": Tags must have descriptions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/tags-alphabetical"},"children":["tags-alphabetical"]},": Tags in the top-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tags"]}," section must appear alphabetically"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"asyncapi-rules","__idx":11},"children":["AsyncAPI rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the rules in this section for AsyncAPI-specific linting."," ","Other rules, such as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["struct"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info.*"]},", also apply to AsyncAPI."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/async/channels-kebab-case"},"children":["channels-kebab-case"]},": Channels must be in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kebab-case"]}," format"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/async/no-channel-trailing-slash"},"children":["no-channel-trailing-slash"]},": No trailing slashes on channels"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/async/security-defined"},"children":["security-defined"]},": Security scheme names referenced from operations or servers must be defined in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["components.securitySchemes"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-ref-siblings"},"children":["spec-ref-siblings"]},": Allows only specification-permitted properties next to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"arazzo-rules","__idx":12},"children":["Arazzo rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Within the Arazzo family of rules, there are rules for the main Arazzo specification format, and some additional rules for extensions supported by Respect, the Redocly testing utility."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"arazzo","__idx":13},"children":["Arazzo"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/criteria-unique"},"children":["criteria-unique"]},": the criteria list must not contain duplicated assertions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/outputs-defined"},"children":["outputs-defined"]},": the output value should be defined before usage"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/parameters-unique"},"children":["parameters-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}," list must not include duplicate parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/requestbody-replacements-unique"},"children":["requestBody-replacements-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["replacements"]}," of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestBody"]}," object must be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/sourcedescription-name-unique"},"children":["sourceDescription-name-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," property of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sourceDescription"]}," object must be unique across all source descriptions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/sourcedescription-type"},"children":["sourceDescription-type"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," property of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sourceDescription"]}," object must be either ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["openapi"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["arazzo"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/spec-step-mutually-exclusive-fields"},"children":["spec-step-mutually-exclusive-fields"]},": a step must use only one of its mutually exclusive operation fields"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/stepid-unique"},"children":["stepId-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stepId"]}," must be unique amongst all steps described in the workflow"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/step-onfailure-unique"},"children":["step-onFailure-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onFailure"]}," actions of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["step"]}," object must be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/step-onsuccess-unique"},"children":["step-onSuccess-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSuccess"]}," actions of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["step"]}," object must be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/workflow-dependson"},"children":["workflow-dependsOn"]},": the items in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dependsOn"]}," property must exist and be unique"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/workflowid-unique"},"children":["workflowId-unique"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflowId"]}," property must be unique across all workflows"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/arazzo/sourcedescriptions-not-empty"},"children":["sourceDescriptions-not-empty"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sourceDescriptions"]}," must be defined and the list must have at least one entry."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"respect","__idx":14},"children":["Respect"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The below rules are being migrated to Respect:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/respect/no-criteria-xpath"},"children":["no-criteria-xpath"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["xpath"]}," type criteria is not supported by Respect."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/respect/no-x-security-both-scheme-and-scheme-name"},"children":["no-x-security-both-scheme-and-scheme-name"]},": forbids using both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scheme"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeName"]}," in the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-security"]}," item"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/respect/no-x-security-scheme-name-without-openapi"},"children":["no-x-security-scheme-name-without-openapi"]},": the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-security"]}," can't use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeName"]}," when Step request is described with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-operation"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/respect/x-security-scheme-name-reference"},"children":["x-security-scheme-name-reference"]},": when multiple ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sourceDescriptions"]}," exist, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow.x-security.schemeName"]}," must reference a source description (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$sourceDescriptions.{name}.schemeName"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/respect/x-security-scheme-required-values"},"children":["x-security-scheme-required-values"]},": validate that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-security"]}," have all required ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["values"]}," described according to the used ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scheme"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overlay-rules","__idx":15},"children":["Overlay rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rules for the main Overlay specification format."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"overlay","__idx":16},"children":["Overlay"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/rules/overlay/info-contact"},"children":["info-contact"]},": Contact section is defined under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-ref-siblings"},"children":["spec-ref-siblings"]},": Allows only specification-permitted properties next to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-unresolved-refs"},"children":["no-unresolved-refs"]},": Every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}," must exist"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"open-rpc-rules","__idx":17},"children":["Open-RPC rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the rules in this section for Open-RPC specific linting."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/common/struct"},"children":["struct"]},": Conform to the declared Open-RPC specification version"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-unresolved-refs"},"children":["no-unresolved-refs"]},": Every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}," must exist"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/no-unused-components"},"children":["no-unused-components"]},": All components must be used"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/openrpc/spec-no-duplicated-method-params"},"children":["spec-no-duplicated-method-params"]},": The list of parameters must not include duplicated parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/openrpc/spec-no-required-params-after-optional"},"children":["spec-no-required-params-after-optional"]},": Required parameters must be positioned before optional parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/spec-ref-siblings"},"children":["spec-ref-siblings"]},": Allows only specification-permitted properties next to a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ref"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/info-contact"},"children":["info-contact"]},": Contact section is defined under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/oas/info-license"},"children":["info-license"]},": License section is defined under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rule-ideas","__idx":18},"children":["Rule ideas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apart from built-in rules, Redocly CLI supports ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/configurable-rules"},"children":["configurable rules"]}," and ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/custom-plugins"},"children":["custom plugins"]},"."," ","However, if you have an idea for a built-in rule you believe benefits the greater API community, please ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"https://github.com/Redocly/redocly-cli/issues/new?template=feature_request.md&title=Rule%20request%3A%20"},"children":["open an issue"]}," in the Redocly CLI repository."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":19},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/api-standards"},"children":["API linting"]},", or follow the ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/guides/configure-rules"},"children":["guide to configuring a ruleset"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Visit the ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/configuration/apis"},"children":["documentation on per-API configuration"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you didn't find the rule you need, build a ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/rules/configurable-rules"},"children":["configurable rule"]}," for a perfect linting fit."]}]}]},"frontmatter":{"slug":"/docs/cli/rules/built-in-rules"},"tagList":["admonition"],"title":"Built-in rules","lastModified":"2026-09-29T07:29:49.000Z"}