-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Java] Add USE_ENUM_CASE_INSENSITIVE for java client generator #24180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wing328
merged 1 commit into
OpenAPITools:master
from
hamburml:feature/AddEnumCaseInsensitiveJavaGen
Jul 2, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
bin/configs/java-microprofile-rest-client-3.0-jackson-ignore-case.yaml
This file contains hidden or 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,13 @@ | ||
| generatorName: java | ||
| outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson-ignore-case | ||
| library: microprofile | ||
| inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml | ||
| templateDir: modules/openapi-generator/src/main/resources/Java | ||
| additionalProperties: | ||
| serializationLibrary: jackson | ||
| useEnumCaseInsensitive: true | ||
| artifactId: microprofile-rest-client-3-jackson | ||
| configKey: petstore | ||
| microprofileRestClientVersion: "3.0" | ||
| hideGenerationTimestamp: true | ||
| useReflectionEqualsHashCode: true | ||
This file contains hidden or 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 hidden or 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
23 changes: 23 additions & 0 deletions
23
.../petstore/java/microprofile-rest-client-3.0-jackson-ignore-case/.openapi-generator-ignore
This file contains hidden or 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 |
121 changes: 121 additions & 0 deletions
121
...t/petstore/java/microprofile-rest-client-3.0-jackson-ignore-case/.openapi-generator/FILES
This file contains hidden or 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,121 @@ | ||
| README.md | ||
| docs/AdditionalPropertiesClass.md | ||
| docs/AllOfWithSingleRef.md | ||
| docs/Animal.md | ||
| docs/AnotherFakeApi.md | ||
| docs/ArrayOfArrayOfNumberOnly.md | ||
| docs/ArrayOfNumberOnly.md | ||
| docs/ArrayTest.md | ||
| docs/Capitalization.md | ||
| docs/Cat.md | ||
| docs/Category.md | ||
| docs/ChildWithNullable.md | ||
| docs/ClassModel.md | ||
| docs/Client.md | ||
| docs/DefaultApi.md | ||
| docs/DeprecatedObject.md | ||
| docs/Dog.md | ||
| docs/EnumArrays.md | ||
| docs/EnumClass.md | ||
| docs/EnumTest.md | ||
| docs/FakeApi.md | ||
| docs/FakeBigDecimalMap200Response.md | ||
| docs/FakeClassnameTags123Api.md | ||
| docs/FileSchemaTestClass.md | ||
| docs/Foo.md | ||
| docs/FooGetDefaultResponse.md | ||
| docs/FormatTest.md | ||
| docs/HasOnlyReadOnly.md | ||
| docs/HealthCheckResult.md | ||
| docs/MapTest.md | ||
| docs/MixedPropertiesAndAdditionalPropertiesClass.md | ||
| docs/Model200Response.md | ||
| docs/ModelApiResponse.md | ||
| docs/ModelFile.md | ||
| docs/ModelList.md | ||
| docs/ModelReturn.md | ||
| docs/Name.md | ||
| docs/NullableClass.md | ||
| docs/NumberOnly.md | ||
| docs/ObjectWithDeprecatedFields.md | ||
| docs/Order.md | ||
| docs/OuterComposite.md | ||
| docs/OuterEnum.md | ||
| docs/OuterEnumDefaultValue.md | ||
| docs/OuterEnumInteger.md | ||
| docs/OuterEnumIntegerDefaultValue.md | ||
| docs/OuterObjectWithEnumProperty.md | ||
| docs/ParentWithNullable.md | ||
| docs/Pet.md | ||
| docs/PetApi.md | ||
| docs/ReadOnlyFirst.md | ||
| docs/SingleRefType.md | ||
| docs/SpecialModelName.md | ||
| docs/StoreApi.md | ||
| docs/Tag.md | ||
| docs/TestInlineFreeformAdditionalPropertiesRequest.md | ||
| docs/User.md | ||
| docs/UserApi.md | ||
| pom.xml | ||
| src/main/java/org/openapitools/client/RFC3339DateFormat.java | ||
| src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java | ||
| src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java | ||
| src/main/java/org/openapitools/client/api/AnotherFakeApi.java | ||
| src/main/java/org/openapitools/client/api/ApiException.java | ||
| src/main/java/org/openapitools/client/api/ApiExceptionMapper.java | ||
| src/main/java/org/openapitools/client/api/DefaultApi.java | ||
| src/main/java/org/openapitools/client/api/FakeApi.java | ||
| src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java | ||
| src/main/java/org/openapitools/client/api/PetApi.java | ||
| src/main/java/org/openapitools/client/api/StoreApi.java | ||
| src/main/java/org/openapitools/client/api/UserApi.java | ||
| src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java | ||
| src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java | ||
| src/main/java/org/openapitools/client/model/Animal.java | ||
| src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java | ||
| src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java | ||
| src/main/java/org/openapitools/client/model/ArrayTest.java | ||
| src/main/java/org/openapitools/client/model/Capitalization.java | ||
| src/main/java/org/openapitools/client/model/Cat.java | ||
| src/main/java/org/openapitools/client/model/Category.java | ||
| src/main/java/org/openapitools/client/model/ChildWithNullable.java | ||
| src/main/java/org/openapitools/client/model/ClassModel.java | ||
| src/main/java/org/openapitools/client/model/Client.java | ||
| src/main/java/org/openapitools/client/model/DeprecatedObject.java | ||
| src/main/java/org/openapitools/client/model/Dog.java | ||
| src/main/java/org/openapitools/client/model/EnumArrays.java | ||
| src/main/java/org/openapitools/client/model/EnumClass.java | ||
| src/main/java/org/openapitools/client/model/EnumTest.java | ||
| src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java | ||
| src/main/java/org/openapitools/client/model/FileSchemaTestClass.java | ||
| src/main/java/org/openapitools/client/model/Foo.java | ||
| src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java | ||
| src/main/java/org/openapitools/client/model/FormatTest.java | ||
| src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java | ||
| src/main/java/org/openapitools/client/model/HealthCheckResult.java | ||
| src/main/java/org/openapitools/client/model/MapTest.java | ||
| src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java | ||
| src/main/java/org/openapitools/client/model/Model200Response.java | ||
| src/main/java/org/openapitools/client/model/ModelApiResponse.java | ||
| src/main/java/org/openapitools/client/model/ModelFile.java | ||
| src/main/java/org/openapitools/client/model/ModelList.java | ||
| src/main/java/org/openapitools/client/model/ModelReturn.java | ||
| src/main/java/org/openapitools/client/model/Name.java | ||
| src/main/java/org/openapitools/client/model/NullableClass.java | ||
| src/main/java/org/openapitools/client/model/NumberOnly.java | ||
| src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java | ||
| src/main/java/org/openapitools/client/model/Order.java | ||
| src/main/java/org/openapitools/client/model/OuterComposite.java | ||
| src/main/java/org/openapitools/client/model/OuterEnum.java | ||
| src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java | ||
| src/main/java/org/openapitools/client/model/OuterEnumInteger.java | ||
| src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java | ||
| src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java | ||
| src/main/java/org/openapitools/client/model/ParentWithNullable.java | ||
| src/main/java/org/openapitools/client/model/Pet.java | ||
| src/main/java/org/openapitools/client/model/ReadOnlyFirst.java | ||
| src/main/java/org/openapitools/client/model/SingleRefType.java | ||
| src/main/java/org/openapitools/client/model/SpecialModelName.java | ||
| src/main/java/org/openapitools/client/model/Tag.java | ||
| src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java | ||
| src/main/java/org/openapitools/client/model/User.java |
1 change: 1 addition & 0 deletions
1
...petstore/java/microprofile-rest-client-3.0-jackson-ignore-case/.openapi-generator/VERSION
This file contains hidden or 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 @@ | ||
| 7.24.0-SNAPSHOT |
9 changes: 9 additions & 0 deletions
9
...client/petstore/java/microprofile-rest-client-3.0-jackson-ignore-case/README.md
This file contains hidden or 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,9 @@ | ||
| # OpenAPI Petstore - MicroProfile Rest Client & MicroProfile Server | ||
|
|
||
| This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ | ||
|
|
||
| ## Overview | ||
| This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. | ||
| [MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling | ||
| REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes. | ||
|
|
14 changes: 14 additions & 0 deletions
14
...roprofile-rest-client-3.0-jackson-ignore-case/docs/AdditionalPropertiesClass.md
This file contains hidden or 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 @@ | ||
|
|
||
|
|
||
| # AdditionalPropertiesClass | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**mapProperty** | **Map<String, String>** | | [optional] | | ||
| |**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | | ||
|
|
||
|
|
||
|
|
14 changes: 14 additions & 0 deletions
14
...ava/microprofile-rest-client-3.0-jackson-ignore-case/docs/AllOfWithSingleRef.md
This file contains hidden or 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 @@ | ||
|
|
||
|
|
||
| # AllOfWithSingleRef | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**username** | **String** | | [optional] | | ||
| |**singleRefType** | **SingleRefType** | | [optional] | | ||
|
|
||
|
|
||
|
|
14 changes: 14 additions & 0 deletions
14
...t/petstore/java/microprofile-rest-client-3.0-jackson-ignore-case/docs/Animal.md
This file contains hidden or 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 @@ | ||
|
|
||
|
|
||
| # Animal | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**className** | **String** | | | | ||
| |**color** | **String** | | [optional] | | ||
|
|
||
|
|
||
|
|
75 changes: 75 additions & 0 deletions
75
...re/java/microprofile-rest-client-3.0-jackson-ignore-case/docs/AnotherFakeApi.md
This file contains hidden or 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,75 @@ | ||
| # AnotherFakeApi | ||
|
|
||
| All URIs are relative to *http://petstore.swagger.io:80/v2* | ||
|
|
||
| | Method | HTTP request | Description | | ||
| |------------- | ------------- | -------------| | ||
| | [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | | ||
|
|
||
|
|
||
|
|
||
| ## call123testSpecialTags | ||
|
|
||
| > Client call123testSpecialTags(client) | ||
|
|
||
| To test special tags | ||
|
|
||
| To test special tags and operation ID starting with number | ||
|
|
||
| ### Example | ||
|
|
||
| ```java | ||
| // Import classes: | ||
| import org.openapitools.client.ApiClient; | ||
| import org.openapitools.client.ApiException; | ||
| import org.openapitools.client.Configuration; | ||
| import org.openapitools.client.models.*; | ||
| import org.openapitools.client.api.AnotherFakeApi; | ||
|
|
||
| public class Example { | ||
| public static void main(String[] args) { | ||
| ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
| defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); | ||
|
|
||
| AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); | ||
| Client client = new Client(); // Client | client model | ||
| try { | ||
| Client result = apiInstance.call123testSpecialTags(client); | ||
| System.out.println(result); | ||
| } catch (ApiException e) { | ||
| System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); | ||
| System.err.println("Status code: " + e.getCode()); | ||
| System.err.println("Reason: " + e.getResponseBody()); | ||
| System.err.println("Response headers: " + e.getResponseHeaders()); | ||
| e.printStackTrace(); | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Parameters | ||
|
|
||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------- | ------------- | ------------- | -------------| | ||
| | **client** | [**Client**](Client.md)| client model | | | ||
|
|
||
| ### Return type | ||
|
|
||
| [**Client**](Client.md) | ||
|
|
||
| ### Authorization | ||
|
|
||
| No authorization required | ||
|
|
||
| ### HTTP request headers | ||
|
|
||
| - **Content-Type**: application/json | ||
| - **Accept**: application/json | ||
|
|
||
|
|
||
| ### HTTP response details | ||
| | Status code | Description | Response headers | | ||
| |-------------|-------------|------------------| | ||
| | **200** | successful operation | - | | ||
|
|
13 changes: 13 additions & 0 deletions
13
...croprofile-rest-client-3.0-jackson-ignore-case/docs/ArrayOfArrayOfNumberOnly.md
This file contains hidden or 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,13 @@ | ||
|
|
||
|
|
||
| # ArrayOfArrayOfNumberOnly | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | | ||
|
|
||
|
|
||
|
|
13 changes: 13 additions & 0 deletions
13
...java/microprofile-rest-client-3.0-jackson-ignore-case/docs/ArrayOfNumberOnly.md
This file contains hidden or 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,13 @@ | ||
|
|
||
|
|
||
| # ArrayOfNumberOnly | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**arrayNumber** | **List<BigDecimal>** | | [optional] | | ||
|
|
||
|
|
||
|
|
15 changes: 15 additions & 0 deletions
15
...etstore/java/microprofile-rest-client-3.0-jackson-ignore-case/docs/ArrayTest.md
This file contains hidden or 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,15 @@ | ||
|
|
||
|
|
||
| # ArrayTest | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**arrayOfString** | **List<String>** | | [optional] | | ||
| |**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | | ||
| |**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | | ||
|
|
||
|
|
||
|
|
18 changes: 18 additions & 0 deletions
18
...re/java/microprofile-rest-client-3.0-jackson-ignore-case/docs/Capitalization.md
This file contains hidden or 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,18 @@ | ||
|
|
||
|
|
||
| # Capitalization | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Name | Type | Description | Notes | | ||
| |------------ | ------------- | ------------- | -------------| | ||
| |**smallCamel** | **String** | | [optional] | | ||
| |**capitalCamel** | **String** | | [optional] | | ||
| |**smallSnake** | **String** | | [optional] | | ||
| |**capitalSnake** | **String** | | [optional] | | ||
| |**scAETHFlowPoints** | **String** | | [optional] | | ||
| |**ATT_NAME** | **String** | Name of the pet | [optional] | | ||
|
|
||
|
|
||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally and the build is successful