Skip to content

Commit 2270b2f

Browse files
De-duplicate unions. (#1069)
* Add tests * Change logic of tsUnionOf * Linting * Linting v2 * Fix other tests * Update examples
1 parent 1d8e76a commit 2270b2f

File tree

13 files changed

+5669
-807
lines changed

13 files changed

+5669
-807
lines changed

examples/digital-ocean-api.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5293,15 +5293,20 @@ export interface external {
52935293
name: string;
52945294
/**
52955295
* @description A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Redis, and "mongodb" for MongoDB.
5296-
* @example pg
5296+
* @example mysql
52975297
* @enum {string}
52985298
*/
52995299
engine: "pg" | "mysql" | "redis" | "mongodb";
53005300
/**
53015301
* @description A string representing the version of the database engine in use for the cluster.
5302-
* @example 10
5302+
* @example 8
53035303
*/
53045304
version?: string;
5305+
/**
5306+
* @description A string representing the semantic version of the database engine in use for the cluster.
5307+
* @example 8.0.28
5308+
*/
5309+
semantic_version?: string;
53055310
/**
53065311
* @description The number of nodes in the database cluster.
53075312
* @example 2
@@ -8062,7 +8067,7 @@ export interface external {
80628067
* ]
80638068
* }
80648069
*/
8065-
"application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"] & (unknown | unknown);
8070+
"application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"];
80668071
};
80678072
};
80688073
responses: {
@@ -8212,7 +8217,7 @@ export interface external {
82128217
* ]
82138218
* }
82148219
*/
8215-
"application/json": external["resources/firewalls/models/firewall.yml"] & (unknown | unknown);
8220+
"application/json": external["resources/firewalls/models/firewall.yml"];
82168221
};
82178222
};
82188223
responses: {
@@ -8315,7 +8320,7 @@ export interface external {
83158320
* ]
83168321
* }
83178322
*/
8318-
"application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"] & (unknown | unknown);
8323+
"application/json": external["resources/firewalls/models/firewall_rule.yml"]["firewall_rules"];
83198324
};
83208325
};
83218326
responses: {
@@ -8490,7 +8495,7 @@ export interface external {
84908495
* ]
84918496
* }
84928497
*/
8493-
"application/json": WithRequired<external["resources/firewalls/models/firewall.yml"] & (unknown | unknown), "name">;
8498+
"application/json": WithRequired<external["resources/firewalls/models/firewall.yml"], "name">;
84948499
};
84958500
};
84968501
responses: {

examples/digital-ocean-api/resources/databases/models/database_cluster.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ properties:
1313
description: A unique, human-readable name referring to a database cluster.
1414
engine:
1515
type: string
16-
example: pg
16+
example: mysql
1717
enum:
1818
- pg
1919
- mysql
@@ -24,8 +24,13 @@ properties:
2424
are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Redis, and "mongodb" for MongoDB.
2525
version:
2626
type: string
27-
example: '10'
27+
example: '8'
2828
description: A string representing the version of the database engine in use for the cluster.
29+
semantic_version:
30+
type: string
31+
example: '8.0.28'
32+
description: A string representing the semantic version of the database engine in use for the cluster.
33+
readOnly: true
2934
num_nodes:
3035
type: integer
3136
example: 2

examples/digital-ocean-api/resources/databases/responses/database_cluster.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ content:
2323
name: backend
2424
engine: pg
2525
version: '14'
26+
semantic_version: '14.5'
2627
connection:
2728
uri: postgres://doadmin:wv78n3zpz42xezdk@backend-do-user-19081923-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require
2829
database: ''

examples/github-api-next.ts

Lines changed: 744 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)