Skip to content

Commit 78c6cf5

Browse files
committed
refactor: import schema object from another lib
1 parent dd536ee commit 78c6cf5

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/core/mask.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { beforeEach, describe, expect, it, vi } from "vitest";
22
import z, { type ZodType } from "zod";
33
import maskWithReference from "./mask";
4-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
4+
import type { SchemaObject } from "@omer-x/json-schema-types";
55

66

77
describe("maskWithReference", () => {

src/core/mask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import deepEqual from "~/utils/deepEqual";
22
import convertToOpenAPI from "./zod-to-openapi";
3-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
3+
import type { SchemaObject } from "@omer-x/json-schema-types";
44
import type { ZodType } from "zod";
55

66
export default function maskWithReference(

src/core/operation-mask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import maskWithReference from "./mask";
2+
import type { SchemaObject } from "@omer-x/json-schema-types";
23
import type { MediaTypeObject } from "@omer-x/openapi-types/media-type";
34
import type { OperationObject } from "@omer-x/openapi-types/operation";
45
import type { ParameterObject } from "@omer-x/openapi-types/parameter";
56
import type { ReferenceObject } from "@omer-x/openapi-types/reference";
67
import type { RequestBodyObject } from "@omer-x/openapi-types/request-body";
78
import type { ResponseObject, ResponsesObject } from "@omer-x/openapi-types/response";
8-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
99
import type { ZodType } from "zod";
1010

1111
function maskSchema(storedSchemas: Record<string, ZodType>, schema?: SchemaObject) {

src/core/schema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from "vitest";
22
import z from "zod";
33
import { bundleSchemas } from "./schema";
4-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
4+
import type { SchemaObject } from "@omer-x/json-schema-types";
55

66
describe("bundleSchemas", () => {
77
const mockSchemas = {

src/core/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import maskWithReference from "./mask";
22
import convertToOpenAPI from "./zod-to-openapi";
3-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
3+
import type { SchemaObject } from "@omer-x/json-schema-types";
44
import type { ZodType } from "zod";
55

66
export function bundleSchemas(schemas: Record<string, ZodType>) {

src/core/zod-to-openapi.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from "vitest";
22
import z from "zod";
33
import convertToOpenAPI from "./zod-to-openapi";
4-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
4+
import type { SchemaObject } from "@omer-x/json-schema-types";
55

66
describe("convertToOpenAPI", () => {
77
it("should convert a simple Zod schema to OpenAPI schema", () => {

src/core/zod-to-openapi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type ZodObject, type ZodType, z } from "zod";
2-
import type { SchemaObject } from "@omer-x/openapi-types/schema";
2+
import type { SchemaObject } from "@omer-x/json-schema-types";
33

44
function fixSchema(schema: ZodType<unknown>): ZodType<unknown> {
55
if ("unwrap" in schema && typeof schema.unwrap === "function") {

0 commit comments

Comments
 (0)