mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
OpenAPI: Support x-displayName
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': patch
|
||||
---
|
||||
|
||||
Support `x-displayName` on tags
|
||||
@@ -187,6 +187,13 @@ export async function generateTags(
|
||||
}
|
||||
}
|
||||
|
||||
const displayName =
|
||||
info &&
|
||||
'x-displayName' in info &&
|
||||
typeof info['x-displayName'] === 'string'
|
||||
? info['x-displayName']
|
||||
: idToTitle(tag);
|
||||
|
||||
return {
|
||||
tag,
|
||||
content: generateDocument({
|
||||
@@ -197,7 +204,7 @@ export async function generateTags(
|
||||
hasHead: true,
|
||||
},
|
||||
dereferenced: document,
|
||||
title: idToTitle(tag),
|
||||
title: displayName,
|
||||
description: info?.description,
|
||||
context: {
|
||||
type: 'tag',
|
||||
|
||||
Reference in New Issue
Block a user