@tsed/openspec 8.11.0 → 8.11.2-rc.1

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.
Files changed (112) hide show
  1. package/lib/esm/common/OpenSpecExternalDocs.js +0 -1
  2. package/lib/esm/common/OpenSpecHash.js +0 -1
  3. package/lib/esm/common/OpenSpecInfo.js +0 -1
  4. package/lib/esm/common/OpenSpecJsonSchema.js +0 -1
  5. package/lib/esm/common/OpenSpecPath.js +0 -1
  6. package/lib/esm/common/OpenSpecRef.js +0 -1
  7. package/lib/esm/common/OpenSpecSecurity.js +0 -1
  8. package/lib/esm/common/OpenSpecTag.js +0 -1
  9. package/lib/esm/common/OpenSpecTypes.js +0 -1
  10. package/lib/esm/common/OpenSpecVersions.js +0 -1
  11. package/lib/esm/common/OpenSpecXML.js +0 -1
  12. package/lib/esm/index.js +0 -1
  13. package/lib/esm/openspec2/OS2Header.js +0 -1
  14. package/lib/esm/openspec2/OS2Operation.js +0 -1
  15. package/lib/esm/openspec2/OS2Parameter.js +0 -1
  16. package/lib/esm/openspec2/OS2Paths.js +0 -1
  17. package/lib/esm/openspec2/OS2Response.js +0 -1
  18. package/lib/esm/openspec2/OS2Schema.js +0 -1
  19. package/lib/esm/openspec2/OS2Security.js +0 -1
  20. package/lib/esm/openspec2/OpenSpec2.js +0 -1
  21. package/lib/esm/openspec3/OS3Callbacks.js +0 -1
  22. package/lib/esm/openspec3/OS3Components.js +0 -1
  23. package/lib/esm/openspec3/OS3Encoding.js +0 -1
  24. package/lib/esm/openspec3/OS3Example.js +0 -1
  25. package/lib/esm/openspec3/OS3Flows.js +0 -1
  26. package/lib/esm/openspec3/OS3Header.js +0 -1
  27. package/lib/esm/openspec3/OS3Link.js +0 -1
  28. package/lib/esm/openspec3/OS3MediaType.js +0 -1
  29. package/lib/esm/openspec3/OS3Operation.js +0 -1
  30. package/lib/esm/openspec3/OS3Parameter.js +0 -1
  31. package/lib/esm/openspec3/OS3Paths.js +0 -1
  32. package/lib/esm/openspec3/OS3RequestBody.js +0 -1
  33. package/lib/esm/openspec3/OS3Response.js +0 -1
  34. package/lib/esm/openspec3/OS3Schema.js +0 -1
  35. package/lib/esm/openspec3/OS3Security.js +0 -1
  36. package/lib/esm/openspec3/OS3Server.js +0 -1
  37. package/lib/esm/openspec3/OpenSpec3.js +0 -1
  38. package/package.json +7 -4
  39. package/lib/esm/common/OpenSpecExternalDocs.js.map +0 -1
  40. package/lib/esm/common/OpenSpecHash.js.map +0 -1
  41. package/lib/esm/common/OpenSpecInfo.js.map +0 -1
  42. package/lib/esm/common/OpenSpecJsonSchema.js.map +0 -1
  43. package/lib/esm/common/OpenSpecPath.js.map +0 -1
  44. package/lib/esm/common/OpenSpecRef.js.map +0 -1
  45. package/lib/esm/common/OpenSpecSecurity.js.map +0 -1
  46. package/lib/esm/common/OpenSpecTag.js.map +0 -1
  47. package/lib/esm/common/OpenSpecTypes.js.map +0 -1
  48. package/lib/esm/common/OpenSpecVersions.js.map +0 -1
  49. package/lib/esm/common/OpenSpecXML.js.map +0 -1
  50. package/lib/esm/index.js.map +0 -1
  51. package/lib/esm/openspec2/OS2Header.js.map +0 -1
  52. package/lib/esm/openspec2/OS2Operation.js.map +0 -1
  53. package/lib/esm/openspec2/OS2Parameter.js.map +0 -1
  54. package/lib/esm/openspec2/OS2Paths.js.map +0 -1
  55. package/lib/esm/openspec2/OS2Response.js.map +0 -1
  56. package/lib/esm/openspec2/OS2Schema.js.map +0 -1
  57. package/lib/esm/openspec2/OS2Security.js.map +0 -1
  58. package/lib/esm/openspec2/OpenSpec2.js.map +0 -1
  59. package/lib/esm/openspec3/OS3Callbacks.js.map +0 -1
  60. package/lib/esm/openspec3/OS3Components.js.map +0 -1
  61. package/lib/esm/openspec3/OS3Encoding.js.map +0 -1
  62. package/lib/esm/openspec3/OS3Example.js.map +0 -1
  63. package/lib/esm/openspec3/OS3Flows.js.map +0 -1
  64. package/lib/esm/openspec3/OS3Header.js.map +0 -1
  65. package/lib/esm/openspec3/OS3Link.js.map +0 -1
  66. package/lib/esm/openspec3/OS3MediaType.js.map +0 -1
  67. package/lib/esm/openspec3/OS3Operation.js.map +0 -1
  68. package/lib/esm/openspec3/OS3Parameter.js.map +0 -1
  69. package/lib/esm/openspec3/OS3Paths.js.map +0 -1
  70. package/lib/esm/openspec3/OS3RequestBody.js.map +0 -1
  71. package/lib/esm/openspec3/OS3Response.js.map +0 -1
  72. package/lib/esm/openspec3/OS3Schema.js.map +0 -1
  73. package/lib/esm/openspec3/OS3Security.js.map +0 -1
  74. package/lib/esm/openspec3/OS3Server.js.map +0 -1
  75. package/lib/esm/openspec3/OpenSpec3.js.map +0 -1
  76. package/src/common/OpenSpecExternalDocs.ts +0 -10
  77. package/src/common/OpenSpecHash.ts +0 -1
  78. package/src/common/OpenSpecInfo.ts +0 -52
  79. package/src/common/OpenSpecJsonSchema.ts +0 -153
  80. package/src/common/OpenSpecPath.ts +0 -10
  81. package/src/common/OpenSpecRef.ts +0 -3
  82. package/src/common/OpenSpecSecurity.ts +0 -3
  83. package/src/common/OpenSpecTag.ts +0 -7
  84. package/src/common/OpenSpecTypes.ts +0 -1
  85. package/src/common/OpenSpecVersions.ts +0 -3
  86. package/src/common/OpenSpecXML.ts +0 -22
  87. package/src/index.ts +0 -39
  88. package/src/openspec2/OS2Header.ts +0 -8
  89. package/src/openspec2/OS2Operation.ts +0 -65
  90. package/src/openspec2/OS2Parameter.ts +0 -65
  91. package/src/openspec2/OS2Paths.ts +0 -8
  92. package/src/openspec2/OS2Response.ts +0 -22
  93. package/src/openspec2/OS2Schema.ts +0 -39
  94. package/src/openspec2/OS2Security.ts +0 -58
  95. package/src/openspec2/OpenSpec2.ts +0 -73
  96. package/src/openspec3/OS3Callbacks.ts +0 -5
  97. package/src/openspec3/OS3Components.ts +0 -49
  98. package/src/openspec3/OS3Encoding.ts +0 -25
  99. package/src/openspec3/OS3Example.ts +0 -19
  100. package/src/openspec3/OS3Flows.ts +0 -49
  101. package/src/openspec3/OS3Header.ts +0 -18
  102. package/src/openspec3/OS3Link.ts +0 -25
  103. package/src/openspec3/OS3MediaType.ts +0 -24
  104. package/src/openspec3/OS3Operation.ts +0 -70
  105. package/src/openspec3/OS3Parameter.ts +0 -83
  106. package/src/openspec3/OS3Paths.ts +0 -29
  107. package/src/openspec3/OS3RequestBody.ts +0 -22
  108. package/src/openspec3/OS3Response.ts +0 -25
  109. package/src/openspec3/OS3Schema.ts +0 -51
  110. package/src/openspec3/OS3Security.ts +0 -63
  111. package/src/openspec3/OS3Server.ts +0 -31
  112. package/src/openspec3/OpenSpec3.ts +0 -44
package/src/index.ts DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * @file Automatically generated by @tsed/barrels.
3
- */
4
- export * from "./common/OpenSpecExternalDocs.js";
5
- export * from "./common/OpenSpecHash.js";
6
- export * from "./common/OpenSpecInfo.js";
7
- export * from "./common/OpenSpecJsonSchema.js";
8
- export * from "./common/OpenSpecPath.js";
9
- export * from "./common/OpenSpecRef.js";
10
- export * from "./common/OpenSpecSecurity.js";
11
- export * from "./common/OpenSpecTag.js";
12
- export * from "./common/OpenSpecTypes.js";
13
- export * from "./common/OpenSpecVersions.js";
14
- export * from "./common/OpenSpecXML.js";
15
- export * from "./openspec2/OpenSpec2.js";
16
- export * from "./openspec2/OS2Header.js";
17
- export * from "./openspec2/OS2Operation.js";
18
- export * from "./openspec2/OS2Parameter.js";
19
- export * from "./openspec2/OS2Paths.js";
20
- export * from "./openspec2/OS2Response.js";
21
- export * from "./openspec2/OS2Schema.js";
22
- export * from "./openspec2/OS2Security.js";
23
- export * from "./openspec3/OpenSpec3.js";
24
- export * from "./openspec3/OS3Callbacks.js";
25
- export * from "./openspec3/OS3Components.js";
26
- export * from "./openspec3/OS3Encoding.js";
27
- export * from "./openspec3/OS3Example.js";
28
- export * from "./openspec3/OS3Flows.js";
29
- export * from "./openspec3/OS3Header.js";
30
- export * from "./openspec3/OS3Link.js";
31
- export * from "./openspec3/OS3MediaType.js";
32
- export * from "./openspec3/OS3Operation.js";
33
- export * from "./openspec3/OS3Parameter.js";
34
- export * from "./openspec3/OS3Paths.js";
35
- export * from "./openspec3/OS3RequestBody.js";
36
- export * from "./openspec3/OS3Response.js";
37
- export * from "./openspec3/OS3Schema.js";
38
- export * from "./openspec3/OS3Security.js";
39
- export * from "./openspec3/OS3Server.js";
@@ -1,8 +0,0 @@
1
- import {OS2BaseSchema} from "./OS2Schema.js";
2
-
3
- export interface OS2Header extends OS2BaseSchema {
4
- /**
5
- * The type of the object. The value MUST be one of `string`, `number`, `integer`, `boolean`, or `array`.
6
- */
7
- type: "string" | "number" | "integer" | "boolean" | "array";
8
- }
@@ -1,65 +0,0 @@
1
- import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js";
2
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
3
- import {OpenSpecRef} from "../common/OpenSpecRef.js";
4
- import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js";
5
- import {OS2Parameter} from "./OS2Parameter.js";
6
- import {OS2Response} from "./OS2Response.js";
7
-
8
- export interface OS2Operation {
9
- /**
10
- * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
11
- */
12
- tags?: string[];
13
- /**
14
- * A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
15
- */
16
- summary?: string;
17
- /**
18
- * A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation.
19
- */
20
- description?: string;
21
- /**
22
- * Additional external documentation for this operation.
23
- */
24
- externalDocs?: OpenSpecExternalDocs;
25
- /**
26
- * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.
27
- */
28
- operationId?: string;
29
- /**
30
- * A list of MIME types the operation can consume. This overrides the consumes definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under [Mime Types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#mimeTypes).
31
- */
32
- consumes?: string[];
33
- /**
34
- * A list of MIME types the operation can produce. This overrides the produces definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under [Mime Types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#mimeTypes).
35
- */
36
- produces?: string[];
37
- /**
38
- * A list of parameters that are applicable for this operation.
39
- * If a parameter is already defined at the [Path Item](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathItemParameters),
40
- * the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters.
41
- * A unique parameter is defined by a combination of a [name](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameterName) and (location)[https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameterIn].
42
- * The list can use the [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#referenceObject) to link to parameters that are defined at the [Swagger Object's parameters](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swaggerParameters).
43
- * There can be one "body" parameter at most.
44
- */
45
- parameters?: (OS2Parameter | OpenSpecRef)[];
46
- /**
47
- * The list of possible responses as they are returned from executing this operation.
48
- */
49
- responses: OpenSpecHash<OS2Response | OpenSpecRef>;
50
- /**
51
- * The transfer protocol of the API. Values MUST be from the list: `http`, `https`, `ws`, `wss`. If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
52
- */
53
- schemes?: string[];
54
- /**
55
- * Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false.
56
- */
57
- deprecated?: boolean;
58
- /**
59
- * A declaration of which security schemes are applied for this operation.
60
- * The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements).
61
- * This definition overrides any declared top-level [security](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swaggerSecurity).
62
- * To remove a top-level security declaration, an empty array can be used.
63
- */
64
- security?: OpenSpecSecurity;
65
- }
@@ -1,65 +0,0 @@
1
- import {OpenSpecTypes} from "../common/OpenSpecTypes.js";
2
- import {OS2BaseSchema, OS2Schema} from "./OS2Schema.js";
3
-
4
- export type OS2BaseParameter = {
5
- name: string;
6
- in: "body" | "query" | "path" | "header" | "formData";
7
- required?: boolean;
8
- description?: string;
9
- };
10
-
11
- export type OS2BodyParameter = OS2BaseParameter & {
12
- in: "body";
13
- schema?: OS2Schema;
14
- };
15
-
16
- export type OS2GenericFormat = {
17
- type?: OpenSpecTypes;
18
- format?: string;
19
- };
20
-
21
- export type OS2IntegerFormat = {
22
- type: "integer";
23
- format?: "int32" | "int64";
24
- };
25
-
26
- export type OS2NumberFormat = {
27
- type: "number";
28
- format?: "float" | "double";
29
- };
30
-
31
- export type OS2StringFormat = {
32
- type: "string";
33
- format?: "" | "byte" | "binary" | "date" | "date-time" | "password";
34
- };
35
-
36
- export type OS2SchemaFormatConstraints = OS2GenericFormat | OS2IntegerFormat | OS2NumberFormat | OS2StringFormat;
37
- export type OS2BaseFormatContrainedParameter = OS2BaseParameter & OS2SchemaFormatConstraints;
38
- export type ParameterCollectionFormat = "csv" | "ssv" | "tsv" | "pipes" | "multi";
39
- export type OS2QueryParameter = OS2BaseFormatContrainedParameter &
40
- OS2BaseSchema & {
41
- in: "query";
42
- allowEmptyValue?: boolean;
43
- collectionFormat?: ParameterCollectionFormat;
44
- };
45
-
46
- export type OS2PathParameter = OS2BaseFormatContrainedParameter &
47
- OS2BaseSchema & {
48
- in: "path";
49
- required: true;
50
- };
51
-
52
- export type OS2HeaderParameter = OS2BaseFormatContrainedParameter &
53
- OS2BaseSchema & {
54
- in: "header";
55
- };
56
-
57
- export type OS2FormDataParameter = OS2BaseFormatContrainedParameter &
58
- OS2BaseSchema & {
59
- in: "formData";
60
- type: OpenSpecTypes;
61
- allowEmptyValue?: boolean;
62
- collectionFormat?: ParameterCollectionFormat;
63
- };
64
-
65
- export type OS2Parameter = OS2BodyParameter | OS2FormDataParameter | OS2QueryParameter | OS2PathParameter | OS2HeaderParameter;
@@ -1,8 +0,0 @@
1
- import {OpenSpecPath} from "../common/OpenSpecPath.js";
2
- import {OpenSpecRef} from "../common/OpenSpecRef.js";
3
- import {OS2Operation} from "./OS2Operation.js";
4
- import {OS2Parameter} from "./OS2Parameter.js";
5
-
6
- export interface OS2Paths extends OpenSpecPath<OS2Operation> {
7
- parameters?: (OS2Parameter | OpenSpecRef)[];
8
- }
@@ -1,22 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OS2Header} from "./OS2Header.js";
3
- import {OS2Schema} from "./OS2Schema.js";
4
-
5
- export interface OS2Response {
6
- /**
7
- * A short description of the response. GFM syntax can be used for rich text representation.
8
- */
9
- description: string;
10
- /**
11
- * A definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the Schema Object, its root type value may also be "file". This SHOULD be accompanied by a relevant produces mime-type.
12
- */
13
- schema?: OS2Schema;
14
- /**
15
- * A list of headers that are sent with the response.
16
- */
17
- headers?: OpenSpecHash<OS2Header>;
18
- /**
19
- * An example of the response message.
20
- */
21
- examples?: OpenSpecHash<{}>;
22
- }
@@ -1,39 +0,0 @@
1
- import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js";
2
- import {OpenSpecBaseJsonSchema, OpenSpecJsonSchema} from "../common/OpenSpecJsonSchema.js";
3
- import {OpenSpecRef} from "../common/OpenSpecRef.js";
4
- import {OpenSpecXML} from "../common/OpenSpecXML.js";
5
-
6
- export interface OS2XML {
7
- name?: string;
8
- namespace?: string;
9
- prefix?: string;
10
- attribute?: boolean;
11
- wrapped?: boolean;
12
- }
13
-
14
- export interface OS2BaseSchema extends OpenSpecBaseJsonSchema {
15
- /**
16
- * Required if type is "array". Describes the type of items in the array.
17
- */
18
- items?: OS2Schema | OpenSpecRef;
19
- }
20
-
21
- export interface OS2Schema extends OpenSpecJsonSchema<OS2Schema> {
22
- /**
23
- * Adds support for polymorphism.
24
- * The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.
25
- */
26
- discriminator?: string;
27
- /**
28
- * Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.
29
- */
30
- readOnly?: boolean;
31
- /**
32
- * This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.
33
- */
34
- xml?: OpenSpecXML;
35
- /**
36
- * Additional external documentation for this schema.
37
- */
38
- externalDocs?: OpenSpecExternalDocs;
39
- }
@@ -1,58 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
-
3
- export interface OS2SecurityBase {
4
- /**
5
- * The type of the security scheme
6
- */
7
- type: "basic" | "apiKey" | "oauth2";
8
- /**
9
- *
10
- */
11
- description?: string;
12
- }
13
-
14
- export interface OS2SecurityBasic extends OS2SecurityBase {
15
- type: "basic";
16
- }
17
-
18
- export interface OS2SecurityApiKey extends OS2SecurityBase {
19
- type: "apiKey";
20
- name: string;
21
- in: "query" | "header";
22
- }
23
-
24
- export interface OS2SecurityOAuth extends OS2SecurityBase {
25
- type: "oauth2";
26
- flow: "accessCode" | "application" | "implicit" | "password";
27
- /**
28
- * The available scopes for the OAuth2 security scheme.
29
- */
30
- scopes: OpenSpecHash<string>;
31
- }
32
-
33
- export interface OS2FlowImplicit extends OS2SecurityOAuth {
34
- type: "oauth2";
35
- flow: "implicit";
36
- authorizationUrl: string;
37
- }
38
-
39
- export interface OS2FlowPassword extends OS2SecurityOAuth {
40
- type: "oauth2";
41
- flow: "password";
42
- tokenUrl: string;
43
- }
44
-
45
- export interface OS2FlowApplication extends OS2SecurityOAuth {
46
- type: "oauth2";
47
- flow: "application";
48
- tokenUrl: string;
49
- }
50
-
51
- export interface OS2FlowAccessCode extends OS2SecurityOAuth {
52
- type: "oauth2";
53
- flow: "accessCode";
54
- tokenUrl: string;
55
- authorizationUrl: string;
56
- }
57
-
58
- export type OS2Security = OS2SecurityBasic | OS2FlowAccessCode | OS2FlowApplication | OS2FlowImplicit | OS2FlowPassword | OS2SecurityApiKey;
@@ -1,73 +0,0 @@
1
- import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js";
2
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
3
- import {OpenSpecInfo} from "../common/OpenSpecInfo.js";
4
- import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js";
5
- import {OpenSpecTag} from "../common/OpenSpecTag.js";
6
- import {OS2BodyParameter, OS2QueryParameter} from "./OS2Parameter.js";
7
- import {OS2Paths} from "./OS2Paths.js";
8
- import {OS2Response} from "./OS2Response.js";
9
- import {OS2Schema} from "./OS2Schema.js";
10
- import {OS2Security} from "./OS2Security.js";
11
-
12
- export interface OpenSpec2 {
13
- /**
14
- * Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be "2.0".
15
- */
16
- swagger: string;
17
- /**
18
- * Provides metadata about the API. The metadata can be used by the clients if needed.
19
- */
20
- info?: OpenSpecInfo;
21
- /**
22
- * The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support [path templating](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathTemplating).
23
- */
24
- host?: string;
25
- /**
26
- * The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path [path templating](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathTemplating).
27
- */
28
- basePath?: string;
29
- /**
30
- * The transfer protocol of the API. Values MUST be from the list: `http`, `https`, `ws`, `wss`. If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
31
- */
32
- schemes?: ("http" | "https" | "ws" | "wss")[];
33
- /**
34
- * A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under [Mime Types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#mimeTypes).
35
- */
36
- consumes?: string[];
37
- /**
38
- * A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under [Mime Types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#mimeTypes).
39
- */
40
- produces?: string[];
41
- /**
42
- * The available paths and operations for the API.
43
- */
44
- paths?: OpenSpecHash<OS2Paths>;
45
- /**
46
- * An object to hold data types produced and consumed by operations.
47
- */
48
- definitions?: OpenSpecHash<OS2Schema>;
49
- /**
50
- * An object to hold parameters that can be used across operations. This property does not define global parameters for all operations.
51
- */
52
- parameters?: OpenSpecHash<OS2BodyParameter | OS2QueryParameter>;
53
- /**
54
- * An object to hold responses that can be used across operations. This property does not define global responses for all operations.
55
- */
56
- responses?: OpenSpecHash<OS2Response>;
57
- /**
58
- * A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.
59
- */
60
- security?: OpenSpecSecurity;
61
- /**
62
- * Security scheme definitions that can be used across the specification.
63
- */
64
- securityDefinitions?: OpenSpecHash<OS2Security>;
65
- /**
66
- * A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
67
- */
68
- tags?: OpenSpecTag[];
69
- /**
70
- * Additional external documentation.
71
- */
72
- externalDocs?: OpenSpecExternalDocs;
73
- }
@@ -1,5 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OS3Paths} from "./OS3Paths.js";
3
- import {OS3Schema} from "./OS3Schema.js";
4
-
5
- export type OS3Callbacks<Schema = OS3Schema> = OpenSpecHash<OpenSpecHash<OS3Paths<Schema>>>;
@@ -1,49 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OS3Callbacks} from "./OS3Callbacks.js";
3
- import {OS3Example} from "./OS3Example.js";
4
- import {OS3Header} from "./OS3Header.js";
5
- import {OS3Link} from "./OS3Link.js";
6
- import {OS3Parameter} from "./OS3Parameter.js";
7
- import {OS3RequestBody} from "./OS3RequestBody.js";
8
- import {OS3Response} from "./OS3Response.js";
9
- import {OS3Schema} from "./OS3Schema.js";
10
- import {OS3Security} from "./OS3Security.js";
11
-
12
- export interface OS3Components<Schema = OS3Schema> {
13
- /**
14
- * An object to hold reusable [Schema Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#schemaObject).
15
- */
16
- schemas?: OpenSpecHash<Schema>;
17
- /**
18
- * An object to hold reusable [Response Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#responseObject).
19
- */
20
- responses?: OpenSpecHash<OS3Response<Schema>>;
21
- /**
22
- * An object to hold reusable [Parameter Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterObject).
23
- */
24
- parameters?: OpenSpecHash<OS3Parameter<Schema>>;
25
- /**
26
- * An object to hold reusable [Example Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#exampleObject).
27
- */
28
- examples?: OpenSpecHash<OS3Example>;
29
- /**
30
- * An object to hold reusable [Request Body Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#requestBodyObject).
31
- */
32
- requestBodies?: OpenSpecHash<OS3RequestBody<Schema>>;
33
- /**
34
- * An object to hold reusable [Header Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#headerObject).
35
- */
36
- headers?: OpenSpecHash<OS3Header<Schema>>;
37
- /**
38
- * An object to hold reusable [Security Scheme Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#securitySchemeObject).
39
- */
40
- securitySchemes?: OpenSpecHash<OS3Security>;
41
- /**
42
- * An object to hold reusable [Link Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#linkObject).
43
- */
44
- links?: OpenSpecHash<OS3Link>;
45
- /**
46
- * An object to hold reusable [Callback Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#callbackObject).
47
- */
48
- callbacks?: OS3Callbacks;
49
- }
@@ -1,25 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OS3Header} from "./OS3Header.js";
3
-
4
- export interface OS3Encoding {
5
- /**
6
- * The `Content-Type` for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` – `application/octet-stream`; for other primitive types – `text/plain`; for `object` - application/json; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types.
7
- */
8
- contentType?: string;
9
- /**
10
- * A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
11
- */
12
- headers?: OpenSpecHash<OS3Header>;
13
- /**
14
- * Describes how a specific property value will be serialized depending on its type. See [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterObject) for details on the `[style](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterStyle)` property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
15
- */
16
- style?: string;
17
- /**
18
- * When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When `[style](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterStyle)` is `form`, the default value is true. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
19
- */
20
- explode?: boolean;
21
- /**
22
- * Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
23
- */
24
- allowReserved?: boolean;
25
- }
@@ -1,19 +0,0 @@
1
- export interface OS3Example {
2
- /**
3
- * Short description for the example.
4
- */
5
- summary?: string;
6
- /**
7
- * Long description for the example. CommonMark syntax MAY be used for rich text representation.
8
- */
9
- description?: string;
10
- /**
11
- * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
12
- */
13
- value?: any;
14
- /**
15
- * A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents.
16
- * The `value` field and `externalValue` field are mutually exclusive.
17
- */
18
- externalValue?: string;
19
- }
@@ -1,49 +0,0 @@
1
- export interface OS3Flow {
2
- /**
3
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
4
- */
5
- refreshUrl?: string;
6
- /**
7
- * The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
8
- */
9
- scopes: {[key: string]: string};
10
- }
11
-
12
- export interface OS3FlowImplicit extends OS3Flow {
13
- /**
14
- * The authorization URL to be used for this flow. This MUST be in the form of a URL.
15
- */
16
- authorizationUrl: string;
17
- }
18
-
19
- export interface OS3FlowPassword extends OS3Flow {
20
- /**
21
- * The token URL to be used for this flow. This MUST be in the form of a URL.
22
- */
23
- tokenUrl: string;
24
- }
25
-
26
- export interface OS3FlowClientCredentials extends OS3Flow {
27
- /**
28
- * The token URL to be used for this flow. This MUST be in the form of a URL.
29
- */
30
- tokenUrl: string;
31
- }
32
-
33
- export interface OS3FlowAuthorizationCode extends OS3Flow {
34
- /**
35
- * The authorization URL to be used for this flow. This MUST be in the form of a URL.
36
- */
37
- authorizationUrl: string;
38
- /**
39
- * The token URL to be used for this flow. This MUST be in the form of a URL.
40
- */
41
- tokenUrl: string;
42
- }
43
-
44
- export interface OS3Flows {
45
- implicit?: OS3FlowImplicit;
46
- password?: OS3FlowPassword;
47
- clientCredentials?: OS3FlowClientCredentials;
48
- authorizationCode?: OS3FlowAuthorizationCode;
49
- }
@@ -1,18 +0,0 @@
1
- import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js";
2
- import {OpenSpecRef} from "../common/OpenSpecRef.js";
3
- import {OS3Schema} from "./OS3Schema.js";
4
-
5
- export interface OS3Header<Schema = OS3Schema> {
6
- /**
7
- * A description of the header. CommonMark syntax MAY be used for rich text representation.
8
- */
9
- description?: string;
10
- /**
11
- * The schema defining the type used for the header.
12
- */
13
- schema?: Schema | OpenSpecRef;
14
- /**
15
- * Additional external documentation for this tag.
16
- */
17
- externalDocs?: OpenSpecExternalDocs;
18
- }
@@ -1,25 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OS3Server} from "./OS3Server.js";
3
-
4
- export interface OS3Link {
5
- /**
6
- * A relative or absolute reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI definition.
7
- */
8
- operationRef?: string;
9
- /**
10
- * The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field.
11
- */
12
- operationId?: string;
13
- /**
14
- * A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the parameter location [{in}.]{name} for operations that use the same [parameter name](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterIn) in different locations (e.g. path.id).
15
- */
16
- parameters?: OpenSpecHash<any>;
17
- /**
18
- * A description of the link. CommonMark syntax MAY be used for rich text representation.
19
- */
20
- description?: string;
21
- /**
22
- * A server object to be used by the target operation.
23
- */
24
- server?: OS3Server;
25
- }
@@ -1,24 +0,0 @@
1
- import {OpenSpecHash} from "../common/OpenSpecHash.js";
2
- import {OpenSpecRef} from "../common/OpenSpecRef.js";
3
- import {OS3Encoding} from "./OS3Encoding.js";
4
- import {OS3Example} from "./OS3Example.js";
5
- import {OS3Schema} from "./OS3Schema.js";
6
-
7
- export interface OS3MediaType<Schema = OS3Schema> {
8
- /**
9
- * The schema defining the type used for the request body.
10
- */
11
- schema?: Schema | OpenSpecRef;
12
- /**
13
- * Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
14
- */
15
- example?: any;
16
- /**
17
- * Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
18
- */
19
- examples?: OpenSpecHash<OS3Example | OpenSpecRef>;
20
- /**
21
- * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
22
- */
23
- encoding?: OpenSpecHash<OS3Encoding>;
24
- }