Skip to content

Commit

Permalink
change bearer constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
maksim.khramtsov committed Oct 22, 2024
1 parent 7c0ca80 commit 4cd4c61
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/platform/src/HttpApiSecurity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ const Proto = {
* @since 1.0.0
* @category constructors
*/
export const bearer: Bearer = Object.assign(Object.create(Proto), {
_tag: "Bearer",
annotations: Context.empty()
})
export const bearer = (options?: {
format?: string
}): Bearer =>
Object.assign(Object.create(Proto), {
_tag: "Bearer",
format: options?.format,
annotations: Context.empty()
})

/**
* Create an API key security scheme.
Expand Down

0 comments on commit 4cd4c61

Please sign in to comment.