Skip to content

Commit ec8e17c

Browse files
committed
chore: add x-tagGroups again
1 parent 070919e commit ec8e17c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/types.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { TSchema } from 'elysia'
22
import type { OpenAPIV3 } from 'openapi-types'
3-
import type { ApiReferenceConfiguration } from '@scalar/types'
3+
import type { ApiReferenceConfiguration, TagGroup } from '@scalar/types'
44
import type { SwaggerUIOptions } from './swagger/types'
55

66
export type OpenAPIProvider = 'scalar' | 'swagger-ui' | null
@@ -48,11 +48,7 @@ export interface ElysiaOpenAPIConfig<
4848
*
4949
* @see https://spec.openapis.org/oas/v3.0.3.html
5050
*/
51-
documentation?: Omit<
52-
Partial<OpenAPIV3.Document>,
53-
| 'x-express-openapi-additional-middleware'
54-
| 'x-express-openapi-validation-strict'
55-
>
51+
documentation?: ElysiaSwaggerDocumentation
5652

5753
exclude?: {
5854
/**
@@ -213,3 +209,14 @@ export interface ElysiaOpenAPIConfig<
213209
cdn?: string
214210
}
215211
}
212+
213+
interface ElysiaSwaggerDocumentation extends Omit<
214+
Partial<OpenAPIV3.Document>,
215+
| 'x-express-openapi-additional-middleware'
216+
| 'x-express-openapi-validation-strict'
217+
> {
218+
/**
219+
* Group tags in Scalar UI using `x-tagGroups` property
220+
*/
221+
'x-tagGroups'?: TagGroup[]
222+
}

0 commit comments

Comments
 (0)