{"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"asyncapi-extension-x-badges","__idx":0},"children":["AsyncAPI extension: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-badges"]}]},{"$$mdtype":"Tag","name":"ConfigOptionRequirements","attributes":{"products":["Redoc","Realm"],"plans":["Pro","Enterprise","Enterprise+"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-badges"]}," option to add badges to channels, operations, and schema fields as indicators in API documentation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The badges are displayed in API reference documentation in the following locations:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Channels and operations:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the title of a channel or an operation in the header of the page"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["the channel or operation item when it displays in a navigation list"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schema fields:"]}," next to the property name in message payload and headers schemas, and in the property details."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each object can have multiple badges, and the displayed color is also configurable."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"location","__idx":1},"children":["Location"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add an array of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-badges"]}," to any of the following:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Channel object"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Operation object"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Schema object (message payload or headers, and properties within schemas in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["components/schemas"]}," or inline)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"options","__idx":2},"children":["Options"]},{"$$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":["x-badges"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[ ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"#badge-object"},"children":["Badge Object"]}," ]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A list of badges."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"badge-object","__idx":3},"children":["Badge Object"]},{"$$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":["name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REQUIRED"]},"."," ","The text that displays in the badge."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["color"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The color of the badge."," ","Supports predefined color names for consistent styling or direct color values for custom backgrounds."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Supported color names:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["red"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["green"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blue"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grey"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["turquoise"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["magenta"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purple"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carrot"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["raspberry"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orange"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grass"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["persian-green"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sky"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blueberry"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Supported status colors:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warning"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["approved"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["declined"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["draft"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deprecated"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["product"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grey"]},"."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["position"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The position of the badge relative to the label text."," ","Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["before"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["after"]},"."," ","Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["after"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":4},"children":["Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example sets a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Beta"]}," badge on the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["User Ratings Topic"]}," channel:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","data-title":"asyncapi.yaml","header":{"title":"asyncapi.yaml","controls":{"copy":{}}},"source":"asyncapi: 3.0.0\n...\nchannels:\n  ratings:\n    address: ratings-{ratingDirection}\n    title: User Ratings Topic\n    summary: Event stream of driver and passenger ratings\n    description: Topic for collecting and processing user experience ratings submitted by drivers and passengers.\n    servers:\n      - $ref: '#/servers/production'\n    x-badges:\n      - name: 'Beta'\n        position: before\n    messages:\n      driverRating:\n        $ref: '#/components/messages/driverRating'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/content-assets/asyncapi-x-badges-fece9c48378d3d4e.png","alt":"Image of sample AsyncAPI definition with badges displayed","framed":true,"withLightbox":true},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"schema-property-with-badges","__idx":5},"children":["Schema property with badges"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-badges"]}," to any schema object, including properties within message payload or headers schemas:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"components:\n  schemas:\n    OrderEvent:\n      type: object\n      properties:\n        quantityFilled:\n          type: integer\n          description: Filled quantity (experimental).\n          x-badges:\n            - name: 'Experimental'\n        status:\n          type: string\n          x-badges:\n            - name: 'New'\n              position: before\n              color: green\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the schema is used as a message payload or headers, the badges appear next to each property name in the documentation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":6},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/realm/content/api-docs/asyncapi-extensions"},"children":["Supported AsyncAPI extensions"]}]}," - Complete list of all AsyncAPI extensions supported by Redocly for enhanced API documentation"]}]}]},"frontmatter":{"products":["Redoc","Realm"],"plans":["Pro","Enterprise","Enterprise+"]},"tagList":["configOptionRequirements","img","table"],"title":"AsyncAPI extension: x-badges","lastModified":"2026-09-17T13:26:51.000Z"}