Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
fix: fix codegen for array of enums
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbansal authored and fabien0102 committed Feb 8, 2020
1 parent c7c4c94 commit 84e2c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/import-open-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const getRef = ($ref: ReferenceObject["$ref"]) => {
*/
export const getArray = (item: SchemaObject): string => {
if (item.items) {
if (!isReference(item.items) && (item.items.oneOf || item.items.allOf)) {
if (!isReference(item.items) && (item.items.oneOf || item.items.allOf || item.items.enum)) {
return `(${resolveValue(item.items)})[]`;
} else {
return `${resolveValue(item.items)}[]`;
Expand Down

0 comments on commit 84e2c88

Please sign in to comment.