mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
OpenAPI: fix groupBy: route ignoring curly braces
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-openapi': patch
|
||||
---
|
||||
|
||||
fix `groupBy: route` ignoring curly braces
|
||||
@@ -213,17 +213,18 @@ async function generateFromDocument(pathOrUrl: string, options: Config) {
|
||||
groupBy: OperationConfig['groupBy'] = 'none',
|
||||
result: GeneratePageOutput,
|
||||
): string[] {
|
||||
const file = nameFn(result, document.document);
|
||||
|
||||
if (groupBy === 'route') {
|
||||
return [
|
||||
path.join(
|
||||
result.type === 'operation' ? result.item.path : result.item.name,
|
||||
result.item.method,
|
||||
) + '.mdx',
|
||||
getOutputPathFromRoute(
|
||||
result.type === 'operation' ? result.item.path : result.item.name,
|
||||
),
|
||||
`${result.item.method.toLowerCase()}.mdx`,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
const file = nameFn(result, document.document);
|
||||
if (groupBy === 'tag') {
|
||||
let tags =
|
||||
result.type === 'operation'
|
||||
|
||||
Reference in New Issue
Block a user