openapi3-ts
Advanced tools
Comparing version 4.0.3 to 4.0.4
# Changelog: openapi3-ts | ||
## Version 4.0.4 | ||
2023.04.10 | ||
- [#108](https://github.com/metadevpro/openapi3-ts/pull/108) Bug fix: Remove any type from `paths` by @samchungy. | ||
- [#109](https://github.com/metadevpro/openapi3-ts/pull/109) Bug fix: Fixup types `example` & `prefixItems` by @samchungy. | ||
## Version 4.0.3 | ||
@@ -4,0 +11,0 @@ |
@@ -88,3 +88,3 @@ "use strict"; | ||
addPath(path, pathItem) { | ||
this.rootDoc.paths = this.rootDoc.paths || []; | ||
this.rootDoc.paths = this.rootDoc.paths || {}; | ||
this.rootDoc.paths[path] = Object.assign(Object.assign({}, (this.rootDoc.paths[path] || {})), pathItem); | ||
@@ -91,0 +91,0 @@ return this; |
@@ -62,3 +62,3 @@ import { ServerObject } from './oas-common'; | ||
export interface PathsObject extends ISpecificationExtension { | ||
[path: string]: PathItemObject | any; | ||
[path: string]: PathItemObject; | ||
} | ||
@@ -245,3 +245,2 @@ export type PathObject = PathsObject; | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -248,0 +247,0 @@ export declare function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject; |
@@ -63,3 +63,3 @@ import { ServerObject } from './oas-common'; | ||
export interface PathsObject extends ISpecificationExtension { | ||
[path: string]: PathItemObject | any; | ||
[path: string]: PathItemObject; | ||
} | ||
@@ -214,3 +214,2 @@ export type PathObject = PathsObject; | ||
externalDocs?: ExternalDocumentationObject; | ||
example?: any; | ||
examples?: any[]; | ||
@@ -247,2 +246,3 @@ deprecated?: boolean; | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -249,0 +249,0 @@ export declare function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject; |
@@ -85,3 +85,3 @@ import * as yaml from 'yaml'; | ||
addPath(path, pathItem) { | ||
this.rootDoc.paths = this.rootDoc.paths || []; | ||
this.rootDoc.paths = this.rootDoc.paths || {}; | ||
this.rootDoc.paths[path] = { ...(this.rootDoc.paths[path] || {}), ...pathItem }; | ||
@@ -88,0 +88,0 @@ return this; |
@@ -62,3 +62,3 @@ import { ServerObject } from './oas-common'; | ||
export interface PathsObject extends ISpecificationExtension { | ||
[path: string]: PathItemObject | any; | ||
[path: string]: PathItemObject; | ||
} | ||
@@ -245,3 +245,2 @@ export type PathObject = PathsObject; | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -248,0 +247,0 @@ export declare function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject; |
@@ -63,3 +63,3 @@ import { ServerObject } from './oas-common'; | ||
export interface PathsObject extends ISpecificationExtension { | ||
[path: string]: PathItemObject | any; | ||
[path: string]: PathItemObject; | ||
} | ||
@@ -214,3 +214,2 @@ export type PathObject = PathsObject; | ||
externalDocs?: ExternalDocumentationObject; | ||
example?: any; | ||
examples?: any[]; | ||
@@ -247,2 +246,3 @@ deprecated?: boolean; | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -249,0 +249,0 @@ export declare function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject; |
{ | ||
"name": "openapi3-ts", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "TS Model & utils for OpenAPI 3.x specification.", | ||
@@ -39,8 +39,8 @@ "main": "dist/cjs/index.js", | ||
"@types/node": "^18.15.11", | ||
"@typescript-eslint/eslint-plugin": "^5.57.0", | ||
"@typescript-eslint/parser": "^5.57.0", | ||
"@vitest/coverage-c8": "^0.29.8", | ||
"@typescript-eslint/eslint-plugin": "^5.57.1", | ||
"@typescript-eslint/parser": "^5.57.1", | ||
"@vitest/coverage-c8": "^0.30.0", | ||
"c8": "^7.13.0", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.37.0", | ||
"eslint": "^8.38.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
@@ -50,6 +50,6 @@ "eslint-plugin-prettier": "^4.2.1", | ||
"rimraf": "^4.4.1", | ||
"typescript": "~5.0.3", | ||
"vitest": "^0.29.8", | ||
"typescript": "~5.0.4", | ||
"vitest": "^0.30.0", | ||
"vitest-teamcity-reporter": "^0.1.12" | ||
} | ||
} |
@@ -102,3 +102,3 @@ import * as yaml from 'yaml'; | ||
addPath(path: string, pathItem: oa.PathItemObject): OpenApiBuilder { | ||
this.rootDoc.paths = this.rootDoc.paths || []; | ||
this.rootDoc.paths = this.rootDoc.paths || {}; | ||
this.rootDoc.paths[path] = { ...(this.rootDoc.paths[path] || {}), ...pathItem }; | ||
@@ -105,0 +105,0 @@ return this; |
@@ -58,3 +58,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
// [path: string]: PathItemObject; | ||
[path: string]: PathItemObject | any; // Hack for allowing ISpecificationExtension | ||
[path: string]: PathItemObject | ||
} | ||
@@ -312,3 +312,2 @@ | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -315,0 +314,0 @@ |
@@ -60,3 +60,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
// [path: string]: PathItemObject; | ||
[path: string]: PathItemObject | any; // Hack for allowing ISpecificationExtension | ||
[path: string]: PathItemObject | ||
} | ||
@@ -273,6 +273,2 @@ | ||
externalDocs?: ExternalDocumentationObject; | ||
/** | ||
* |@deprecated Deprecated in v.3.1.0 in favour of examples | ||
* */ | ||
example?: any; | ||
examples?: any[]; | ||
@@ -321,2 +317,3 @@ deprecated?: boolean; | ||
enum?: any[]; | ||
prefixItems?: (SchemaObject | ReferenceObject)[]; | ||
} | ||
@@ -323,0 +320,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
207396
4584