Skip to content

Commit 4c0f669

Browse files
authored
chore: Update openapi3-ts package (#303)
* chore: Update openapi3-ts package This is improving the type safety of the overall project and prepare for supporting oas3.1 * Fix schemaToTypeAlias ref resolution * Add missing unit tests
1 parent 79a5544 commit 4c0f669

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+246
-243
lines changed

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"got": "^12.0.0",
4545
"got-fetch": "^5.1.1",
4646
"js-yaml": "^4.1.0",
47-
"openapi3-ts": "^2.0.1",
47+
"openapi3-ts": "^4.4.0",
4848
"prettier": "^3.2.5",
4949
"slash": "^4.0.0",
5050
"swagger2openapi": "^7.0.8",

cli/src/core/parseOpenAPISourceFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OpenAPIObject } from "openapi3-ts";
1+
import { OpenAPIObject } from "openapi3-ts/oas30";
22

33
import type { OpenAPISourceFile } from "../types";
44

cli/src/fixtures/petstore-expanded.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OpenAPIObject } from "openapi3-ts";
1+
import { OpenAPIObject } from "openapi3-ts/oas30";
22

33
export const petstore: OpenAPIObject = {
44
openapi: "3.0.0",

cli/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OpenAPIObject } from "openapi3-ts";
1+
import { OpenAPIObject } from "openapi3-ts/oas30";
22

33
/**
44
* OpenAPI source file.

cli/src/types/swagger2openapi.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module "swagger2openapi" {
2-
import { OpenAPIObject } from "openapi3-ts";
2+
import { OpenAPIObject } from "openapi3-ts/oas30";
33
interface ConverObjCallbackData {
44
openapi: OpenAPIObject;
55
}

plugins/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"case": "^1.6.3",
3232
"lodash": "^4.17.21",
33-
"openapi3-ts": "^2.0.1",
33+
"openapi3-ts": "^4.4.0",
3434
"pluralize": "^8.0.0",
3535
"tslib": "^2.3.1",
3636
"tsutils": "^3.21.0",

plugins/typescript/src/core/createOperationFetcherFnNodes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OperationObject } from "openapi3-ts";
1+
import { OperationObject } from "openapi3-ts/oas30";
22
import ts, { factory as f } from "typescript";
33
import { camelizedPathParams } from "./camelizedPathParams";
44

plugins/typescript/src/core/createOperationQueryFnNodes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { camelCase } from "lodash";
2-
import { OperationObject } from "openapi3-ts";
2+
import { OperationObject } from "openapi3-ts/oas30";
33
import ts, { factory as f } from "typescript";
44
import { camelizedPathParams } from "./camelizedPathParams";
55

plugins/typescript/src/core/createWatermark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InfoObject } from "openapi3-ts";
1+
import { InfoObject } from "openapi3-ts/oas30";
22
import { factory as f } from "typescript";
33

44
/**

plugins/typescript/src/core/findCompatibleMediaType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
MediaTypeObject,
33
RequestBodyObject,
44
ResponseObject,
5-
} from "openapi3-ts";
5+
} from "openapi3-ts/oas30";
66

77
/**
88
* Returns the first compatible media type.

0 commit comments

Comments
 (0)