/
swagger-types.ts
41 lines (37 loc) · 995 Bytes
/
swagger-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
export interface SwaggerMetadata {
swagger: string;
info: { [properties: string]: string };
definitions: { [entities: string]: SwaggerEntity };
paths: { [path: string]: { [method: string]: SwaggerPath } };
basePath?: string;
'x-sap-ext-overview': { [key: string]: any };
externalDocs?: { description: string; url; string };
}
//
export interface SwaggerEntity extends SwaggerDescribed {
properties: { [fieldName: string]: SwaggerProperty };
title: string;
type?: string;
}
export interface SwaggerProperty extends SwaggerDescribed {
type: string[];
title?: string;
example?: string;
format?: string;
multipleOf?: number;
minimum?: number;
maximum?: number;
maxLength?: number;
}
export interface SwaggerPath {
summary: string;
parameters: SwaggerPathParameter[];
}
export interface SwaggerPathParameter extends SwaggerDescribed {
name: string;
required: boolean;
pattern?: string;
}
export interface SwaggerDescribed {
description?: string;
}