fix additional properties any type

This commit is contained in:
William Cheng 2023-07-30 16:25:18 +08:00
parent 07d4f7d534
commit 8ecf9e352d
3 changed files with 2 additions and 5 deletions

View File

@ -3186,9 +3186,6 @@ public class DefaultCodegen implements CodegenConfig {
} else if (schema.getAdditionalProperties() instanceof Boolean) { } else if (schema.getAdditionalProperties() instanceof Boolean) {
if (Boolean.TRUE.equals(schema.getAdditionalProperties())) { if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
isAdditionalPropertiesTrue = true; isAdditionalPropertiesTrue = true;
addPropProp = fromProperty(getAdditionalPropertiesName(), new Schema(), false);
// TODO revise below as it should be true only if it's any type, not boolean
additionalPropertiesIsAnyType = true;
} }
} else { } else {
addPropProp = fromProperty(getAdditionalPropertiesName(), (Schema) schema.getAdditionalProperties(), false); addPropProp = fromProperty(getAdditionalPropertiesName(), (Schema) schema.getAdditionalProperties(), false);

View File

@ -1656,7 +1656,7 @@ export interface Whale {
* @interface Zebra * @interface Zebra
*/ */
export interface Zebra { export interface Zebra {
[key: string]: any; [key: string]: any | any;
/** /**
* *

View File

@ -175,7 +175,7 @@ export interface ArrayTest {
* @interface Banana * @interface Banana
*/ */
export interface Banana { export interface Banana {
[key: string]: any; [key: string]: any | any;
/** /**
* *