Skip to content

Commit b2eb99e

Browse files
committed
Add summary and description to type
New `OpenAPI3PathItem` limits possible methods Missing `servers` key added as `any` type
1 parent 4067236 commit b2eb99e

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/types/OpenAPI3.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,28 @@ export interface OpenAPI3Schemas {
99
}
1010

1111
export interface OpenAPI3Paths {
12-
[path: string]: {
13-
[method: string]: OpenAPI3Operation | Parameter[];
14-
};
12+
[path: string]: Partial<OpenAPI3PathItem>;
13+
}
14+
15+
export type OpenAPI3PathItem= {
16+
$ref: string
17+
summary: string
18+
description: string
19+
get: OpenAPI3Operation
20+
put: OpenAPI3Operation
21+
post: OpenAPI3Operation
22+
delete: OpenAPI3Operation
23+
options: OpenAPI3Operation
24+
head: OpenAPI3Operation
25+
patch: OpenAPI3Operation
26+
trace: OpenAPI3Operation
27+
servers: any
28+
parameters: Parameter[]
1529
}
1630

1731
export interface OpenAPI3Operation {
1832
operationId?: string;
33+
summary?: string;
1934
description?: string;
2035
parameters?: Parameter[];
2136
requestBody?: OpenAPI3RequestBody;

0 commit comments

Comments
 (0)