Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

v2 [core] changes interface name to JsonSchema, removes CodegenParameter and CodegenResponse as implementors #65

Merged
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* CodegenModel represents a schema object in a OpenAPI document.
*/
@JsonIgnoreProperties({"parentModel", "interfaceModels"})
public class CodegenModel implements IJsonSchemaValidationProperties {
public class CodegenModel implements JsonSchema {
// The parent model name from the schemas. The parent is determined by inspecting the allOf, anyOf and
// oneOf attributes in the OAS. First codegen inspects 'allOf', then 'anyOf', then 'oneOf'.
// If there are multiple object references in the attribute ('allOf', 'anyOf', 'oneOf'), and one of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CodegenOperation {
public boolean hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams, hasRequiredParams,
returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart,
isResponseBinary = false, isResponseFile = false, isResponseOptional = false, hasReference = false, defaultReturnType = false,
isResponseBinary = false, isResponseFile = false, hasReference = false, defaultReturnType = false,
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false,
hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined
Expand Down Expand Up @@ -325,7 +325,6 @@ public String toString() {
sb.append(", isMultipart=").append(isMultipart);
sb.append(", isResponseBinary=").append(isResponseBinary);
sb.append(", isResponseFile=").append(isResponseFile);
sb.append(", isResponseFile=").append(isResponseOptional);
sb.append(", hasReference=").append(hasReference);
sb.append(", hasDefaultResponse=").append(hasDefaultResponse);
sb.append(", hasErrorResponseObject=").append(hasErrorResponseObject);
Expand Down Expand Up @@ -401,7 +400,6 @@ public boolean equals(Object o) {
isMultipart == that.isMultipart &&
isResponseBinary == that.isResponseBinary &&
isResponseFile == that.isResponseFile &&
isResponseOptional == that.isResponseOptional &&
hasReference == that.hasReference &&
hasDefaultResponse == that.hasDefaultResponse &&
hasErrorResponseObject == that.hasErrorResponseObject &&
Expand Down Expand Up @@ -463,7 +461,7 @@ public int hashCode() {

return Objects.hash(responseHeaders, hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams,
hasRequiredParams, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart, isResponseBinary, isResponseFile, isResponseOptional, hasReference,
isArray, isMultipart, isResponseBinary, isResponseFile, hasReference,
hasDefaultResponse, isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
isRestful, isDeprecated, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod,
returnBaseType, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.*;

public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperties {
public class CodegenProperty implements Cloneable, JsonSchema {
/**
* The value of the 'type' attribute in the OpenAPI schema.
* The per-language codegen logic may change to a language-specific type.
Expand Down
Loading