Skip to content

Commit 7b7351f

Browse files
committed
fix: missing exporting types and interfaces
1 parent 1c739cc commit 7b7351f

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.changeset/yellow-planets-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
fix missing exported interfaces and types

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { consola } from "consola";
22
import type { GenerateApiConfiguration } from "../types/index.js";
33
import { CodeGenProcess } from "./code-gen-process.js";
44

5+
export * from "../types/index.js";
6+
57
export async function generateApi(
68
config: Partial<GenerateApiConfiguration["config"]>,
79
) {

tests/spec/readonly/__snapshots__/basic.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface Pet {
1919
readonly name: string;
2020
readonly tag?: string;
2121
readonly multiple?: string | number;
22+
notReadonly?: string;
2223
}
2324
"
2425
`;

tests/spec/readonly/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
"multiple": {
5858
"type": ["string", "number"],
5959
"readOnly": true
60+
},
61+
"notReadonly": {
62+
"type": "string"
6063
}
6164
}
6265
}

0 commit comments

Comments
 (0)