Skip to content

Commit 71b6674

Browse files
initial commit
0 parents  commit 71b6674

File tree

6 files changed

+493
-0
lines changed

6 files changed

+493
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

api.ts

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
"/": {
8+
parameters: {
9+
query?: never;
10+
header?: never;
11+
path?: never;
12+
cookie?: never;
13+
};
14+
get: {
15+
parameters: {
16+
query?: never;
17+
header?: never;
18+
path?: never;
19+
cookie?: never;
20+
};
21+
requestBody?: never;
22+
responses: {
23+
/** @description OK */
24+
200: {
25+
headers: {
26+
[name: string]: unknown;
27+
};
28+
content: {
29+
"application/json": components["schemas"]["Product"];
30+
};
31+
};
32+
};
33+
};
34+
put?: never;
35+
post?: never;
36+
delete?: never;
37+
options?: never;
38+
head?: never;
39+
patch?: never;
40+
trace?: never;
41+
};
42+
}
43+
export type webhooks = Record<string, never>;
44+
export interface components {
45+
schemas: {
46+
Product: {
47+
id: string;
48+
name: string;
49+
};
50+
PurchasableProduct: {
51+
price: components["schemas"]["Price"];
52+
} & WithRequired<components["schemas"]["Product"], "price">;
53+
Price: {
54+
value: number;
55+
currency: string;
56+
};
57+
};
58+
responses: never;
59+
parameters: never;
60+
requestBodies: never;
61+
headers: never;
62+
pathItems: never;
63+
}
64+
export type $defs = Record<string, never>;
65+
type WithRequired<T, K extends keyof T> = T & {
66+
[P in K]-?: T[P];
67+
};
68+
export type operations = Record<string, never>;

api.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
openapi: "3.0.1"
2+
3+
info:
4+
title: openapi-typescript-7
5+
version: 1.0.0
6+
7+
paths:
8+
/:
9+
get:
10+
responses:
11+
"200":
12+
description: OK
13+
content:
14+
application/json:
15+
schema:
16+
$ref: '#/components/schemas/Product'
17+
18+
components:
19+
schemas:
20+
Product:
21+
type: object
22+
properties:
23+
id:
24+
type: string
25+
name:
26+
type: string
27+
required:
28+
- id
29+
- name
30+
31+
PurchasableProduct:
32+
type: object
33+
properties:
34+
price:
35+
$ref: '#/components/schemas/Price'
36+
required:
37+
- price
38+
allOf:
39+
- $ref: '#/components/schemas/Product'
40+
41+
Price:
42+
type: object
43+
properties:
44+
value:
45+
type: number
46+
currency:
47+
type: string
48+
required:
49+
- value
50+
- currency

package-lock.json

+254
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "openapi-typescript-7-bug",
3+
"scripts": {
4+
"start": "openapi-typescript ./api.yml --output ./api.ts"
5+
},
6+
"license": "ISC",
7+
"dependencies": {
8+
"openapi-typescript": "7.0.0-next.1",
9+
"typescript": "5.2.2"
10+
}
11+
}

0 commit comments

Comments
 (0)