Skip to content

Commit

Permalink
fix: correctly transform untyped nullable field (#1468)
Browse files Browse the repository at this point in the history
* fix: correctly transform untyped nullable field to

* test: update snapshots
  • Loading branch information
davidleger95 committed Dec 1, 2023
1 parent f229f24 commit 43ccec8
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 108 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-ways-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-typescript": patch
---

Correctly transform untyped nullable fields to `unknown`
4 changes: 2 additions & 2 deletions packages/openapi-typescript/examples/digital-ocean-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9085,7 +9085,7 @@ export interface external {
* @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.
* @example null
*/
droplet?: (Record<string, unknown> | null) | external["resources/droplets/models/droplet.yml"];
droplet?: unknown;
/**
* @description A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted.
* @example true
Expand Down Expand Up @@ -13948,7 +13948,7 @@ export interface external {
* @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.
* @example null
*/
droplet?: (Record<string, unknown> | null) | external["resources/droplets/models/droplet.yml"];
droplet?: unknown;
/**
* @description A boolean value indicating whether or not the reserved IP has pending actions preventing new ones from being submitted.
* @example true
Expand Down
Loading

0 comments on commit 43ccec8

Please sign in to comment.