Handle required-only allOf constraints by darkbasic · Pull Request #2850 · openapi-ts/openapi-typescript · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clean-allof-required.md
24 changes: 12 additions & 12 deletions packages/openapi-typescript/examples/digital-ocean-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7065,7 +7065,7 @@ export interface components {
total?: number;
};
meta: {
meta: components["schemas"]["meta_properties"] & unknown;
meta: WithRequired<components["schemas"]["meta_properties"], "total">;
};
region: {
/**
Expand Down Expand Up @@ -11632,15 +11632,15 @@ export interface components {
*/
tag?: string | null;
};
domain_record_a: components["schemas"]["domain_record"] & unknown;
domain_record_aaaa: components["schemas"]["domain_record"] & unknown;
domain_record_caa: components["schemas"]["domain_record"] & unknown;
domain_record_cname: components["schemas"]["domain_record"] & unknown;
domain_record_mx: components["schemas"]["domain_record"] & unknown;
domain_record_ns: components["schemas"]["domain_record"] & unknown;
domain_record_soa: components["schemas"]["domain_record"] & unknown;
domain_record_srv: components["schemas"]["domain_record"] & unknown;
domain_record_txt: components["schemas"]["domain_record"] & unknown;
domain_record_a: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data">;
domain_record_aaaa: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data">;
domain_record_caa: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data" | "flags" | "tag">;
domain_record_cname: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data">;
domain_record_mx: WithRequired<components["schemas"]["domain_record"], "type" | "data" | "priority">;
domain_record_ns: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data" | "flags" | "tag">;
domain_record_soa: WithRequired<components["schemas"]["domain_record"], "type" | "ttl">;
domain_record_srv: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data" | "priority" | "port" | "flags" | "tag">;
domain_record_txt: WithRequired<components["schemas"]["domain_record"], "type" | "name" | "data" | "flags" | "tag">;
disk_info: {
/**
* @description The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data.
Expand Down Expand Up @@ -12929,7 +12929,7 @@ export interface components {
*/
type: "assign";
};
floating_ip_action_unassign: Omit<components["schemas"]["floatingIPsAction"], "type"> & Record<string, never> & {
floating_ip_action_unassign: Omit<WithRequired<components["schemas"]["floatingIPsAction"], "type">, "type"> & {
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
Expand Down Expand Up @@ -14897,7 +14897,7 @@ export interface components {
*/
type: "assign";
};
reserved_ip_action_unassign: Omit<components["schemas"]["reserved_ip_action_type"], "type"> & Record<string, never> & {
reserved_ip_action_unassign: Omit<WithRequired<components["schemas"]["reserved_ip_action_type"], "type">, "type"> & {
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
Expand Down
70 changes: 70 additions & 0 deletions packages/openapi-typescript/src/lib/ts.ts
Loading
Loading