|
|
|
@ -187,12 +187,10 @@ export function createRefToImportReducerCreator(params: ModelGeneratorParams) { |
|
|
|
} |
|
|
|
|
|
|
|
function isOptionalProperty(prop: PropertyDef) { |
|
|
|
const { isRequired, typeSimple } = prop; |
|
|
|
if (typeSimple === 'string' || typeSimple.includes('enum')) { |
|
|
|
return !isRequired; |
|
|
|
} else { |
|
|
|
return typeSimple.endsWith('?'); |
|
|
|
} |
|
|
|
return ( |
|
|
|
prop.typeSimple.endsWith('?') || |
|
|
|
((prop.typeSimple === 'string' || prop.typeSimple.includes('enum')) && !prop.isRequired) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
export function parseBaseTypeWithGenericTypes(type: string): string[] { |
|
|
|
|