Skip to content

Commit 6820178

Browse files
Update api-playground/openapi-setup.mdx
1 parent 23e9713 commit 6820178

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

api-playground/openapi-setup.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,26 @@ openapi-schema: "filepath schema-key"
518518

519519
When you have multiple OpenAPI files with schemas that have the same name, you can specify which file to use by including the filepath before the schema name. This is useful for multi-language documentation where you have translated versions of the same schema in different OpenAPI files.
520520

521+
#### Example use case
522+
523+
If you have multiple OpenAPI specifications with the same schema name but different content (such as translated descriptions), you can specify which file to use:
524+
525+
```mdx English schema page
526+
---
527+
title: "Plant schema"
528+
openapi-schema: specs/en/openapi.json Plant
529+
---
530+
```
531+
532+
```mdx German schema page
533+
---
534+
title: "Plant schema (German)"
535+
openapi-schema: specs/de/openapi.json Plant
536+
---
537+
```
538+
539+
Both pages reference a schema named `Plant`, but the English page will show the schema from `specs/en/openapi.json` while the German page will show the schema from `specs/de/openapi.json`, allowing you to display localized schema descriptions and field names.
540+
521541
## Webhooks
522542

523543
Webhooks are HTTP callbacks that your API sends to notify external systems when events occur. Webhooks are supported in OpenAPI 3.1+ documents.

0 commit comments

Comments
 (0)