fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Correct field ordering in spec types for linter

Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>

+33 -33
+1 -1
packages/openapi-ts/src/ir/types.d.ts
··· 41 41 parameters?: IRParametersObject; 42 42 path: keyof IRPathsObject; 43 43 responses?: IRResponsesObject; 44 + security?: ReadonlyArray<IRSecurityObject>; 44 45 servers?: ReadonlyArray<IRServerObject>; 45 46 summary?: string; 46 47 tags?: ReadonlyArray<string>; 47 - security?: ReadonlyArray<IRSecurityObject>; 48 48 } 49 49 50 50 interface IRParametersObject {
+17 -17
packages/openapi-ts/src/openApi/3.0.x/types/spec.d.ts
··· 494 494 */ 495 495 security?: ReadonlyArray<SecurityRequirementObject>; 496 496 /** 497 + * An alternative `servers` array to service this operation. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-servers Path Item Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value. 498 + */ 499 + servers?: ReadonlyArray<ServerObject>; 500 + /** 497 501 * A short summary of what the operation does. 498 502 */ 499 503 summary?: string; ··· 501 505 * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. 502 506 */ 503 507 tags?: ReadonlyArray<string>; 504 - /** 505 - * An alternative `servers` array to service this operation. If a `servers` array is specified at the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-servers Path Item Object} or {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#oas-servers OpenAPI Object} level, it will be overridden by this value. 506 - */ 507 - servers?: ReadonlyArray<ServerObject>; 508 508 } 509 509 510 510 /** ··· 594 594 */ 595 595 in: 'cookie' | 'header' | 'path' | 'query'; 596 596 /** 597 + * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_. 598 + * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-path path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating} for further information. 599 + * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored. 600 + * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} field. 601 + */ 602 + name: string; 603 + /** 597 604 * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in parameter location} is `"path"`, this field is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is `false`. 598 605 */ 599 606 required?: boolean; ··· 612 619 | 'pipeDelimited' 613 620 | 'simple' 614 621 | 'spaceDelimited'; 615 - /** 616 - * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_. 617 - * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-path path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path Templating} for further information. 618 - * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored. 619 - * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-in `in`} field. 620 - */ 621 - name: string; 622 622 } 623 623 624 624 /** ··· 924 924 */ 925 925 example?: unknown; 926 926 /** 927 + * The value of "exclusiveMaximum" MUST be a boolean, representing whether the limit in "maximum" is exclusive or not. An undefined value is the same as false. 928 + * 929 + * If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum". If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum". 930 + */ 931 + exclusiveMaximum?: boolean; 932 + /** 927 933 * The value of "exclusiveMinimum" MUST be a boolean, representing whether the limit in "minimum" is exclusive or not. An undefined value is the same as false. 928 934 * 929 935 * If "exclusiveMinimum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "minimum". If "exclusiveMinimum" is false (or not specified), then a numeric instance MAY be equal to the value of "minimum". ··· 1077 1083 * This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. 1078 1084 */ 1079 1085 xml?: XMLObject; 1080 - /** 1081 - * The value of "exclusiveMaximum" MUST be a boolean, representing whether the limit in "maximum" is exclusive or not. An undefined value is the same as false. 1082 - * 1083 - * If "exclusiveMaximum" is true, then a numeric instance SHOULD NOT be equal to the value specified in "maximum". If "exclusiveMaximum" is false (or not specified), then a numeric instance MAY be equal to the value of "maximum". 1084 - */ 1085 - exclusiveMaximum?: boolean; 1086 1086 } 1087 1087 1088 1088 /**
+4 -4
packages/openapi-ts/src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts
··· 67 67 */ 68 68 dependentRequired?: Record<string, ReadonlyArray<string>>; 69 69 /** 70 + * The `dependentSchemas` keyword conditionally applies a {@link https://json-schema.org/learn/glossary#subschema subschema} when a given property is present. This schema is applied in the same way {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} applies schemas. Nothing is merged or extended. Both schemas apply independently. 71 + */ 72 + dependentSchemas?: Record<string, JsonSchemaDraft2020_12>; 73 + /** 70 74 * The `deprecated` keyword is a boolean that indicates that the {@link https://json-schema.org/learn/glossary#instance instance} value the keyword applies to should not be used and may be removed in the future. 71 75 */ 72 76 deprecated?: boolean; ··· 152 156 * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request. 153 157 */ 154 158 writeOnly?: boolean; 155 - /** 156 - * The `dependentSchemas` keyword conditionally applies a {@link https://json-schema.org/learn/glossary#subschema subschema} when a given property is present. This schema is applied in the same way {@link https://json-schema.org/understanding-json-schema/reference/combining#allof allOf} applies schemas. Nothing is merged or extended. Both schemas apply independently. 157 - */ 158 - dependentSchemas?: Record<string, JsonSchemaDraft2020_12>; 159 159 } 160 160 161 161 interface ArrayKeywords {
+11 -11
packages/openapi-ts/src/openApi/3.1.x/types/spec.d.ts
··· 1088 1088 */ 1089 1089 security?: ReadonlyArray<SecurityRequirementObject>; 1090 1090 /** 1091 + * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value. 1092 + */ 1093 + servers?: ReadonlyArray<ServerObject>; 1094 + /** 1091 1095 * A short summary of what the operation does. 1092 1096 */ 1093 1097 summary?: string; ··· 1095 1099 * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. 1096 1100 */ 1097 1101 tags?: ReadonlyArray<string>; 1098 - /** 1099 - * An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value. 1100 - */ 1101 - servers?: ReadonlyArray<ServerObject>; 1102 1102 } 1103 1103 1104 1104 /** ··· 1241 1241 */ 1242 1242 in: 'cookie' | 'header' | 'path' | 'query'; 1243 1243 /** 1244 + * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_. 1245 + * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information. 1246 + * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored. 1247 + * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property. 1248 + */ 1249 + name: string; 1250 + /** 1244 1251 * Determines whether this parameter is mandatory. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn parameter location} is `"path"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`. 1245 1252 */ 1246 1253 required?: boolean; ··· 1259 1266 | 'pipeDelimited' 1260 1267 | 'simple' 1261 1268 | 'spaceDelimited'; 1262 - /** 1263 - * **REQUIRED**. The name of the parameter. Parameter names are _case sensitive_. 1264 - * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"path"`, the `name` field MUST correspond to a template expression occurring within the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsPath path} field in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object Paths Object}. See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path Templating} for further information. 1265 - * - If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored. 1266 - * - For all other cases, the `name` corresponds to the parameter name used by the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterIn `in`} property. 1267 - */ 1268 - name: string; 1269 1269 } 1270 1270 1271 1271 /**