Skip to content

Commit a328c30

Browse files
committed
fix import
1 parent cb3cf47 commit a328c30

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/create/schema/single.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ describe('createSchema', () => {
1515
});
1616
});
1717

18+
it('should create a registered schema', () => {
19+
const schema = createSchema(
20+
z.string().openapi({ description: 'foo', ref: 'String' }),
21+
);
22+
23+
expect(schema).toEqual<SchemaResult>({
24+
schema: {
25+
$ref: '#/components/schemas/String',
26+
},
27+
components: {
28+
String: {
29+
type: 'string',
30+
description: 'foo',
31+
},
32+
},
33+
});
34+
});
35+
1836
it('should create components', () => {
1937
const schema = createSchema(
2038
z.object({

src/create/schema/single.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ZodType } from 'zod';
22

3-
import type { oas30, oas31 } from '../../../dist';
43
import type { OpenApiVersion } from '../../openapi';
4+
import type { oas30, oas31 } from '../../openapi3-ts/dist';
55
import {
66
type CreationType,
77
createSchemaComponents,

0 commit comments

Comments
 (0)