@twin.org/tools-models 0.0.3-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/es/index.js +36 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/jsonSchema/IJsonSchema.js +4 -0
- package/dist/es/models/jsonSchema/IJsonSchema.js.map +1 -0
- package/dist/es/models/jsonSchema/jsonSchemaTagNames.js +58 -0
- package/dist/es/models/jsonSchema/jsonSchemaTagNames.js.map +1 -0
- package/dist/es/models/jsonSchema/jsonSchemaTypeNames.js +4 -0
- package/dist/es/models/jsonSchema/jsonSchemaTypeNames.js.map +1 -0
- package/dist/es/models/openApi/IOpenApi.js +2 -0
- package/dist/es/models/openApi/IOpenApi.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiComponents.js +2 -0
- package/dist/es/models/openApi/IOpenApiComponents.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiContact.js +4 -0
- package/dist/es/models/openApi/IOpenApiContact.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiExample.js +4 -0
- package/dist/es/models/openApi/IOpenApiExample.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiExternalDocumentation.js +4 -0
- package/dist/es/models/openApi/IOpenApiExternalDocumentation.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiHeader.js +2 -0
- package/dist/es/models/openApi/IOpenApiHeader.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiInfo.js +2 -0
- package/dist/es/models/openApi/IOpenApiInfo.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiLicense.js +4 -0
- package/dist/es/models/openApi/IOpenApiLicense.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiMediaType.js +2 -0
- package/dist/es/models/openApi/IOpenApiMediaType.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiOAuthFlow.js +4 -0
- package/dist/es/models/openApi/IOpenApiOAuthFlow.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiOAuthFlows.js +2 -0
- package/dist/es/models/openApi/IOpenApiOAuthFlows.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiParameter.js +2 -0
- package/dist/es/models/openApi/IOpenApiParameter.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiPathItem.js +2 -0
- package/dist/es/models/openApi/IOpenApiPathItem.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiPathMethod.js +2 -0
- package/dist/es/models/openApi/IOpenApiPathMethod.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiReference.js +4 -0
- package/dist/es/models/openApi/IOpenApiReference.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiRequestBody.js +2 -0
- package/dist/es/models/openApi/IOpenApiRequestBody.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiResponse.js +2 -0
- package/dist/es/models/openApi/IOpenApiResponse.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiResponses.js +2 -0
- package/dist/es/models/openApi/IOpenApiResponses.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiSecurityRequirement.js +4 -0
- package/dist/es/models/openApi/IOpenApiSecurityRequirement.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiSecurityScheme.js +2 -0
- package/dist/es/models/openApi/IOpenApiSecurityScheme.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiServer.js +2 -0
- package/dist/es/models/openApi/IOpenApiServer.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiServerVariable.js +4 -0
- package/dist/es/models/openApi/IOpenApiServerVariable.js.map +1 -0
- package/dist/es/models/openApi/IOpenApiTag.js +2 -0
- package/dist/es/models/openApi/IOpenApiTag.js.map +1 -0
- package/dist/es/models/openApi/openApiConstants.js +12 -0
- package/dist/es/models/openApi/openApiConstants.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJson.js +4 -0
- package/dist/es/models/packageJson/IPackageJson.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJsonBugs.js +4 -0
- package/dist/es/models/packageJson/IPackageJsonBugs.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJsonPerson.js +4 -0
- package/dist/es/models/packageJson/IPackageJsonPerson.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJsonPublishConfig.js +4 -0
- package/dist/es/models/packageJson/IPackageJsonPublishConfig.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJsonRepository.js +4 -0
- package/dist/es/models/packageJson/IPackageJsonRepository.js.map +1 -0
- package/dist/es/models/packageJson/IPackageJsonStringMap.js +4 -0
- package/dist/es/models/packageJson/IPackageJsonStringMap.js.map +1 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/models/jsonSchema/IJsonSchema.d.ts +372 -0
- package/dist/types/models/jsonSchema/jsonSchemaTagNames.d.ts +4 -0
- package/dist/types/models/jsonSchema/jsonSchemaTypeNames.d.ts +4 -0
- package/dist/types/models/openApi/IOpenApi.d.ts +72 -0
- package/dist/types/models/openApi/IOpenApiComponents.d.ts +70 -0
- package/dist/types/models/openApi/IOpenApiContact.d.ts +21 -0
- package/dist/types/models/openApi/IOpenApiExample.d.ts +30 -0
- package/dist/types/models/openApi/IOpenApiExternalDocumentation.d.ts +14 -0
- package/dist/types/models/openApi/IOpenApiHeader.d.ts +50 -0
- package/dist/types/models/openApi/IOpenApiInfo.d.ts +43 -0
- package/dist/types/models/openApi/IOpenApiLicense.d.ts +21 -0
- package/dist/types/models/openApi/IOpenApiMediaType.d.ts +41 -0
- package/dist/types/models/openApi/IOpenApiOAuthFlow.d.ts +28 -0
- package/dist/types/models/openApi/IOpenApiOAuthFlows.d.ts +27 -0
- package/dist/types/models/openApi/IOpenApiParameter.d.ts +74 -0
- package/dist/types/models/openApi/IOpenApiPathItem.d.ts +72 -0
- package/dist/types/models/openApi/IOpenApiPathMethod.d.ts +75 -0
- package/dist/types/models/openApi/IOpenApiReference.d.ts +18 -0
- package/dist/types/models/openApi/IOpenApiRequestBody.d.ts +22 -0
- package/dist/types/models/openApi/IOpenApiResponse.d.ts +35 -0
- package/dist/types/models/openApi/IOpenApiResponses.d.ts +18 -0
- package/dist/types/models/openApi/IOpenApiSecurityRequirement.d.ts +7 -0
- package/dist/types/models/openApi/IOpenApiSecurityScheme.d.ts +33 -0
- package/dist/types/models/openApi/IOpenApiServer.d.ts +29 -0
- package/dist/types/models/openApi/IOpenApiServerVariable.d.ts +21 -0
- package/dist/types/models/openApi/IOpenApiTag.d.ts +31 -0
- package/dist/types/models/openApi/openApiConstants.d.ts +9 -0
- package/dist/types/models/packageJson/IPackageJson.d.ts +134 -0
- package/dist/types/models/packageJson/IPackageJsonBugs.d.ts +7 -0
- package/dist/types/models/packageJson/IPackageJsonPerson.d.ts +8 -0
- package/dist/types/models/packageJson/IPackageJsonPublishConfig.d.ts +6 -0
- package/dist/types/models/packageJson/IPackageJsonRepository.d.ts +8 -0
- package/dist/types/models/packageJson/IPackageJsonStringMap.d.ts +6 -0
- package/docs/changelog.md +10 -0
- package/docs/examples.md +85 -0
- package/docs/reference/classes/OpenApiConstants.md +21 -0
- package/docs/reference/index.md +48 -0
- package/docs/reference/interfaces/IJsonSchema.md +795 -0
- package/docs/reference/interfaces/IOpenApi.md +147 -0
- package/docs/reference/interfaces/IOpenApiComponents.md +115 -0
- package/docs/reference/interfaces/IOpenApiContact.md +43 -0
- package/docs/reference/interfaces/IOpenApiExample.md +55 -0
- package/docs/reference/interfaces/IOpenApiExternalDocumentation.md +23 -0
- package/docs/reference/interfaces/IOpenApiHeader.md +87 -0
- package/docs/reference/interfaces/IOpenApiInfo.md +91 -0
- package/docs/reference/interfaces/IOpenApiLicense.md +43 -0
- package/docs/reference/interfaces/IOpenApiMediaType.md +71 -0
- package/docs/reference/interfaces/IOpenApiOAuthFlow.md +51 -0
- package/docs/reference/interfaces/IOpenApiOAuthFlows.md +47 -0
- package/docs/reference/interfaces/IOpenApiParameter.md +119 -0
- package/docs/reference/interfaces/IOpenApiPathItem.md +131 -0
- package/docs/reference/interfaces/IOpenApiPathMethod.md +155 -0
- package/docs/reference/interfaces/IOpenApiReference.md +31 -0
- package/docs/reference/interfaces/IOpenApiRequestBody.md +35 -0
- package/docs/reference/interfaces/IOpenApiResponse.md +59 -0
- package/docs/reference/interfaces/IOpenApiResponses.md +29 -0
- package/docs/reference/interfaces/IOpenApiSecurityRequirement.md +11 -0
- package/docs/reference/interfaces/IOpenApiServer.md +59 -0
- package/docs/reference/interfaces/IOpenApiServerVariable.md +43 -0
- package/docs/reference/interfaces/IOpenApiTag.md +55 -0
- package/docs/reference/interfaces/IPackageJson.md +295 -0
- package/docs/reference/interfaces/IPackageJsonPublishConfig.md +7 -0
- package/docs/reference/interfaces/IPackageJsonStringMap.md +7 -0
- package/docs/reference/type-aliases/IOpenApiSecurityScheme.md +9 -0
- package/docs/reference/type-aliases/IPackageJsonBugs.md +5 -0
- package/docs/reference/type-aliases/IPackageJsonPerson.md +5 -0
- package/docs/reference/type-aliases/IPackageJsonRepository.md +5 -0
- package/docs/reference/type-aliases/JsonSchemaTypeNames.md +5 -0
- package/docs/reference/type-aliases/OpenApiParameterLocation.md +5 -0
- package/docs/reference/type-aliases/OpenApiParameterStyle.md +5 -0
- package/docs/reference/variables/JsonSchemaTagNames.md +5 -0
- package/locales/en.json +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { IOpenApiExample } from "./IOpenApiExample.js";
|
|
2
|
+
import type { IOpenApiHeader } from "./IOpenApiHeader.js";
|
|
3
|
+
import type { IOpenApiMediaType } from "./IOpenApiMediaType.js";
|
|
4
|
+
import type { IOpenApiParameter } from "./IOpenApiParameter.js";
|
|
5
|
+
import type { IOpenApiPathItem } from "./IOpenApiPathItem.js";
|
|
6
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
7
|
+
import type { IOpenApiRequestBody } from "./IOpenApiRequestBody.js";
|
|
8
|
+
import type { IOpenApiResponse } from "./IOpenApiResponse.js";
|
|
9
|
+
import type { IOpenApiSecurityScheme } from "./IOpenApiSecurityScheme.js";
|
|
10
|
+
import type { IJsonSchema } from "../jsonSchema/IJsonSchema.js";
|
|
11
|
+
/**
|
|
12
|
+
* An OpenAPI Components Object.
|
|
13
|
+
* @see https://spec.openapis.org/oas/latest.html#components-object
|
|
14
|
+
*/
|
|
15
|
+
export interface IOpenApiComponents {
|
|
16
|
+
/**
|
|
17
|
+
* Reusable schemas.
|
|
18
|
+
*/
|
|
19
|
+
schemas?: {
|
|
20
|
+
[name: string]: IJsonSchema | boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Reusable responses.
|
|
24
|
+
*/
|
|
25
|
+
responses?: {
|
|
26
|
+
[name: string]: IOpenApiResponse | IOpenApiReference;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Reusable parameters.
|
|
30
|
+
*/
|
|
31
|
+
parameters?: {
|
|
32
|
+
[name: string]: IOpenApiParameter | IOpenApiReference;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Reusable examples.
|
|
36
|
+
*/
|
|
37
|
+
examples?: {
|
|
38
|
+
[name: string]: IOpenApiExample | IOpenApiReference;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Reusable request bodies.
|
|
42
|
+
*/
|
|
43
|
+
requestBodies?: {
|
|
44
|
+
[name: string]: IOpenApiRequestBody | IOpenApiReference;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Reusable headers.
|
|
48
|
+
*/
|
|
49
|
+
headers?: {
|
|
50
|
+
[name: string]: IOpenApiHeader | IOpenApiReference;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Reusable security schemes.
|
|
54
|
+
*/
|
|
55
|
+
securitySchemes?: {
|
|
56
|
+
[name: string]: IOpenApiSecurityScheme | IOpenApiReference;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Reusable path items.
|
|
60
|
+
*/
|
|
61
|
+
pathItems?: {
|
|
62
|
+
[name: string]: IOpenApiPathItem;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Reusable media types.
|
|
66
|
+
*/
|
|
67
|
+
mediaTypes?: {
|
|
68
|
+
[name: string]: IOpenApiMediaType | IOpenApiReference;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI Contact Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#contact-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiContact {
|
|
6
|
+
/**
|
|
7
|
+
* The identifying name of the contact person or organisation.
|
|
8
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-1
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The URI for the contact information.
|
|
13
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-1
|
|
14
|
+
*/
|
|
15
|
+
url?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The email address for the contact.
|
|
18
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-1
|
|
19
|
+
*/
|
|
20
|
+
email?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI Example Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#example-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiExample {
|
|
6
|
+
/**
|
|
7
|
+
* Short description for the example.
|
|
8
|
+
*/
|
|
9
|
+
summary?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Long description for the example.
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The schema-ready value for the example.
|
|
16
|
+
*/
|
|
17
|
+
dataValue?: unknown;
|
|
18
|
+
/**
|
|
19
|
+
* The serialized form of the example.
|
|
20
|
+
*/
|
|
21
|
+
serializedValue?: string;
|
|
22
|
+
/**
|
|
23
|
+
* An external URI for the serialized example.
|
|
24
|
+
*/
|
|
25
|
+
externalValue?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Backwards-compatible embedded example value.
|
|
28
|
+
*/
|
|
29
|
+
value?: unknown;
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI External Documentation Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#external-documentation-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiExternalDocumentation {
|
|
6
|
+
/**
|
|
7
|
+
* A description of the target documentation.
|
|
8
|
+
*/
|
|
9
|
+
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The URI for the target documentation.
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IOpenApiExample } from "./IOpenApiExample.js";
|
|
2
|
+
import type { IOpenApiMediaType } from "./IOpenApiMediaType.js";
|
|
3
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
4
|
+
import type { IJsonSchema } from "../jsonSchema/IJsonSchema.js";
|
|
5
|
+
/**
|
|
6
|
+
* An OpenAPI Header Object.
|
|
7
|
+
* @see https://spec.openapis.org/oas/latest.html#header-object
|
|
8
|
+
*/
|
|
9
|
+
export interface IOpenApiHeader {
|
|
10
|
+
/**
|
|
11
|
+
* The description of the header.
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the header is required.
|
|
16
|
+
*/
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the header is deprecated.
|
|
20
|
+
*/
|
|
21
|
+
deprecated?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A shorthand example for the header.
|
|
24
|
+
*/
|
|
25
|
+
example?: unknown;
|
|
26
|
+
/**
|
|
27
|
+
* Named examples for the header.
|
|
28
|
+
*/
|
|
29
|
+
examples?: {
|
|
30
|
+
[id: string]: IOpenApiExample | IOpenApiReference;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The serialization style for the header.
|
|
34
|
+
*/
|
|
35
|
+
style?: "simple";
|
|
36
|
+
/**
|
|
37
|
+
* Whether exploded serialization is used.
|
|
38
|
+
*/
|
|
39
|
+
explode?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The schema of the header.
|
|
42
|
+
*/
|
|
43
|
+
schema?: IJsonSchema;
|
|
44
|
+
/**
|
|
45
|
+
* The content definition for the header.
|
|
46
|
+
*/
|
|
47
|
+
content?: {
|
|
48
|
+
[contentType: string]: IOpenApiMediaType | IOpenApiReference;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IOpenApiContact } from "./IOpenApiContact.js";
|
|
2
|
+
import type { IOpenApiLicense } from "./IOpenApiLicense.js";
|
|
3
|
+
/**
|
|
4
|
+
* An OpenAPI Info Object.
|
|
5
|
+
* @see https://spec.openapis.org/oas/latest.html#info-object
|
|
6
|
+
*/
|
|
7
|
+
export interface IOpenApiInfo {
|
|
8
|
+
/**
|
|
9
|
+
* The title of the API.
|
|
10
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* A short summary of the API.
|
|
15
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
16
|
+
*/
|
|
17
|
+
summary?: string;
|
|
18
|
+
/**
|
|
19
|
+
* A description of the API.
|
|
20
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The terms of service URI.
|
|
25
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
26
|
+
*/
|
|
27
|
+
termsOfService?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Contact information for the API.
|
|
30
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
31
|
+
*/
|
|
32
|
+
contact?: IOpenApiContact;
|
|
33
|
+
/**
|
|
34
|
+
* License information for the API.
|
|
35
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
36
|
+
*/
|
|
37
|
+
license?: IOpenApiLicense;
|
|
38
|
+
/**
|
|
39
|
+
* The version of the API description.
|
|
40
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-0
|
|
41
|
+
*/
|
|
42
|
+
version: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI License Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#license-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiLicense {
|
|
6
|
+
/**
|
|
7
|
+
* The license name.
|
|
8
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-2
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* The SPDX license expression.
|
|
13
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-2
|
|
14
|
+
*/
|
|
15
|
+
identifier?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The URI for the license.
|
|
18
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-2
|
|
19
|
+
*/
|
|
20
|
+
url?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IOpenApiExample } from "./IOpenApiExample.js";
|
|
2
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
3
|
+
import type { IJsonSchema } from "../jsonSchema/IJsonSchema.js";
|
|
4
|
+
/**
|
|
5
|
+
* An OpenAPI Media Type Object.
|
|
6
|
+
* @see https://spec.openapis.org/oas/latest.html#media-type-object
|
|
7
|
+
*/
|
|
8
|
+
export interface IOpenApiMediaType {
|
|
9
|
+
/**
|
|
10
|
+
* A schema describing the complete content.
|
|
11
|
+
*/
|
|
12
|
+
schema?: IJsonSchema;
|
|
13
|
+
/**
|
|
14
|
+
* A schema describing each item within a sequential media type.
|
|
15
|
+
*/
|
|
16
|
+
itemSchema?: IJsonSchema;
|
|
17
|
+
/**
|
|
18
|
+
* A single shorthand example.
|
|
19
|
+
*/
|
|
20
|
+
example?: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* Named examples for the media type.
|
|
23
|
+
*/
|
|
24
|
+
examples?: {
|
|
25
|
+
[id: string]: IOpenApiExample | IOpenApiReference;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Encoding metadata keyed by property name.
|
|
29
|
+
*/
|
|
30
|
+
encoding?: {
|
|
31
|
+
[id: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Positional encoding metadata for multipart payloads.
|
|
35
|
+
*/
|
|
36
|
+
prefixEncoding?: unknown[];
|
|
37
|
+
/**
|
|
38
|
+
* Repeating item encoding metadata for multipart payloads.
|
|
39
|
+
*/
|
|
40
|
+
itemEncoding?: unknown;
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI OAuth Flow Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#oauth-flow-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiOAuthFlow {
|
|
6
|
+
/**
|
|
7
|
+
* The authorization URL for this flow.
|
|
8
|
+
*/
|
|
9
|
+
authorizationUrl?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The device authorization URL for this flow.
|
|
12
|
+
*/
|
|
13
|
+
deviceAuthorizationUrl?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The token URL for this flow.
|
|
16
|
+
*/
|
|
17
|
+
tokenUrl?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The refresh URL for this flow.
|
|
20
|
+
*/
|
|
21
|
+
refreshUrl?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Available scopes for this flow.
|
|
24
|
+
*/
|
|
25
|
+
scopes: {
|
|
26
|
+
[name: string]: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IOpenApiOAuthFlow } from "./IOpenApiOAuthFlow.js";
|
|
2
|
+
/**
|
|
3
|
+
* An OpenAPI OAuth Flows Object.
|
|
4
|
+
* @see https://spec.openapis.org/oas/latest.html#oauth-flows-object
|
|
5
|
+
*/
|
|
6
|
+
export interface IOpenApiOAuthFlows {
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for the implicit flow.
|
|
9
|
+
*/
|
|
10
|
+
implicit?: IOpenApiOAuthFlow;
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for the resource owner password flow.
|
|
13
|
+
*/
|
|
14
|
+
password?: IOpenApiOAuthFlow;
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for the client credentials flow.
|
|
17
|
+
*/
|
|
18
|
+
clientCredentials?: IOpenApiOAuthFlow;
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for the authorization code flow.
|
|
21
|
+
*/
|
|
22
|
+
authorizationCode?: IOpenApiOAuthFlow;
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for the device authorization flow.
|
|
25
|
+
*/
|
|
26
|
+
deviceAuthorization?: IOpenApiOAuthFlow;
|
|
27
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { IOpenApiExample } from "./IOpenApiExample.js";
|
|
2
|
+
import type { IOpenApiMediaType } from "./IOpenApiMediaType.js";
|
|
3
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
4
|
+
import type { IJsonSchema } from "../jsonSchema/IJsonSchema.js";
|
|
5
|
+
/**
|
|
6
|
+
* The supported parameter locations.
|
|
7
|
+
*/
|
|
8
|
+
export type OpenApiParameterLocation = "path" | "query" | "querystring" | "header" | "cookie";
|
|
9
|
+
/**
|
|
10
|
+
* The supported parameter styles.
|
|
11
|
+
*/
|
|
12
|
+
export type OpenApiParameterStyle = "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | "cookie";
|
|
13
|
+
/**
|
|
14
|
+
* An OpenAPI Parameter Object.
|
|
15
|
+
* @see https://spec.openapis.org/oas/latest.html#parameter-object
|
|
16
|
+
*/
|
|
17
|
+
export interface IOpenApiParameter {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the parameter.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The location of the parameter.
|
|
24
|
+
*/
|
|
25
|
+
in: OpenApiParameterLocation;
|
|
26
|
+
/**
|
|
27
|
+
* A brief description of the parameter.
|
|
28
|
+
*/
|
|
29
|
+
description?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the parameter is required.
|
|
32
|
+
*/
|
|
33
|
+
required?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the parameter is deprecated.
|
|
36
|
+
*/
|
|
37
|
+
deprecated?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether empty values are allowed for query parameters.
|
|
40
|
+
*/
|
|
41
|
+
allowEmptyValue?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* A shorthand example for the parameter.
|
|
44
|
+
*/
|
|
45
|
+
example?: unknown;
|
|
46
|
+
/**
|
|
47
|
+
* Named examples for the parameter.
|
|
48
|
+
*/
|
|
49
|
+
examples?: {
|
|
50
|
+
[id: string]: IOpenApiExample | IOpenApiReference;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The serialization style for the parameter.
|
|
54
|
+
*/
|
|
55
|
+
style?: OpenApiParameterStyle;
|
|
56
|
+
/**
|
|
57
|
+
* Whether exploded serialization is used.
|
|
58
|
+
*/
|
|
59
|
+
explode?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Whether reserved characters may pass through unchanged.
|
|
62
|
+
*/
|
|
63
|
+
allowReserved?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The schema describing the parameter.
|
|
66
|
+
*/
|
|
67
|
+
schema?: IJsonSchema;
|
|
68
|
+
/**
|
|
69
|
+
* Content-based parameter serialization.
|
|
70
|
+
*/
|
|
71
|
+
content?: {
|
|
72
|
+
[contentType: string]: IOpenApiMediaType | IOpenApiReference;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { IOpenApiParameter } from "./IOpenApiParameter.js";
|
|
2
|
+
import type { IOpenApiPathMethod } from "./IOpenApiPathMethod.js";
|
|
3
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
4
|
+
import type { IOpenApiServer } from "./IOpenApiServer.js";
|
|
5
|
+
/**
|
|
6
|
+
* An OpenAPI Path Item Object.
|
|
7
|
+
* @see https://spec.openapis.org/oas/latest.html#path-item-object
|
|
8
|
+
*/
|
|
9
|
+
export interface IOpenApiPathItem {
|
|
10
|
+
/**
|
|
11
|
+
* A referenced definition of this path item.
|
|
12
|
+
*/
|
|
13
|
+
$ref?: string;
|
|
14
|
+
/**
|
|
15
|
+
* A summary applying to all operations in the path.
|
|
16
|
+
*/
|
|
17
|
+
summary?: string;
|
|
18
|
+
/**
|
|
19
|
+
* A description applying to all operations in the path.
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
22
|
+
/**
|
|
23
|
+
* A GET operation on the path.
|
|
24
|
+
*/
|
|
25
|
+
get?: IOpenApiPathMethod;
|
|
26
|
+
/**
|
|
27
|
+
* A PUT operation on the path.
|
|
28
|
+
*/
|
|
29
|
+
put?: IOpenApiPathMethod;
|
|
30
|
+
/**
|
|
31
|
+
* A POST operation on the path.
|
|
32
|
+
*/
|
|
33
|
+
post?: IOpenApiPathMethod;
|
|
34
|
+
/**
|
|
35
|
+
* A DELETE operation on the path.
|
|
36
|
+
*/
|
|
37
|
+
delete?: IOpenApiPathMethod;
|
|
38
|
+
/**
|
|
39
|
+
* An OPTIONS operation on the path.
|
|
40
|
+
*/
|
|
41
|
+
options?: IOpenApiPathMethod;
|
|
42
|
+
/**
|
|
43
|
+
* A HEAD operation on the path.
|
|
44
|
+
*/
|
|
45
|
+
head?: IOpenApiPathMethod;
|
|
46
|
+
/**
|
|
47
|
+
* A PATCH operation on the path.
|
|
48
|
+
*/
|
|
49
|
+
patch?: IOpenApiPathMethod;
|
|
50
|
+
/**
|
|
51
|
+
* A TRACE operation on the path.
|
|
52
|
+
*/
|
|
53
|
+
trace?: IOpenApiPathMethod;
|
|
54
|
+
/**
|
|
55
|
+
* A QUERY operation on the path.
|
|
56
|
+
*/
|
|
57
|
+
query?: IOpenApiPathMethod;
|
|
58
|
+
/**
|
|
59
|
+
* Additional non-standard HTTP operations keyed by method name.
|
|
60
|
+
*/
|
|
61
|
+
additionalOperations?: {
|
|
62
|
+
[method: string]: IOpenApiPathMethod;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Alternative servers for this path.
|
|
66
|
+
*/
|
|
67
|
+
servers?: IOpenApiServer[];
|
|
68
|
+
/**
|
|
69
|
+
* Shared parameters for all operations on this path.
|
|
70
|
+
*/
|
|
71
|
+
parameters?: (IOpenApiParameter | IOpenApiReference)[];
|
|
72
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { IOpenApiExternalDocumentation } from "./IOpenApiExternalDocumentation.js";
|
|
2
|
+
import type { IOpenApiParameter } from "./IOpenApiParameter.js";
|
|
3
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
4
|
+
import type { IOpenApiRequestBody } from "./IOpenApiRequestBody.js";
|
|
5
|
+
import type { IOpenApiResponses } from "./IOpenApiResponses.js";
|
|
6
|
+
import type { IOpenApiSecurityRequirement } from "./IOpenApiSecurityRequirement.js";
|
|
7
|
+
import type { IOpenApiServer } from "./IOpenApiServer.js";
|
|
8
|
+
/**
|
|
9
|
+
* An OpenAPI Operation Object.
|
|
10
|
+
* @see https://spec.openapis.org/oas/latest.html#operation-object
|
|
11
|
+
*/
|
|
12
|
+
export interface IOpenApiPathMethod {
|
|
13
|
+
/**
|
|
14
|
+
* Tags for the operation.
|
|
15
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
16
|
+
*/
|
|
17
|
+
tags?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* A short summary of the operation.
|
|
20
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
21
|
+
*/
|
|
22
|
+
summary?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A verbose description of the operation.
|
|
25
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
26
|
+
*/
|
|
27
|
+
description?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Additional external documentation for the operation.
|
|
30
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
31
|
+
*/
|
|
32
|
+
externalDocs?: IOpenApiExternalDocumentation;
|
|
33
|
+
/**
|
|
34
|
+
* A unique identifier for the operation.
|
|
35
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
36
|
+
*/
|
|
37
|
+
operationId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Parameters for the operation.
|
|
40
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
41
|
+
*/
|
|
42
|
+
parameters?: (IOpenApiParameter | IOpenApiReference)[];
|
|
43
|
+
/**
|
|
44
|
+
* The request body for the operation.
|
|
45
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
46
|
+
*/
|
|
47
|
+
requestBody?: IOpenApiRequestBody | IOpenApiReference;
|
|
48
|
+
/**
|
|
49
|
+
* The responses for the operation.
|
|
50
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
51
|
+
*/
|
|
52
|
+
responses: IOpenApiResponses;
|
|
53
|
+
/**
|
|
54
|
+
* Callbacks related to the operation.
|
|
55
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
56
|
+
*/
|
|
57
|
+
callbacks?: {
|
|
58
|
+
[id: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Whether the operation is deprecated.
|
|
62
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
63
|
+
*/
|
|
64
|
+
deprecated?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Security requirements for the operation.
|
|
67
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
68
|
+
*/
|
|
69
|
+
security?: IOpenApiSecurityRequirement[];
|
|
70
|
+
/**
|
|
71
|
+
* Alternative servers for the operation.
|
|
72
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-7
|
|
73
|
+
*/
|
|
74
|
+
servers?: IOpenApiServer[];
|
|
75
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An OpenAPI Reference Object.
|
|
3
|
+
* @see https://spec.openapis.org/oas/latest.html#reference-object
|
|
4
|
+
*/
|
|
5
|
+
export interface IOpenApiReference {
|
|
6
|
+
/**
|
|
7
|
+
* The reference identifier.
|
|
8
|
+
*/
|
|
9
|
+
$ref: string;
|
|
10
|
+
/**
|
|
11
|
+
* A summary override for the referenced object.
|
|
12
|
+
*/
|
|
13
|
+
summary?: string;
|
|
14
|
+
/**
|
|
15
|
+
* A description override for the referenced object.
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IOpenApiMediaType } from "./IOpenApiMediaType.js";
|
|
2
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
3
|
+
/**
|
|
4
|
+
* An OpenAPI Request Body Object.
|
|
5
|
+
* @see https://spec.openapis.org/oas/latest.html#request-body-object
|
|
6
|
+
*/
|
|
7
|
+
export interface IOpenApiRequestBody {
|
|
8
|
+
/**
|
|
9
|
+
* A brief description of the request body.
|
|
10
|
+
*/
|
|
11
|
+
description?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The content of the request body.
|
|
14
|
+
*/
|
|
15
|
+
content: {
|
|
16
|
+
[contentType: string]: IOpenApiMediaType | IOpenApiReference;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Whether the request body is required.
|
|
20
|
+
*/
|
|
21
|
+
required?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IOpenApiHeader } from "./IOpenApiHeader.js";
|
|
2
|
+
import type { IOpenApiMediaType } from "./IOpenApiMediaType.js";
|
|
3
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
4
|
+
/**
|
|
5
|
+
* An OpenAPI Response Object.
|
|
6
|
+
* @see https://spec.openapis.org/oas/latest.html#response-object
|
|
7
|
+
*/
|
|
8
|
+
export interface IOpenApiResponse {
|
|
9
|
+
/**
|
|
10
|
+
* A short summary of the meaning of the response.
|
|
11
|
+
*/
|
|
12
|
+
summary?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A description of the response.
|
|
15
|
+
*/
|
|
16
|
+
description: string;
|
|
17
|
+
/**
|
|
18
|
+
* The headers for the response.
|
|
19
|
+
*/
|
|
20
|
+
headers?: {
|
|
21
|
+
[id: string]: IOpenApiHeader | IOpenApiReference;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The content for the response.
|
|
25
|
+
*/
|
|
26
|
+
content?: {
|
|
27
|
+
[contentType: string]: IOpenApiMediaType | IOpenApiReference;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Design-time links from this response.
|
|
31
|
+
*/
|
|
32
|
+
links?: {
|
|
33
|
+
[id: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IOpenApiReference } from "./IOpenApiReference.js";
|
|
2
|
+
import type { IOpenApiResponse } from "./IOpenApiResponse.js";
|
|
3
|
+
/**
|
|
4
|
+
* An OpenAPI Responses Object.
|
|
5
|
+
* @see https://spec.openapis.org/oas/latest.html#responses-object
|
|
6
|
+
*/
|
|
7
|
+
export interface IOpenApiResponses {
|
|
8
|
+
/**
|
|
9
|
+
* Named HTTP status code or status code range responses.
|
|
10
|
+
* @see https://spec.openapis.org/oas/latest.html#patterned-fields-0
|
|
11
|
+
*/
|
|
12
|
+
[code: string]: IOpenApiResponse | IOpenApiReference | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The default response for otherwise undeclared status codes.
|
|
15
|
+
* @see https://spec.openapis.org/oas/latest.html#fixed-fields-13
|
|
16
|
+
*/
|
|
17
|
+
default?: IOpenApiResponse | IOpenApiReference;
|
|
18
|
+
}
|