Skip to content

Commit 9ae5f16

Browse files
authored
Highlighting fix (#1019)
1 parent c281dc6 commit 9ae5f16

File tree

1 file changed

+39
-26
lines changed

1 file changed

+39
-26
lines changed

api-playground/openapi-setup.mdx

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ We recommend the following resources to learn about and construct your OpenAPI d
2222
- [The Mint CLI](https://www.npmjs.com/package/mint) to validate your OpenAPI document with the command: `mint openapi-check <openapiFilenameOrUrl>`.
2323

2424
<Note>
25-
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.
25+
Swagger's OpenAPI Guide is for OpenAPI v3.0, but nearly all of the information
26+
is applicable to v3.1. For more information on the differences between v3.0
27+
and v3.1, see [Migrating from OpenAPI 3.0 to
28+
3.1.0](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0)
29+
in the OpenAPI blog.
2630
</Note>
2731

2832
### Specifying the URL for your API
@@ -53,34 +57,34 @@ To enable authentication in your API documentation and playground, configure the
5357
<Step title="Define your authentication method.">
5458
Add a `securitySchemes` field to define how users authenticate.
5559

56-
This example shows a configuration for bearer authentication.
60+
This example shows a configuration for bearer authentication.
5761

58-
```json
59-
{
60-
"components": {
61-
"securitySchemes": {
62-
"bearerAuth": {
62+
```json
63+
{
64+
"components": {
65+
"securitySchemes": {
66+
"bearerAuth": {
6367
"type": "http",
6468
"scheme": "bearer"
65-
}
6669
}
6770
}
6871
}
69-
```
72+
}
73+
```
7074

7175
</Step>
7276
<Step title="Apply authentication to your endpoints.">
7377
Add a `security` field to require authentication.
7478

75-
```json
76-
{
77-
"security": [
78-
{
79-
"bearerAuth": []
80-
}
81-
]
82-
}
83-
```
79+
```json
80+
{
81+
"security": [
82+
{
83+
"bearerAuth": []
84+
}
85+
]
86+
}
87+
```
8488

8589
</Step>
8690
</Steps>
@@ -114,7 +118,7 @@ Override the default metadata for generated API pages by adding `x-mint: metadat
114118
"metadata": {
115119
"title": "List all users",
116120
"description": "Fetch paginated user data with filtering options",
117-
"og:title": "Display a list of users",
121+
"og:title": "Display a list of users"
118122
}
119123
},
120124
"parameters": [
@@ -132,7 +136,7 @@ Override the default metadata for generated API pages by adding `x-mint: metadat
132136

133137
Add content before the auto-generated API documentation using `x-mint: content`:
134138

135-
```json {6-13}
139+
```json {6-8}
136140
{
137141
"paths": {
138142
"/users": {
@@ -223,7 +227,9 @@ Generated endpoint pages have these default metadata values:
223227
- `deprecated`: The operation's `deprecated` field. If `true`, a deprecated label will appear next to the endpoint title in the side navigation and on the endpoint page.
224228

225229
<Tip>
226-
To exclude specific endpoints from your auto-generated API pages, add the [x-hidden](/api-playground/customization/managing-page-visibility#x-hidden) property to the operation in your OpenAPI spec.
230+
To exclude specific endpoints from your auto-generated API pages, add the
231+
[x-hidden](/api-playground/customization/managing-page-visibility#x-hidden)
232+
property to the operation in your OpenAPI spec.
227233
</Tip>
228234

229235
There are two approaches for adding endpoint pages into your documentation:
@@ -275,7 +281,9 @@ You can use multiple OpenAPI specifications in different navigation sections:
275281
```
276282

277283
<Note>
278-
The `directory` field is optional and specifies where generated API pages are stored in your docs repo. If not specified, defaults to the `api-reference` directory of your repo.
284+
The `directory` field is optional and specifies where generated API pages are
285+
stored in your docs repo. If not specified, defaults to the `api-reference`
286+
directory of your repo.
279287
</Note>
280288

281289
### Selective endpoints
@@ -369,7 +377,9 @@ When you reference an OpenAPI operation this way, the name, description, paramet
369377
If you have multiple OpenAPI files, include the file path in your reference to ensure Mintlify finds the correct OpenAPI document. If you have only one OpenAPI file, Mintlify will detect it automatically.
370378

371379
<Note>
372-
This approach works regardless of whether you have set a default OpenAPI spec in your navigation. You can reference any endpoint from any OpenAPI spec by including the file path in the frontmatter.
380+
This approach works regardless of whether you have set a default OpenAPI spec
381+
in your navigation. You can reference any endpoint from any OpenAPI spec by
382+
including the file path in the frontmatter.
373383
</Note>
374384

375385
If you want to reference an external OpenAPI file, add the file's URL to your `docs.json`.
@@ -399,7 +409,9 @@ version: "version-string" (not required)
399409
</CodeGroup>
400410

401411
<Note>
402-
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.
412+
The method and path must exactly match the definition in your OpenAPI
413+
specification. If the endpoint doesn't exist in the OpenAPI file, the page
414+
will be empty.
403415
</Note>
404416

405417
### Autogenerate `MDX` files
@@ -428,6 +440,7 @@ The scraper generates:
428440
```
429441

430442
Add the `-o` flag to specify a folder to populate the files into. If a folder is not specified, the files will populate in the working directory.
443+
431444
</Step>
432445
</Steps>
433446

@@ -443,7 +456,6 @@ openapi-schema: OrderItem
443456
---
444457
```
445458

446-
447459
```mdx Format
448460
---
449461
openapi-schema: "schema-key"
@@ -475,5 +487,6 @@ openapi: "path/to/openapi-file webhook example-webhook-name"
475487
```
476488

477489
<Note>
478-
The webhook name must exactly match the key defined in your OpenAPI specification's `webhooks` field.
490+
The webhook name must exactly match the key defined in your OpenAPI
491+
specification's `webhooks` field.
479492
</Note>

0 commit comments

Comments
 (0)