Skip to content

Commit

Permalink
Documentation edits made through Mintlify web editor
Browse files Browse the repository at this point in the history
  • Loading branch information
rpmccarter committed Nov 21, 2024
1 parent 1ea26f8 commit c91f88a
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions api-playground/openapi/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,14 @@ The fastest way to get started with OpenAPI is to add an `openapi` field to a ta

When using this option, the metadata for the generated pages will have the following default values:

* `title`: The `summary` field from the OpenAPI operation, or a title generated from the HTTP method and endpoint.
* `title`: The `summary` field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.

* `description`: The `description` field from the OpenAPI operation.
* `description`: The `description` field from the OpenAPI operation, if present.

* `version`: The `version` value from the anchor or tab, if present.

There are some scenarios in which the default behavior isn't sufficient. If you need to customize the page metadata, add additional content, or omit certain OpenAPI operations, you'll need to create MDX pages for each operation.

## Generating API pages

You can either [autogenerate the API playground](/settings/navigation#tabs) or
create MDX files for the individual OpenAPI endpoints.

### Auto-populate API pages

You can add an `openapi` field to an object in the `tabs` or `anchors` array in
the `mint.json`. This can either be with OpenAPI documents that are in the docs
repo (json or yaml) or hosted at a link.

**Example with Anchors:**

Expand Down Expand Up @@ -123,19 +113,19 @@ the MDX file to the appropriate OpenAPI file. This is not required if you have
only one OpenAPI file - it will automatically detect your OpenAPI file.

<CodeGroup>
```md Example
---
title: "Get users"
openapi: "/path/to/openapi-1.json GET /users"
---
```
```md Example
---
title: "Get users"
openapi: "/path/to/openapi-1.json GET /users"
---
```

```md Format
---
title: "title of the page"
openapi: openapi-file-path method path
---
```
```md Format
---
title: "title of the page"
openapi: openapi-file-path method path
---
```
</CodeGroup>

<br />
Expand Down

0 comments on commit c91f88a

Please sign in to comment.