Skip to content

Commit

Permalink
OpenAPI TS generator: no required array means all fields are optional (
Browse files Browse the repository at this point in the history
  • Loading branch information
cikzh authored and lkleuver committed Feb 12, 2025
1 parent a1dfb00 commit 8ea1ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/scripts/openapi/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function tsType(s: ReferenceObject | SchemaObject | undefined): string {

function isRequired(k: string, req: string[] | undefined): string {
if (!req) {
return "";
return "?";
}
return req.includes(k) ? "" : "?";
}

0 comments on commit 8ea1ef5

Please sign in to comment.