Skip to content
Open
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
20 changes: 14 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { OpenAPIV3 } from 'openapi-types'
import type { ReferenceConfiguration } from '@scalar/types'
import type { ReferenceConfiguration, TagGroup } from '@scalar/types'
import type { SwaggerUIOptions } from './swagger/types'

export interface ElysiaSwaggerConfig<Path extends string = '/swagger'> {
Expand All @@ -8,11 +8,7 @@ export interface ElysiaSwaggerConfig<Path extends string = '/swagger'> {
*
* @see https://swagger.io/specification/v2/
*/
documentation?: Omit<
Partial<OpenAPIV3.Document>,
| 'x-express-openapi-additional-middleware'
| 'x-express-openapi-validation-strict'
>
documentation?: ElysiaSwaggerDocumentation;
/**
* Choose your provider, Scalar or Swagger UI
*
Expand Down Expand Up @@ -125,3 +121,15 @@ export interface ElysiaSwaggerConfig<Path extends string = '/swagger'> {
*/
excludeTags?: string[]
}

interface ElysiaSwaggerDocumentation extends Omit<
Partial<OpenAPIV3.Document>,
| 'x-express-openapi-additional-middleware'
| 'x-express-openapi-validation-strict'
> {
/**
* Group tags in Scalar UI using `x-tagGroups` property
*/
'x-tagGroups'?: TagGroup[]
}