11import { describe , expect , it } from "vitest" ;
22import z from "zod" ;
33import 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
66describe ( "convertToOpenAPI" , ( ) => {
77 it ( "should convert a simple Zod schema to OpenAPI schema" , ( ) => {
@@ -20,7 +20,6 @@ describe("convertToOpenAPI", () => {
2020 } ,
2121 required : [ "name" , "age" ] ,
2222 additionalProperties : false ,
23- // @ts -expect-error: @omer-x/openapi-types doesn't have this
2423 $schema : "https://json-schema.org/draft/2020-12/schema" ,
2524 } ;
2625
@@ -35,7 +34,6 @@ describe("convertToOpenAPI", () => {
3534 const expectedSchema : SchemaObject = {
3635 type : "array" ,
3736 items : { type : "string" } ,
38- // @ts -expect-error: @omer-x/openapi-types doesn't have this
3937 $schema : "https://json-schema.org/draft/2020-12/schema" ,
4038 } ;
4139
@@ -67,7 +65,6 @@ describe("convertToOpenAPI", () => {
6765 } ,
6866 required : [ "user" ] ,
6967 additionalProperties : false ,
70- // @ts -expect-error: @omer-x/openapi-types doesn't have this
7168 $schema : "https://json-schema.org/draft/2020-12/schema" ,
7269 } ;
7370
@@ -92,7 +89,6 @@ describe("convertToOpenAPI", () => {
9289 } ,
9390 required : [ "file" ] ,
9491 additionalProperties : false ,
95- // @ts -expect-error: @omer-x/openapi-types doesn't have this
9692 $schema : "https://json-schema.org/draft/2020-12/schema" ,
9793 } ;
9894
0 commit comments