Skip to content

Commit 5c5488b

Browse files
committed
chore: add more types to openapi
1 parent fc5d578 commit 5c5488b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/schemas/v2/api/components/security.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { OpenAPIV3_1 } from 'openapi-types'
2+
13
export default (scopes?: Record<string, string>) => ({
24
Oauth2: {
35
type: 'oauth2',
@@ -9,4 +11,5 @@ export default (scopes?: Record<string, string>) => ({
911
}
1012
}
1113
},
14+
} satisfies OpenAPIV3_1.SecuritySchemeObject,
1215
})

src/schemas/v2/api/details.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { OpenAPIV3_1 } from 'openapi-types'
2+
13
import { APIVersion } from '../../../v2'
24

35
export default {
@@ -13,17 +15,17 @@ export default {
1315
name: 'Patreon',
1416
url: 'https://www.patreondevelopers.com/'
1517
},
16-
},
18+
} satisfies OpenAPIV3_1.InfoObject,
1719
externalDocs: {
1820
description: 'Official Patreon documentation',
1921
url: 'https://docs.patreon.com',
20-
},
22+
} satisfies OpenAPIV3_1.ExternalDocumentationObject,
2123
servers: [
2224
{
2325
description: 'API domain',
2426
url: 'https://patreon.com',
2527
}
26-
],
28+
] satisfies OpenAPIV3_1.ServerObject[],
2729
tags: [
2830
{
2931
name: 'Resources',
@@ -39,5 +41,8 @@ export default {
3941
url: 'https://docs.patreon.com/#apiv2-webhook-endpoints',
4042
}
4143
}
42-
]
44+
] satisfies (OpenAPIV3_1.TagObject & {
45+
'x-displayName'?: string
46+
'x-scalar-ignore'?: boolean
47+
})[]
4348
}

0 commit comments

Comments
 (0)