@@ -86,6 +86,77 @@ type Xml = {
8686} ;
8787
8888// TODO: Fill in this type when 3.2 is published
89- export type OpenApi32 = unknown ;
89+ export type OpenApi32 = {
90+ openapi : "3.2.0" ;
91+ info : {
92+ title : string ;
93+ version : string ;
94+ description ?: string ;
95+ termsOfService ?: string ;
96+ contact ?: {
97+ name ?: string ;
98+ url ?: string ;
99+ email ?: string ;
100+ } ;
101+ license ?: {
102+ name : string ;
103+ url ?: string ;
104+ } ;
105+ } ;
106+ servers ?: Array < { url : string ; description ?: string } > ;
107+ paths ?: Record < string , PathItem32 > ;
108+ webhooks ?: Record < string , PathItem32 > ; // <-- NEW in 3.2
109+ components ?: Components32 ;
110+ security ?: SecurityRequirement32 [ ] ;
111+ tags ?: Tag32 [ ] ;
112+ externalDocs ?: ExternalDocs32 ;
113+ } ;
114+
115+ export type PathItem32 = {
116+ summary ?: string ;
117+ description ?: string ;
118+ get ?: Operation32 ;
119+ put ?: Operation32 ;
120+ post ?: Operation32 ;
121+ delete ?: Operation32 ;
122+ options ?: Operation32 ;
123+ head ?: Operation32 ;
124+ patch ?: Operation32 ;
125+ trace ?: Operation32 ;
126+ servers ?: Array < { url : string ; description ?: string } > ;
127+ parameters ?: Parameter32 [ ] ;
128+ } ;
129+
130+ export type Operation32 = {
131+ tags ?: string [ ] ;
132+ summary ?: string ;
133+ description ?: string ;
134+ externalDocs ?: ExternalDocs32 ;
135+ operationId ?: string ;
136+ parameters ?: Parameter32 [ ] ;
137+ requestBody ?: RequestBody32 ;
138+ responses : Record < string , Response32 > ;
139+ callbacks ?: Record < string , Callback32 > ;
140+ deprecated ?: boolean ;
141+ security ?: SecurityRequirement32 [ ] ;
142+ servers ?: Array < { url : string ; description ?: string } > ;
143+ } ;
144+
145+ export type Components32 = {
146+ schemas ?: Record < string , OasSchema32 > ;
147+ responses ?: Record < string , Response32 > ;
148+ parameters ?: Record < string , Parameter32 > ;
149+ examples ?: Record < string , Example32 > ;
150+ requestBodies ?: Record < string , RequestBody32 > ;
151+ headers ?: Record < string , Header32 > ;
152+ securitySchemes ?: Record < string , SecurityScheme32 > ;
153+ links ?: Record < string , Link32 > ;
154+ callbacks ?: Record < string , Callback32 > ;
155+ } ;
156+
157+ export type ExternalDocs32 = {
158+ description ?: string ;
159+ url : string ;
160+ } ;
90161
91162export * from "../lib/index.js" ;
0 commit comments