openapi-types
Advanced tools
Comparing version 7.2.3 to 8.0.0
@@ -58,17 +58,21 @@ export declare namespace OpenAPI { | ||
} | ||
interface PathItemObject<T extends {} = {}> { | ||
enum HttpMethods { | ||
GET = "get", | ||
PUT = "put", | ||
POST = "post", | ||
DELETE = "delete", | ||
OPTIONS = "options", | ||
HEAD = "head", | ||
PATCH = "patch", | ||
TRACE = "trace" | ||
} | ||
type PathItemObject<T extends {} = {}> = { | ||
$ref?: string; | ||
summary?: string; | ||
description?: string; | ||
get?: OperationObject<T>; | ||
put?: OperationObject<T>; | ||
post?: OperationObject<T>; | ||
delete?: OperationObject<T>; | ||
options?: OperationObject<T>; | ||
head?: OperationObject<T>; | ||
patch?: OperationObject<T>; | ||
trace?: OperationObject<T>; | ||
servers?: ServerObject[]; | ||
parameters?: (ReferenceObject | ParameterObject)[]; | ||
} | ||
} & { | ||
[method in HttpMethods]?: OperationObject<T>; | ||
}; | ||
type OperationObject<T extends {} = {}> = { | ||
@@ -454,14 +458,17 @@ tags?: string[]; | ||
} | ||
interface PathItemObject<T extends {} = {}> { | ||
enum HttpMethods { | ||
GET = "get", | ||
PUT = "put", | ||
POST = "post", | ||
DELETE = "delete", | ||
OPTIONS = "options", | ||
HEAD = "head", | ||
PATCH = "patch" | ||
} | ||
type PathItemObject<T extends {} = {}> = { | ||
$ref?: string; | ||
get?: OperationObject<T>; | ||
put?: OperationObject<T>; | ||
post?: OperationObject<T>; | ||
del?: OperationObject<T>; | ||
delete?: OperationObject<T>; | ||
options?: OperationObject<T>; | ||
head?: OperationObject<T>; | ||
patch?: OperationObject<T>; | ||
parameters?: Parameters; | ||
} | ||
} & { | ||
[method in HttpMethods]?: OperationObject<T>; | ||
}; | ||
interface PathsObject<T extends {} = {}> { | ||
@@ -468,0 +475,0 @@ [index: string]: PathItemObject<T> | any; |
"use strict"; | ||
exports.__esModule = true; | ||
exports.OpenAPIV2 = exports.OpenAPIV3 = void 0; | ||
var OpenAPIV3; | ||
(function (OpenAPIV3) { | ||
// All HTTP methods allowed by OpenAPI 3 spec | ||
// See https://swagger.io/specification/#path-item-object | ||
// You can use keys or values from it in TypeScript code like this: | ||
// for (const method of Object.values(OpenAPIV3.HttpMethods)) { … } | ||
var HttpMethods; | ||
(function (HttpMethods) { | ||
HttpMethods["GET"] = "get"; | ||
HttpMethods["PUT"] = "put"; | ||
HttpMethods["POST"] = "post"; | ||
HttpMethods["DELETE"] = "delete"; | ||
HttpMethods["OPTIONS"] = "options"; | ||
HttpMethods["HEAD"] = "head"; | ||
HttpMethods["PATCH"] = "patch"; | ||
HttpMethods["TRACE"] = "trace"; | ||
})(HttpMethods = OpenAPIV3.HttpMethods || (OpenAPIV3.HttpMethods = {})); | ||
})(OpenAPIV3 = exports.OpenAPIV3 || (exports.OpenAPIV3 = {})); | ||
var OpenAPIV2; | ||
(function (OpenAPIV2) { | ||
// All HTTP methods allowed by OpenAPI 2 spec | ||
// See https://swagger.io/specification/v2#path-item-object | ||
// You can use keys or values from it in TypeScript code like this: | ||
// for (const method of Object.values(OpenAPIV2.HttpMethods)) { … } | ||
var HttpMethods; | ||
(function (HttpMethods) { | ||
HttpMethods["GET"] = "get"; | ||
HttpMethods["PUT"] = "put"; | ||
HttpMethods["POST"] = "post"; | ||
HttpMethods["DELETE"] = "delete"; | ||
HttpMethods["OPTIONS"] = "options"; | ||
HttpMethods["HEAD"] = "head"; | ||
HttpMethods["PATCH"] = "patch"; | ||
})(HttpMethods = OpenAPIV2.HttpMethods || (OpenAPIV2.HttpMethods = {})); | ||
})(OpenAPIV2 = exports.OpenAPIV2 || (exports.OpenAPIV2 = {})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "openapi-types", | ||
"version": "7.2.3", | ||
"version": "8.0.0", | ||
"description": "Types for OpenAPI documents.", | ||
@@ -24,3 +24,3 @@ "main": "./dist/index.js", | ||
"license": "MIT", | ||
"gitHead": "25d0114680050efe3b4f9b7d0cca9f9e88057daa" | ||
"gitHead": "ab875b574199c84fb215112d920aa821a61c632d" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25820
631