Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,37 @@
}
```

### Parameter labels

Add custom labels next to a parameter's type in your API reference and playground using `x-mint.pre` and `x-mint.post` on any property in your OpenAPI specification.

- `x-mint.pre`: An array of strings that render as labels before the parameter type.
- `x-mint.post`: An array of strings that render as labels after the parameter type.

Use these to surface property-specific information that doesn't fit in the description, such as scope requirements, PII flags, or feature gates. Mintlify automatically renders `read-only` and `write-only` labels for properties marked `readOnly` or `writeOnly`, so you don't need to add them manually.

Check warning on line 269 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L269

Spell out 'PII', if it's unfamiliar to the audience.

```json {7-10}
{
"components": {
"schemas": {
"User": {
"properties": {
"email": {
"type": "string",
"x-mint": {
"pre": ["PII"],
"post": ["requires admin scope"]
}
}
}
}
}
}
}
```

To turn an existing OpenAPI field—including custom `x-` extensions—into a label on every property without editing each one, use the [`api.params.post`](/organize/settings-api) setting in your `docs.json`.

### Group display names

Set a custom display name for a tag's navigation group using the `x-group` extension on a tag object. By default, Mintlify uses the tag `name` as both the navigation group label and the URL path segment. The `x-group` extension overrides the group label while keeping the tag name for the URL.
Expand Down
8 changes: 7 additions & 1 deletion organize/settings-api.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "API settings"
description: "Configure OpenAPI and AsyncAPI specs, the interactive API playground, SDK code examples, and authentication settings in your docs.json file."

Check warning on line 3 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L3

Use 'JSON' instead of 'json'.
keywords: ["api", "openapi", "asyncapi", "playground", "docs.json", "api reference"]
---

Expand Down Expand Up @@ -113,6 +113,11 @@
<ResponseField name="expanded" type='"all" | "closed"'>
Whether to expand all parameters by default. Defaults to `closed`.
</ResponseField>
<ResponseField name="post" type="array of string">
OpenAPI schema field keys to render as labels next to the type on every parameter. For each key listed, Mintlify reads the value from the property's schema and surfaces it as a label: strings render verbatim, `true` renders the key name, and arrays of strings or numbers render one label per item. Booleans set to `false`, objects, and missing values are skipped.

Check warning on line 117 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L117

Did you really mean 'Booleans'?

Check warning on line 117 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L117

In general, use active voice instead of passive voice ('are skipped').

Use this to expose custom or vendor-specific OpenAPI fields—such as `x-required-scope` or `x-pii`—without editing every property individually. To add labels to a single property instead, use the [`x-mint.pre` and `x-mint.post`](/api-playground/openapi-setup#parameter-labels) extensions.
</ResponseField>
</Expandable>
</ResponseField>

Expand Down Expand Up @@ -171,9 +176,10 @@
"display": "interactive"
},
"params": {
"expanded": "all"
"expanded": "all",
"post": ["x-required-scope"]
},
"url": "full",

Check warning on line 182 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L182

Use 'URL' instead of 'url'.

Check warning on line 182 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L182

Use 'URL' instead of 'url'.

Check warning on line 182 in organize/settings-api.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-api.mdx#L182

Commas and periods go inside quotation marks.
"examples": {
"languages": ["curl", "python", "javascript", "go"],
"defaults": "required",
Expand Down
Loading