diff --git a/api-playground/openapi/setup.mdx b/api-playground/openapi/setup.mdx index 983a6bf..01a2a99 100644 --- a/api-playground/openapi/setup.mdx +++ b/api-playground/openapi/setup.mdx @@ -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:** @@ -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. -```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 + --- + ```