-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #920 from denvitaharen/feature/add-equals-hashcode…
…-client Added so equals and hashcode is generated in models.
- Loading branch information
Showing
14 changed files
with
533 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>quarkus-openapi-generator-integration-tests</artifactId> | ||
<groupId>io.quarkiverse.openapi.generator</groupId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>quarkus-openapi-generator-it-equals-hashcode</artifactId> | ||
<name>Quarkus - Openapi Generator - Integration Tests - Client - Equals hashcode</name> | ||
<description>Example project for general usage</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkiverse.openapi.generator</groupId> | ||
<artifactId>quarkus-openapi-generator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
<goal>generate-code</goal> | ||
<goal>generate-code-tests</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>native-image</id> | ||
<activation> | ||
<property> | ||
<name>native</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skipTests>${native.surefire.skip}</skipTests> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<native.image.path> | ||
${project.build.directory}/${project.build.finalName}-runner | ||
</native.image.path> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager | ||
</java.util.logging.manager> | ||
<maven.home>${maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<properties> | ||
<quarkus.package.type>native</quarkus.package.type> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
125 changes: 125 additions & 0 deletions
125
...t/integration-tests/equals-hashcode/src/main/openapi/quarkus-equals-hashcode-openapi.yaml
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,125 @@ | ||
{ | ||
"openapi": "3.0.2", | ||
"info": { | ||
"title": "Animals - OpenAPI 3.0", | ||
"version": "1.0.5" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/api/v3" | ||
} | ||
], | ||
"tags": [ | ||
{ | ||
"name": "primate", | ||
"description": "Everything about Primates" | ||
} | ||
], | ||
"paths": { | ||
"/primate/{id}": { | ||
"get": { | ||
"tags": [ | ||
"primate" | ||
], | ||
"summary": "Find primate by ID", | ||
"description": "Returns a single primate", | ||
"operationId": "getPrimateById", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"description": "ID of primate to return", | ||
"required": true, | ||
"schema": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/Primate" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Invalid ID supplied" | ||
}, | ||
"404": { | ||
"description": "Primate not found" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"Animal": { | ||
"type": "object", | ||
"properties": { | ||
"born": { | ||
"type": "string", | ||
"description": "Dated Base extension.", | ||
"format": "date-time" | ||
}, | ||
"deceased": { | ||
"type": "string", | ||
"description": "Dated Base extension.", | ||
"format": "date-time" | ||
} | ||
}, | ||
"xml": { | ||
"name": "animal" | ||
} | ||
}, | ||
"Mammal": { | ||
"type": "object", | ||
"allOf": [ { | ||
"$ref": "#/components/schemas/Animal" | ||
} ], | ||
"properties": { | ||
"gender": { | ||
"type": "string", | ||
"enum": [ | ||
"female", | ||
"male" | ||
] | ||
} | ||
}, | ||
"xml": { | ||
"name": "mammal" | ||
} | ||
}, | ||
"Primate": { | ||
"required": [ | ||
"name" | ||
], | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/Mammal" | ||
} | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64", | ||
"example": 10 | ||
}, | ||
"name": { | ||
"type": "string", | ||
"example": "jane doe" | ||
} | ||
}, | ||
"xml": { | ||
"name": "primate" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.