-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update MakeFile to generate Checkout Files * Bump swagger-annotations from 2.2.2 to 2.2.3 Bumps swagger-annotations from 2.2.2 to 2.2.3. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump swagger-annotations from 1.6.5 to 1.6.7 Bumps swagger-annotations from 1.6.5 to 1.6.7. --- updated-dependencies: - dependency-name: io.swagger:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump swagger-models from 2.2.2 to 2.2.3 Bumps swagger-models from 2.2.2 to 2.2.3. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-models dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Secure PRNG for ivNonce in NexoCrypto based on strongest non blocking instance (#818) * Added secure PRNG for ivNonce based on non blocking instance * Small fix * AnOtHer SmAlL fIX * add trycatch block to set to nativePRNG for non unix systems * Whitespace after catch * Bump jackson-databind from 2.13.3 to 2.13.4.2 (#837) Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.3 to 2.13.4.2. - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Pw 7050/update templates (#834) * updte templates * update Makefile * update dependencies for new templates * make dependencies more specific * Bump swagger-models from 2.2.3 to 2.2.4 (#845) Bumps swagger-models from 2.2.3 to 2.2.4. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-models dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump swagger-annotations from 2.2.3 to 2.2.4 (#844) Bumps swagger-annotations from 2.2.3 to 2.2.4. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump swagger-annotations from 1.6.7 to 1.6.8 (#843) Bumps swagger-annotations from 1.6.7 to 1.6.8. --- updated-dependencies: - dependency-name: io.swagger:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * PW-7327: Serialise ByteArray into JSON String (#848) * PW-7327: Serialise ByteArray into JSON String * PW-7327: Update more byte[] fields * Version Bump 18.1.2 Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jillingk <[email protected]> Co-authored-by: Michael Paul <[email protected]>
- Loading branch information
1 parent
d471bbf
commit c549f7b
Showing
11 changed files
with
1,013 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<groupId>com.adyen</groupId> | ||
<artifactId>adyen-java-api-library</artifactId> | ||
<packaging>jar</packaging> | ||
<version>18.1.1</version> | ||
<version>18.1.2</version> | ||
<name>Adyen Java API Library</name> | ||
<description>Adyen API Client Library for Java</description> | ||
<url>https://github.com/adyen/adyen-java-api-library</url> | ||
|
@@ -25,7 +25,7 @@ | |
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<swagger-core-version>1.6.5</swagger-core-version> | ||
<swagger-core-version>1.6.8</swagger-core-version> | ||
</properties> | ||
<scm> | ||
<connection>scm:git:[email protected]:Adyen/adyen-java-api-library.git</connection> | ||
|
@@ -191,7 +191,7 @@ | |
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.13.3</version> | ||
<version>2.13.4.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents.client5</groupId> | ||
|
@@ -224,12 +224,27 @@ | |
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-models</artifactId> | ||
<version>2.2.2</version> | ||
<version>2.2.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>2.2.2</version> | ||
<version>2.2.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<version>2.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.gsonfire</groupId> | ||
<artifactId>gson-fire</artifactId> | ||
<version>1.8.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okio</groupId> | ||
<artifactId>okio</artifactId> | ||
<version>3.2.0</version> | ||
</dependency> | ||
<!-- Generated model annotations --> | ||
<dependency> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
templates/libraries/okhttp-gson/AbstractOpenApiSchema.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{{>licenseInfo}} | ||
|
||
package {{modelPackage}}; | ||
|
||
import java.util.Objects; | ||
import java.lang.reflect.Type; | ||
import java.util.Map; | ||
import javax.ws.rs.core.GenericType; | ||
|
||
/** | ||
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec | ||
*/ | ||
public abstract class AbstractOpenApiSchema { | ||
// store the actual instance of the schema/object | ||
private Object instance; | ||
// is nullable | ||
private Boolean isNullable; | ||
// schema type (e.g. oneOf, anyOf) | ||
private final String schemaType; | ||
public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { | ||
this.schemaType = schemaType; | ||
this.isNullable = isNullable; | ||
} | ||
|
||
/** | ||
* Get the list of oneOf/anyOf composed schemas allowed to be stored in this object | ||
* | ||
* @return an instance of the actual schema/object | ||
*/ | ||
public abstract Map<String, GenericType> getSchemas(); | ||
|
||
/** | ||
* Get the actual instance | ||
* | ||
* @return an instance of the actual schema/object | ||
*/ | ||
//@JsonValue | ||
public Object getActualInstance() {return instance;} | ||
|
||
/** | ||
* Set the actual instance | ||
* | ||
* @param instance the actual instance of the schema/object | ||
*/ | ||
public void setActualInstance(Object instance) {this.instance = instance;} | ||
|
||
/** | ||
* Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well | ||
* | ||
* @return an instance of the actual schema/object | ||
*/ | ||
public Object getActualInstanceRecursively() { | ||
return getActualInstanceRecursively(this); | ||
} | ||
|
||
private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { | ||
if (object.getActualInstance() == null) { | ||
return null; | ||
} else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { | ||
return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); | ||
} else { | ||
return object.getActualInstance(); | ||
} | ||
} | ||
|
||
/** | ||
* Get the schema type (e.g. anyOf, oneOf) | ||
* | ||
* @return the schema type | ||
*/ | ||
public String getSchemaType() { | ||
return schemaType; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class ").append(getClass()).append(" {\n"); | ||
sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); | ||
sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); | ||
sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces | ||
* (except the first line). | ||
*/ | ||
private String toIndentedString(Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
|
||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; | ||
return Objects.equals(this.instance, a.instance) && | ||
Objects.equals(this.isNullable, a.isNullable) && | ||
Objects.equals(this.schemaType, a.schemaType); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(instance, isNullable, schemaType); | ||
} | ||
|
||
/** | ||
* Is nullable | ||
* | ||
* @return true if it's nullable | ||
*/ | ||
public Boolean isNullable() { | ||
if (Boolean.TRUE.equals(isNullable)) { | ||
return Boolean.TRUE; | ||
} else { | ||
return Boolean.FALSE; | ||
} | ||
} | ||
|
||
{{>libraries/jersey2/additional_properties}} | ||
|
||
} |
Oops, something went wrong.