forked from loafle/openapi-generator-original
fix(typescript-*): nullable additionalProperty values (#17379)
* fix(typescript-*): nullable additionalProperty values * chore(samples): update samples
This commit is contained in:
parent
aeb6fcbb8c
commit
457622c456
@ -629,6 +629,9 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
} else if (ModelUtils.isMapSchema(p)) {
|
||||
Schema<?> inner = getSchemaAdditionalProperties(p);
|
||||
String nullSafeSuffix = getNullSafeAdditionalProps() ? " | undefined" : "";
|
||||
if (Boolean.TRUE.equals(inner.getNullable())) {
|
||||
nullSafeSuffix += " | null";
|
||||
}
|
||||
return "{ [key: string]: " + getTypeDeclaration(unaliasSchema(inner)) + nullSafeSuffix + "; }";
|
||||
} else if (ModelUtils.isFileSchema(p)) {
|
||||
return "File";
|
||||
|
@ -1107,16 +1107,16 @@ export interface NullableClass {
|
||||
'object_nullable_prop'?: { [key: string]: object; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
'object_and_items_nullable_prop'?: { [key: string]: object; } | null;
|
||||
'object_and_items_nullable_prop'?: { [key: string]: object | null; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
'object_items_nullable'?: { [key: string]: object; };
|
||||
'object_items_nullable'?: { [key: string]: object | null; };
|
||||
}
|
||||
/**
|
||||
* @type NullableShape
|
||||
|
@ -875,16 +875,16 @@ export interface NullableClass {
|
||||
'object_nullable_prop'?: { [key: string]: object; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
'object_and_items_nullable_prop'?: { [key: string]: object; } | null;
|
||||
'object_and_items_nullable_prop'?: { [key: string]: object | null; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
'object_items_nullable'?: { [key: string]: object; };
|
||||
'object_items_nullable'?: { [key: string]: object | null; };
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -82,16 +82,16 @@ export interface NullableClass {
|
||||
objectNullableProp?: { [key: string]: object; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
objectAndItemsNullableProp?: { [key: string]: object; } | null;
|
||||
objectAndItemsNullableProp?: { [key: string]: object | null; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
objectItemsNullable?: { [key: string]: object; };
|
||||
objectItemsNullable?: { [key: string]: object | null; };
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,16 +82,16 @@ export interface NullableClass {
|
||||
objectNullableProp?: { [key: string]: object; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
objectAndItemsNullableProp?: { [key: string]: object; } | null;
|
||||
objectAndItemsNullableProp?: { [key: string]: object | null; } | null;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: object; }}
|
||||
* @type {{ [key: string]: object | null; }}
|
||||
* @memberof NullableClass
|
||||
*/
|
||||
objectItemsNullable?: { [key: string]: object; };
|
||||
objectItemsNullable?: { [key: string]: object | null; };
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user