forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue OpenAPITools#795: Add microprofile OpenAPI annotations for quar…
…kus library in JaxRsSpec
- Loading branch information
Nuno Borges
authored and
Nuno Borges
committed
May 9, 2023
1 parent
d4eee01
commit 7ff1431
Showing
73 changed files
with
13,664 additions
and
23 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
14 changes: 14 additions & 0 deletions
14
bin/configs/jaxrs-spec-quarkus-microprofile-openapi-annotations.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,14 @@ | ||
generatorName: jaxrs-spec | ||
outputDir: samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations | ||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec | ||
additionalProperties: | ||
artifactId: jaxrs-spec-petstore-server | ||
serializableModel: "true" | ||
hideGenerationTimestamp: "true" | ||
implicitHeadersRegex: (api_key|enum_header_string) | ||
generateBuilders: "true" | ||
useMicroProfileOpenAPIAnnotations: "true" | ||
library: "quarkus" | ||
useJakartaEe: "true" | ||
dateLibrary: "java8-localdatetime" |
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
4 changes: 4 additions & 0 deletions
4
samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.dockerignore
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,4 @@ | ||
* | ||
!target/*-runner | ||
!target/*-runner.jar | ||
!target/lib/* |
23 changes: 23 additions & 0 deletions
23
...les/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator-ignore
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,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
63 changes: 63 additions & 0 deletions
63
samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES
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,63 @@ | ||
.dockerignore | ||
README.md | ||
pom.xml | ||
src/gen/java/org/openapitools/api/AnotherFakeApi.java | ||
src/gen/java/org/openapitools/api/FakeApi.java | ||
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java | ||
src/gen/java/org/openapitools/api/PetApi.java | ||
src/gen/java/org/openapitools/api/RestApplication.java | ||
src/gen/java/org/openapitools/api/RestResourceRoot.java | ||
src/gen/java/org/openapitools/api/StoreApi.java | ||
src/gen/java/org/openapitools/api/UserApi.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java | ||
src/gen/java/org/openapitools/model/AdditionalPropertiesString.java | ||
src/gen/java/org/openapitools/model/Animal.java | ||
src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java | ||
src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java | ||
src/gen/java/org/openapitools/model/ArrayTest.java | ||
src/gen/java/org/openapitools/model/BigCat.java | ||
src/gen/java/org/openapitools/model/BigCatAllOf.java | ||
src/gen/java/org/openapitools/model/Capitalization.java | ||
src/gen/java/org/openapitools/model/Cat.java | ||
src/gen/java/org/openapitools/model/CatAllOf.java | ||
src/gen/java/org/openapitools/model/Category.java | ||
src/gen/java/org/openapitools/model/ClassModel.java | ||
src/gen/java/org/openapitools/model/Client.java | ||
src/gen/java/org/openapitools/model/Dog.java | ||
src/gen/java/org/openapitools/model/DogAllOf.java | ||
src/gen/java/org/openapitools/model/EnumArrays.java | ||
src/gen/java/org/openapitools/model/EnumClass.java | ||
src/gen/java/org/openapitools/model/EnumTest.java | ||
src/gen/java/org/openapitools/model/FileSchemaTestClass.java | ||
src/gen/java/org/openapitools/model/FormatTest.java | ||
src/gen/java/org/openapitools/model/HasOnlyReadOnly.java | ||
src/gen/java/org/openapitools/model/MapTest.java | ||
src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java | ||
src/gen/java/org/openapitools/model/Model200Response.java | ||
src/gen/java/org/openapitools/model/ModelApiResponse.java | ||
src/gen/java/org/openapitools/model/ModelFile.java | ||
src/gen/java/org/openapitools/model/ModelList.java | ||
src/gen/java/org/openapitools/model/ModelReturn.java | ||
src/gen/java/org/openapitools/model/Name.java | ||
src/gen/java/org/openapitools/model/NumberOnly.java | ||
src/gen/java/org/openapitools/model/Order.java | ||
src/gen/java/org/openapitools/model/OuterComposite.java | ||
src/gen/java/org/openapitools/model/OuterEnum.java | ||
src/gen/java/org/openapitools/model/Pet.java | ||
src/gen/java/org/openapitools/model/ReadOnlyFirst.java | ||
src/gen/java/org/openapitools/model/SpecialModelName.java | ||
src/gen/java/org/openapitools/model/Tag.java | ||
src/gen/java/org/openapitools/model/TypeHolderDefault.java | ||
src/gen/java/org/openapitools/model/TypeHolderExample.java | ||
src/gen/java/org/openapitools/model/User.java | ||
src/gen/java/org/openapitools/model/XmlItem.java | ||
src/main/docker/Dockerfile.jvm | ||
src/main/docker/Dockerfile.native | ||
src/main/openapi/openapi.yaml | ||
src/main/resources/application.properties |
1 change: 1 addition & 0 deletions
1
...es/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/VERSION
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 @@ | ||
6.6.0-SNAPSHOT |
33 changes: 33 additions & 0 deletions
33
samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/README.md
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,33 @@ | ||
# JAX-RS server with OpenAPI using Quarkus | ||
|
||
## Overview | ||
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an | ||
[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. | ||
|
||
This is an example of building a OpenAPI-enabled JAX-RS server. | ||
This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and | ||
the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition. | ||
|
||
The pom file is configured to use [Quarkus](https://quarkus.io/) as application server. | ||
|
||
|
||
To start the server in dev mode, run this maven command: | ||
|
||
```bash | ||
mvn compile quarkus:dev | ||
``` | ||
|
||
You can then call your server endpoints under: | ||
|
||
``` | ||
http://localhost:8080/ | ||
``` | ||
|
||
In dev-mode, you can open Swagger-UI at: | ||
|
||
``` | ||
http://localhost:8080/swagger-ui/ | ||
``` | ||
|
||
Read more in the [Quarkus OpenAPI guide](https://quarkus.io/guides/openapi-swaggerui-guide). | ||
|
Oops, something went wrong.