Skip to content

Commit 638870c

Browse files
apply workaround
1 parent 71b6674 commit 638870c

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

api.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export interface components {
4747
id: string;
4848
name: string;
4949
};
50-
PurchasableProduct: {
50+
PurchasableProduct: components["schemas"]["Product"] & {
5151
price: components["schemas"]["Price"];
52-
} & WithRequired<components["schemas"]["Product"], "price">;
52+
};
5353
Price: {
5454
value: number;
5555
currency: string;
@@ -62,7 +62,4 @@ export interface components {
6262
pathItems: never;
6363
}
6464
export type $defs = Record<string, never>;
65-
type WithRequired<T, K extends keyof T> = T & {
66-
[P in K]-?: T[P];
67-
};
6865
export type operations = Record<string, never>;

api.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ components:
2929
- name
3030

3131
PurchasableProduct:
32-
type: object
33-
properties:
34-
price:
35-
$ref: '#/components/schemas/Price'
36-
required:
37-
- price
3832
allOf:
3933
- $ref: '#/components/schemas/Product'
34+
- type: object
35+
properties:
36+
price:
37+
$ref: '#/components/schemas/Price'
38+
required:
39+
- price
4040

4141
Price:
4242
type: object

0 commit comments

Comments
 (0)