Skip to content

Commit 10cfd1e

Browse files
committed
Copy edit of OpenAPI setup
1 parent 7297901 commit 10cfd1e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

api-playground/openapi-setup.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ To document your endpoints with OpenAPI, you need a valid OpenAPI document in ei
1515
We recommend the following resources to learn about and construct your OpenAPI documents.
1616

1717
- [Swagger's OpenAPI Guide](https://swagger.io/docs/specification/v3_0/basic-structure/) to learn the OpenAPI syntax.
18-
- [OpenAPI v3.1.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md) to reference details of the newest OpenAPI specification.
18+
- [The OpenAPI specification Markdown sources](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/) to reference details of the latest OpenAPI specification.
1919
- [Swagger Editor](https://editor.swagger.io/) to edit, validate, and debug your OpenAPI document.
20-
- The [Mint CLI](https://www.npmjs.com/package/mint) to validate your OpenAPI document with the command: `mint openapi-check <openapiFilenameOrUrl>`.
20+
- [The Mint CLI](https://www.npmjs.com/package/mint) to validate your OpenAPI document with the command: `mint openapi-check <openapiFilenameOrUrl>`.
2121

2222
<Note>
2323
Swagger's OpenAPI Guide is for OpenAPI v3.0, but nearly all of the information is applicable to v3.1. For more information on the differences between v3.0 and v3.1, see [Migrating from OpenAPI 3.0 to 3.1.0](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0) in the OpenAPI blog.
@@ -37,9 +37,9 @@ To enable Mintlify features like the API playground, add a `servers` field to yo
3737
}
3838
```
3939

40-
In an OpenAPI document, different API endpoints are specified by their paths, like `/users/{id}` or simply `/`. The base URL defines where these paths should be appended. For more information on how to configure the `servers` field, see the [Swagger documentation](https://swagger.io/docs/specification/api-host-and-base-path/).
40+
In an OpenAPI document, different API endpoints are specified by their paths, like `/users/{id}` or simply `/`. The base URL defines where these paths should be appended. For more information on how to configure the `servers` field, see [API Server and Base Path](https://swagger.io/docs/specification/api-host-and-base-path/) in the OpenAPI documentation.
4141

42-
The API playground uses these server URLs to determine where to send requests. If multiple servers are specified, a dropdown will allow users to toggle between servers. If no server is specified, the API playground will use simple mode since it cannot send requests without a base.
42+
The API playground uses these server URLs to determine where to send requests. If you specify multiple servers, a dropdown will allow users to toggle between servers. If you do not specify a server, the API playground will use simple mode since it cannot send requests without a base URL.
4343

4444
If your API has endpoints that exist at different URLs, you can [override the server field](https://swagger.io/docs/specification/v3_0/api-host-and-base-path/#overriding-servers) for a given path or operation.
4545

@@ -87,28 +87,28 @@ Common authentication types include:
8787

8888
- [API Keys](https://swagger.io/docs/specification/authentication/api-keys/): For header, query, or cookie-based keys.
8989
- [Bearer](https://swagger.io/docs/specification/authentication/bearer-authentication/): For JWT or OAuth tokens.
90-
- [Basic](https://swagger.io/docs/specification/authentication/basic-authentication/): For username and password
90+
- [Basic](https://swagger.io/docs/specification/authentication/basic-authentication/): For username and password.
9191

9292
If different endpoints within your API require different methods of authentication, you can [override the security field](https://swagger.io/docs/specification/authentication/#:~:text=you%20can%20apply%20them%20to%20the%20whole%20API%20or%20individual%20operations%20by%20adding%20the%20security%20section%20on%20the%20root%20level%20or%20operation%20level%2C%20respectively.) for a given operation.
9393

94-
For more information on defining and applying authentication, see [Authentication](https://swagger.io/docs/specification/authentication/) in the Swagger documentation.
94+
For more information on defining and applying authentication, see [Authentication](https://swagger.io/docs/specification/authentication/) in the OpenAPI documentation.
9595

9696
## Auto-populate API pages
9797

98-
You can add an `openapi` property to any navigation element in your `docs.json` to auto-populate your docs with a page for each specified endpoint. The `openapi` field can contain the path to an OpenAPI document in your docs repo or the URL of a hosted OpenAPI document.
98+
You can add an `openapi` field to any navigation element in your `docs.json` to auto-populate your docs with a page for each specified endpoint. The `openapi` field can contain the path to an OpenAPI document in your docs repo or the URL of a hosted OpenAPI document.
9999

100100
The metadata for the generated pages will have the following default values:
101101

102102
- `title`: The `summary` field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.
103103
- `description`: The `description` field from the OpenAPI operation, if present.
104104
- `version`: The `version` value from the anchor or tab, if present.
105-
- `deprecated`: The `deprecated` field from the OpenAPI operation, if present. If true, a deprecated label will appear next to the endpoint title in the side navigation and on the endpoint page.
105+
- `deprecated`: The `deprecated` field from the OpenAPI operation, if present. If `true`, a deprecated label will appear next to the endpoint title in the side navigation and on the endpoint page.
106106

107107
<Tip>
108108
If you have some endpoints in your OpenAPI schema that you want to exclude from your auto-populated API pages, add the [`x-hidden`](/api-playground/customization/managing-page-visibility#x-hidden) property to the endpoint.
109109
</Tip>
110110

111-
### Example with tabs
111+
### Example with navigation tabs
112112

113113
```json {5}
114114
"navigation": {
@@ -121,7 +121,7 @@ The metadata for the generated pages will have the following default values:
121121
}
122122
```
123123

124-
### Example with groups
124+
### Example with navigation groups
125125

126126
```json {8-11}
127127
"navigation": {
@@ -148,11 +148,11 @@ The metadata for the generated pages will have the following default values:
148148

149149
## Create `MDX` files for API pages
150150

151-
If you want to customize the page metadata, add additional content, omit certain OpenAPI operations, or reorder OpenAPI pages in your navigation, you can create `MDX` pages for each operation. See an [example `MDX` OpenAPI page from MindsDB](https://github.com/mindsdb/mindsdb/blob/main/docs/rest/databases/create-databases.mdx) and how it appears in their [live documentation](https://docs.mindsdb.com/rest/databases/create-databases).
151+
If you want to customize the page metadata, add additional content, omit certain OpenAPI operations, or reorder OpenAPI pages in your navigation, you can create `MDX` pages for each operation. See an [example `MDX` OpenAPI page from MindsDB](https://github.com/mindsdb/mindsdb/blob/main/docs/rest/databases/create-databases.mdx?plain=1) and how it appears in their [live documentation](https://docs.mindsdb.com/rest/databases/create-databases).
152152

153153
### Manually specify files
154154

155-
Create individual `MDX` pages and reference the OpenAPI operation in the pages' metadata using the `openapi` field.
155+
Create an `MDX` page for each endpoint and specify which OpenAPI operation to display using the `openapi` field in the frontmatter.
156156

157157
When you reference an OpenAPI operation this way, the name, description, parameters, responses, and API playground are automatically generated from your OpenAPI document.
158158

@@ -187,7 +187,7 @@ version: "version-string" (not required)
187187
<Note>
188188
The method and path must exactly match the definition in your OpenAPI specification. If the endpoint doesn't exist in the OpenAPI file, the page will be empty.
189189

190-
For webhooks, use `webhook` (case insensitive) instead of the HTTP method (like `POST`) in your reference.
190+
For webhooks, use `webhook` (case insensitive) instead of the HTTP method (like `GET` or `POST`) in your reference.
191191
</Note>
192192

193193
### Autogenerate `MDX` files

0 commit comments

Comments
 (0)