Skip to content

Commit 43ccec8

Browse files
authored
fix: correctly transform untyped nullable field (#1468)
* fix: correctly transform untyped nullable field to * test: update snapshots
1 parent f229f24 commit 43ccec8

File tree

6 files changed

+118
-108
lines changed

6 files changed

+118
-108
lines changed

.changeset/large-ways-cheat.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openapi-typescript": patch
3+
---
4+
5+
Correctly transform untyped nullable fields to `unknown`

packages/openapi-typescript/examples/digital-ocean-api.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9085,7 +9085,7 @@ export interface external {
90859085
* @description The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null.
90869086
* @example null
90879087
*/
9088-
droplet?: (Record<string, unknown> | null) | external["resources/droplets/models/droplet.yml"];
9088+
droplet?: unknown;
90899089
/**
90909090
* @description A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted.
90919091
* @example true
@@ -13948,7 +13948,7 @@ export interface external {
1394813948
* @description The Droplet that the reserved IP has been assigned to. When you query a reserved IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null.
1394913949
* @example null
1395013950
*/
13951-
droplet?: (Record<string, unknown> | null) | external["resources/droplets/models/droplet.yml"];
13951+
droplet?: unknown;
1395213952
/**
1395313953
* @description A boolean value indicating whether or not the reserved IP has pending actions preventing new ones from being submitted.
1395413954
* @example true

0 commit comments

Comments
 (0)