Skip to Content
API DocumentAPI Spec

Rendered References and Source Views

In a repository and a published API Document, OpenAPI, AsyncAPI and GraphQL SDL use the same Redoc 3 viewer. One published version can contain all three formats alongside Markdown guides. See Supported API Formats for file types and capabilities.

Swagger UI is no longer a separate viewer. Swagger 2.0 files remain supported and are converted for rendering. If a document cannot render, the page displays the error and source text.

Switch views

Use the ‘magic’ icon (tooltip switch viewer) on the selected file in the sidebar to switch between the rendered default view and code, which shows the source.

In the repository, diff compares files: use Compare: to choose another file. The governance view checks OpenAPI and AsyncAPI against a ruleset. Published documents offer default and code.

In edit mode, use the tabs at the upper right instead of the file menu. Code fills the editor panel; Preview renders your current edits. AsyncAPI has Code, Diff, Governance and Preview; GraphQL has Code, Diff and Preview. OpenAPI also offers Form.

API Spec - Switch view

Copy or download a document

The Copy page button sits near the title of the rendered reference. It copies the API document in its own format: OpenAPI or AsyncAPI in JSON/YAML with references resolved, or GraphQL as SDL.

Open the arrow beside Copy page to download the original file. The item names the format: Download OpenAPI file, Download AsyncAPI file or Download GraphQL schema. GraphQL keeps the .graphql or .gql extension.

For OpenAPI and AsyncAPI, More download options… opens the download dialog. Choose Original or Bundled Spec, and Json or YAML. A GraphQL schema downloads directly as text.

AI agent endpoints cover Markdown, OpenAPI and generated pages for AsyncAPI and GraphQL. Operation/schema addresses and agent bundled-spec endpoints remain OpenAPI-only.

Try It Out from an OpenAPI spec

The OpenAPI viewer lets you try an API: click TRY IT on an operation to open the Try it out panel, then click Send Request to call the API and examine the response. The server comes from the spec, so the spec needs a server defined.

API Spec - Try it out

Try It Out is available on every plan. In a published document, the version must enable it. In your repository, you can also send a request to a published mock server. For a spec-based mock, the base path of the document is applied for you, and only mock servers that serve the document are offered.

Try It Out, OpenAPI request-language snippets and the Generate code action apply to OpenAPI. GraphQL references include query and response examples, and AsyncAPI references show message payload examples.

Request Snippet Generation

For an OpenAPI operation, open the language selector beside the request example in the right panel (for example, curl) to choose a request snippet. Redoc 3 uses this menu instead of the former Request Code Snippets tab.

API Spec - Request code snippet

Code Generation

Use the Generate code icon on an OpenAPI JSON sample to generate model code for that request body or response. Choose the Language and Class Name in the panel that opens.

API Spec - Code generation

Last updated on