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

Commit 206fdf1

Browse files
committed
v2 [core] changes interface name to JsonSchema, removes CodegenParameter and CodegenResponse as implementors (#65)
* Changes IJsonSchemaValidationProperties to JsonSchema because that is the interface that it represents Updates CodegenParameter, removes JsonSchema info Further updates to fromParameter call sites * Removes JsonSchema from CodegenParameter and fixes usages * Samples regenerated * Removes JosnSchema from CodegenResponse * Adds isDefault back to CodegenResponse * Fixes DefaultCodegen * Fixes testRefModelValidationProperties * Fixes 2 tests in JavaModelTest * Removes n/a test from JavaClientCodegenTest * Fixes remianing tests in DefaultCodegenTest * Removes dateDefaultValueIsIsoDateTime
1 parent c909322 commit 206fdf1

20 files changed

+390
-2857
lines changed

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenModel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* CodegenModel represents a schema object in a OpenAPI document.
2929
*/
3030
@JsonIgnoreProperties({"parentModel", "interfaceModels"})
31-
public class CodegenModel implements IJsonSchemaValidationProperties {
31+
public class CodegenModel implements JsonSchema {
3232
// The parent model name from the schemas. The parent is determined by inspecting the allOf, anyOf and
3333
// oneOf attributes in the OAS. First codegen inspects 'allOf', then 'anyOf', then 'oneOf'.
3434
// If there are multiple object references in the attribute ('allOf', 'anyOf', 'oneOf'), and one of the

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class CodegenOperation {
2727
public boolean hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams, hasRequiredParams,
2828
returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
2929
isArray, isMultipart,
30-
isResponseBinary = false, isResponseFile = false, isResponseOptional = false, hasReference = false, defaultReturnType = false,
30+
isResponseBinary = false, isResponseFile = false, hasReference = false, defaultReturnType = false,
3131
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
3232
isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false,
3333
hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined
@@ -325,7 +325,6 @@ public String toString() {
325325
sb.append(", isMultipart=").append(isMultipart);
326326
sb.append(", isResponseBinary=").append(isResponseBinary);
327327
sb.append(", isResponseFile=").append(isResponseFile);
328-
sb.append(", isResponseFile=").append(isResponseOptional);
329328
sb.append(", hasReference=").append(hasReference);
330329
sb.append(", hasDefaultResponse=").append(hasDefaultResponse);
331330
sb.append(", hasErrorResponseObject=").append(hasErrorResponseObject);
@@ -401,7 +400,6 @@ public boolean equals(Object o) {
401400
isMultipart == that.isMultipart &&
402401
isResponseBinary == that.isResponseBinary &&
403402
isResponseFile == that.isResponseFile &&
404-
isResponseOptional == that.isResponseOptional &&
405403
hasReference == that.hasReference &&
406404
hasDefaultResponse == that.hasDefaultResponse &&
407405
hasErrorResponseObject == that.hasErrorResponseObject &&
@@ -463,7 +461,7 @@ public int hashCode() {
463461

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

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java

+7-759
Large diffs are not rendered by default.

modules/openapi-json-schema-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import java.util.*;
2121

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

0 commit comments

Comments
 (0)