mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
Fix returnBaseType in Map response (#6246)
* fix returnBaseType for map response * fix javadoc string
This commit is contained in:
parent
646c2bc23c
commit
18c57a65ed
@ -2181,6 +2181,10 @@ public class DefaultCodegen {
|
|||||||
ArrayProperty ap = (ArrayProperty) responseProperty;
|
ArrayProperty ap = (ArrayProperty) responseProperty;
|
||||||
CodegenProperty innerProperty = fromProperty("response", ap.getItems());
|
CodegenProperty innerProperty = fromProperty("response", ap.getItems());
|
||||||
op.returnBaseType = innerProperty.baseType;
|
op.returnBaseType = innerProperty.baseType;
|
||||||
|
} else if (responseProperty instanceof MapProperty) {
|
||||||
|
MapProperty ap = (MapProperty) responseProperty;
|
||||||
|
CodegenProperty innerProperty = fromProperty("response", ap.getAdditionalProperties());
|
||||||
|
op.returnBaseType = innerProperty.baseType;
|
||||||
} else {
|
} else {
|
||||||
if (cm.complexType != null) {
|
if (cm.complexType != null) {
|
||||||
op.returnBaseType = cm.complexType;
|
op.returnBaseType = cm.complexType;
|
||||||
@ -3658,7 +3662,7 @@ public class DefaultCodegen {
|
|||||||
* writes it back to additionalProperties to be usable as a boolean in
|
* writes it back to additionalProperties to be usable as a boolean in
|
||||||
* mustache files.
|
* mustache files.
|
||||||
*
|
*
|
||||||
* @param propertyKey
|
* @param propertyKey property key
|
||||||
* @return property value as boolean
|
* @return property value as boolean
|
||||||
*/
|
*/
|
||||||
public boolean convertPropertyToBooleanAndWriteBack(String propertyKey) {
|
public boolean convertPropertyToBooleanAndWriteBack(String propertyKey) {
|
||||||
|
@ -400,8 +400,8 @@ public class InlineModelResolver {
|
|||||||
/**
|
/**
|
||||||
* Make a RefProperty
|
* Make a RefProperty
|
||||||
*
|
*
|
||||||
* @param ref
|
* @param ref new property name
|
||||||
* @param property
|
* @param property Property
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Property makeRefProperty(String ref, Property property) {
|
public Property makeRefProperty(String ref, Property property) {
|
||||||
@ -413,8 +413,8 @@ public class InlineModelResolver {
|
|||||||
/**
|
/**
|
||||||
* Copy vendor extensions from Property to another Property
|
* Copy vendor extensions from Property to another Property
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source soruce property
|
||||||
* @param target
|
* @param target target property
|
||||||
*/
|
*/
|
||||||
public void copyVendorExtensions(Property source, AbstractProperty target) {
|
public void copyVendorExtensions(Property source, AbstractProperty target) {
|
||||||
Map<String, Object> vendorExtensions = source.getVendorExtensions();
|
Map<String, Object> vendorExtensions = source.getVendorExtensions();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user