Skip to content

Commit

Permalink
[Java] Use abstraction for files for jaxrs-cxf OpenAPITools#8792
Browse files Browse the repository at this point in the history
  • Loading branch information
fwermelskirchen committed Dec 22, 2022
1 parent 30d59b9 commit d332f66
Show file tree
Hide file tree
Showing 47 changed files with 3 additions and 885 deletions.
4 changes: 2 additions & 2 deletions docs/generators/jaxrs-cxf-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd></dl>|null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |src/gen/java|
|sourceFolder|source folder for generated code| |src\gen\java|
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|useAbstractionForFiles| Use InputStream instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useBeanValidation|Use BeanValidation API annotations| |false|
|useGenericResponse|Use generic response| |false|
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|
Expand Down
2 changes: 1 addition & 1 deletion docs/generators/jaxrs-cxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sourceFolder|source folder for generated code| |src/gen/java|
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|title|a title describing the application| |OpenAPI Server|
|useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useAnnotatedBasePath|Use @Path annotations for basePath| |false|
|useAbstractionForFiles| Use InputStream instead of java.io.File to allow passing bytes without a file on disk.| |false|
|useBeanValidation|Use BeanValidation API annotations| |true|
|useBeanValidationFeature|Use BeanValidation Feature| |false|
|useGenericResponse|Use generic response| |false|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
return Objects.equals(name, additionalPropertiesAnyType.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
return Objects.equals(name, additionalPropertiesArray.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
return Objects.equals(name, additionalPropertiesBoolean.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,33 +316,6 @@ public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(mapString, additionalPropertiesClass.mapString) &&
Objects.equals(mapNumber, additionalPropertiesClass.mapNumber) &&
Objects.equals(mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(anytype3, additionalPropertiesClass.anytype3);
}

@Override
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
return Objects.equals(name, additionalPropertiesInteger.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
return Objects.equals(name, additionalPropertiesObject.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
return Objects.equals(name, additionalPropertiesString.name) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,6 @@ public int hashCode() {
return Objects.hash(className, color);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(className, animal.className) &&
Objects.equals(color, animal.color);
}

@Override
public int hashCode() {
return Objects.hash(className, color);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,6 @@ public int hashCode() {
return Objects.hash(arrayArrayNumber);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}

@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,6 @@ public int hashCode() {
return Objects.hash(arrayNumber);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(arrayNumber, arrayOfNumberOnly.arrayNumber);
}

@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,6 @@ public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}

@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ public int hashCode() {
return Objects.hash(kind, super.hashCode());
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCat bigCat = (BigCat) o;
return Objects.equals(kind, bigCat.kind) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(kind, super.hashCode());
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,6 @@ public int hashCode() {
return Objects.hash(kind);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
return Objects.equals(kind, bigCatAllOf.kind);
}

@Override
public int hashCode() {
return Objects.hash(kind);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,28 +160,6 @@ public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(smallCamel, capitalization.smallCamel) &&
Objects.equals(capitalCamel, capitalization.capitalCamel) &&
Objects.equals(smallSnake, capitalization.smallSnake) &&
Objects.equals(capitalSnake, capitalization.capitalSnake) &&
Objects.equals(scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(ATT_NAME, capitalization.ATT_NAME);
}

@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Loading

0 comments on commit d332f66

Please sign in to comment.