forked from loafle/openapi-generator-original
Adds return property to CodegenOperation (#12816)
* added nonNullableVars * added return property to operation * added return property to operation * build samples Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
parent
464da4a10f
commit
57bcb046d1
@ -31,6 +31,7 @@ public class CodegenOperation {
|
||||
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
|
||||
isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false,
|
||||
hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined
|
||||
public CodegenProperty returnProperty;
|
||||
public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType,
|
||||
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse;
|
||||
public CodegenDiscriminator discriminator;
|
||||
@ -298,6 +299,7 @@ public class CodegenOperation {
|
||||
sb.append(", returnSimpleType=").append(returnSimpleType);
|
||||
sb.append(", subresourceOperation=").append(subresourceOperation);
|
||||
sb.append(", isMap=").append(isMap);
|
||||
sb.append(", returnProperty=").append(returnProperty);
|
||||
sb.append(", isArray=").append(isArray);
|
||||
sb.append(", isMultipart=").append(isMultipart);
|
||||
sb.append(", isResponseBinary=").append(isResponseBinary);
|
||||
@ -391,6 +393,7 @@ public class CodegenOperation {
|
||||
isDeprecated == that.isDeprecated &&
|
||||
isCallbackRequest == that.isCallbackRequest &&
|
||||
uniqueItems == that.uniqueItems &&
|
||||
Objects.equals(returnProperty, that.returnProperty) &&
|
||||
Objects.equals(responseHeaders, that.responseHeaders) &&
|
||||
Objects.equals(path, that.path) &&
|
||||
Objects.equals(operationId, that.operationId) &&
|
||||
@ -444,7 +447,7 @@ public class CodegenOperation {
|
||||
isRestful, isDeprecated, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod,
|
||||
returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse,
|
||||
discriminator, consumes, produces, prioritizedContentTypes, servers, bodyParam, allParams, bodyParams,
|
||||
pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, optionalParams,
|
||||
pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams,
|
||||
authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs,
|
||||
vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase,
|
||||
operationIdSnakeCase, hasErrorResponseObject);
|
||||
|
@ -4026,6 +4026,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (languageSpecificPrimitives().contains(op.returnBaseType) || op.returnBaseType == null) {
|
||||
op.returnTypeIsPrimitive = true;
|
||||
}
|
||||
op.returnProperty = cm;
|
||||
}
|
||||
addHeaders(methodResponse, op.responseHeaders);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user