This repository was archived by the owner on Mar 8, 2025. It is now read-only.
File tree 1 file changed +48
-1
lines changed
1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export interface SwaggerDoc {
5
5
servers ?: ServerDoc [ ] ;
6
6
tags ?: TagDoc [ ] ;
7
7
paths ?: any ;
8
- components ?: any ;
8
+ components ?: ComponentDoc ;
9
9
}
10
10
11
11
export interface TagDoc {
@@ -51,3 +51,50 @@ export interface ExternalDoc {
51
51
description ?: string ;
52
52
url ?: string ;
53
53
}
54
+
55
+ export interface ComponentDoc {
56
+ schemas : any ;
57
+ securitySchemes : {
58
+ [ authKey : string ] : SecurityDoc | BearerAuthDoc | ApiKeyDoc ;
59
+ } ;
60
+ }
61
+
62
+ /**
63
+ * Attach link: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#securityRequirementObject
64
+ */
65
+ export interface SecurityDoc {
66
+ type ?: string ;
67
+ description ?: string ;
68
+ name ?: string ;
69
+ in ?: string ;
70
+ flows ?: OAuthFlows ;
71
+ openIdConnectUrl ?: any ;
72
+ scheme ?: string ;
73
+ bearerFormat ?: string ;
74
+ }
75
+
76
+ export interface OAuthFlows {
77
+ implicit : OAuthFlow ;
78
+ password : OAuthFlow ;
79
+ clientCredentials : OAuthFlow ;
80
+ authorizationCode : OAuthFlow ;
81
+ }
82
+
83
+ export interface OAuthFlow {
84
+ authorizationUrl : string ;
85
+ tokenUrl : string ;
86
+ refreshUrl : string ;
87
+ scopes : Record < string , string > ;
88
+ }
89
+
90
+ export type BearerAuthDoc = {
91
+ type : 'http' ;
92
+ scheme : 'bearer' ;
93
+ bearerFormat : 'JWT' ;
94
+ } ;
95
+
96
+ export type ApiKeyDoc = {
97
+ type : 'apiKey' ;
98
+ name : 'api_key' ;
99
+ in : 'header' ;
100
+ } ;
You can’t perform that action at this time.
0 commit comments