Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
02f432b
[java][okhttp] Add okhttp library supporting Gson, Jackson 2/3 and JS…
rar91279 Aug 19, 2026
15b7c37
[java] Rename okhttp-gson user-defined-templates config to match its …
rar91279 Aug 19, 2026
f3141fd
[java][okhttp] Add sample configurations for the okhttp library
rar91279 Aug 19, 2026
e8f10f9
[java][okhttp] Wire okhttp samples into CI and refresh generator docs
rar91279 Aug 19, 2026
cf8eb48
[java][okhttp] Regenerate samples for the okhttp library
rar91279 Aug 19, 2026
cafdd93
[java][okhttp] Regenerate samples against a clean build
rar91279 Aug 19, 2026
19d6117
[java][okhttp] Fix defects found in review of the new library
rar91279 Aug 19, 2026
cafcd91
[java][okhttp] Route the Jackson 3 JsonTypeName import through model.…
rar91279 Aug 19, 2026
3ae4290
Update generator docs: Add okhttp library details and support for `us…
rar91279 Aug 19, 2026
9e366d6
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 3, 2026
1b8663d
[java][okhttp] Adopt generateInsecureTlsHook and the collection-forma…
rar91279 Sep 3, 2026
8e3a141
[java][okhttp] Regenerate samples after the master merge and template…
rar91279 Sep 3, 2026
98e70bd
[java][okhttp] Address review findings: jsonb additionalProperties, b…
rar91279 Sep 3, 2026
b8112c1
[java][okhttp] Regenerate samples for the review fixes
rar91279 Sep 3, 2026
0a067d6
[java][okhttp] Fix the defects found in the five-agent sample review
rar91279 Sep 3, 2026
beb1c76
[java][okhttp] Regenerate samples for the review fixes
rar91279 Sep 3, 2026
ec5c82c
[java][okhttp] Close the okhttp-gson parity gaps: composed fromJson/t…
rar91279 Sep 4, 2026
d289677
[java][okhttp] Regenerate samples and port the invoker unit tests
rar91279 Sep 4, 2026
b6c18a6
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 4, 2026
45083ba
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 7, 2026
920a12a
[java][okhttp] Repoint the jackson/jsonb samples off the http-signatu…
rar91279 Sep 7, 2026
add7472
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 8, 2026
ff57109
[java][okhttp] Fix the defects found in the cubic review of the new l…
rar91279 Sep 8, 2026
69abe33
[java][okhttp] Build the jackson3 okhttp samples on JDK 17, not JDK 11
rar91279 Sep 8, 2026
b504403
fix from leak analyze of generated:
Sep 8, 2026
e9edfc5
fix from leak analysis of generated:
Sep 8, 2026
7fbdfd4
Fix missing semicolons in response close calls to ensure proper syntax
Sep 8, 2026
2fbd7e4
[java][okhttp] Add Jakarta EL and explicitly handle Bean Validation d…
rar91279 Sep 8, 2026
82f8bfe
[java][okhttp] Refactor imports, add unchecked JSON-B instance, impro…
rar91279 Sep 8, 2026
49d04be
[java][okhttp] Regenerate the okhttp samples after 82f8bfec184
rar91279 Sep 9, 2026
c532a71
[java][okhttp] Fix four JSON-B deserialization validation gaps
rar91279 Sep 9, 2026
18a40a3
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 9, 2026
60c5734
[java][okhttp] Add the Jackson Joda datatype module to the generated …
rar91279 Sep 9, 2026
1aa09f2
[java][okhttp] Delete stale user-defined-templates doc output
rar91279 Sep 9, 2026
309e21d
[java][okhttp] Fix two JSON-B additionalProperties serialization defects
rar91279 Sep 9, 2026
e373777
[java][okhttp] Fix seven defects found by a live PetClinic parameter …
rar91279 Sep 10, 2026
e44851c
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 14, 2026
17e8148
[java][okhttp] Keep additionalProperties across toBuilder()
rar91279 Sep 14, 2026
9a0e2ab
[java][okhttp] Stop setting useReflectionEqualsHashCode in okhttp con…
rar91279 Sep 14, 2026
a3c22df
Merge branch 'master' into java-generic-okhttp
rar91279 Sep 14, 2026
f169820
[java][okhttp] Regenerate okhttp-3.1 sample after merging master
rar91279 Sep 14, 2026
10b9597
Merge branch 'master' into java-generic-okhttp
rar91279 Oct 4, 2026
82795a1
[java][okhttp] Regenerate okhttp samples and docs after merging master
rar91279 Oct 4, 2026
4779fb5
[java][okhttp] List okhttp in the useJackson3 option description
rar91279 Oct 4, 2026
7ba89f4
[test][swift6] Pin generateAliasAsModel=false in nestedMapRefTypeTest
rar91279 Oct 1, 2026
bf46687
[java][okhttp] Serialize JSON header parameter content
rar91279 Oct 5, 2026
f71a2c1
[java][okhttp] Escape JavaDoc default values in generated API docs
rar91279 Oct 5, 2026
98df026
[java][okhttp] Do not seed addItem/putItem with the container default
rar91279 Oct 5, 2026
487aafc
[java][okhttp] Port the two inner-enum fixes from okhttp-gson
rar91279 Oct 5, 2026
a70c4fc
[java][okhttp] Update jackson-databind-nullable to 0.2.12
rar91279 Oct 5, 2026
c504caf
[java][okhttp] Make Gson oneOf/anyOf TypeAdapters null-safe
rar91279 Oct 5, 2026
3c849ef
[java][okhttp] Build the shared serializer eagerly in JSON
rar91279 Oct 5, 2026
cf23b9f
[java][okhttp] Detect byte[] responses independently of the serializer
rar91279 Oct 5, 2026
07ecf1e
[java][okhttp] Report OAuth token endpoint failures instead of sendin…
rar91279 Oct 5, 2026
2459810
[java][okhttp] Pass the token a request was sent with to updateAccess…
rar91279 Oct 5, 2026
9406758
[java][okhttp] Emit @XmlEnumValue from the raw enum value
rar91279 Oct 5, 2026
f9133eb
[java][okhttp] Serialize byte[] as base64 in the JSON-B variant
rar91279 Oct 5, 2026
6ad5274
[java][okhttp] Fall back to the raw body for String results in the JS…
rar91279 Oct 5, 2026
6c4821b
[java][okhttp] Omit the openapiFields sets from Jackson models
rar91279 Oct 5, 2026
a68f0c0
Fix cubicAI review concerns
rar91279 Oct 5, 2026
6a7029a
[java][okhttp] Import Arrays and Map in Jackson models only when used
rar91279 Oct 5, 2026
7a3905f
[java][okhttp] Handle JSON-B parents without a discriminator
rar91279 Oct 5, 2026
e89845d
Merge branch 'master' into java-generic-okhttp
rar91279 Oct 5, 2026
43c475e
[java][okhttp] Validate string enum values excluded by not (port of #…
rar91279 Oct 5, 2026
8f955bc
[java][okhttp] Enforce inherited not-enum constraints in Gson models
rar91279 Oct 5, 2026
d0f497f
Merge remote-tracking branch 'origin/master' into java-generic-okhttp
rar91279 Nov 4, 2026
50f36b5
[java][okhttp] Regenerate okhttp samples after merging master
rar91279 Nov 4, 2026
9482131
[java][okhttp] Declare the additionalProperties bag once per allOf hi…
rar91279 Nov 8, 2026
422183b
Merge remote-tracking branch 'origin/master' into java-generic-okhttp
rar91279 Nov 11, 2026
4642f9b
[java][okhttp] Port the large-oneOf adapter and call-local parameter …
rar91279 Nov 11, 2026
d39a112
[java][okhttp] Report deserialization failures as ApiException, drop …
rar91279 Nov 11, 2026
cdbf81e
[java][okhttp] Address review: progress completion, basic auth charse…
rar91279 Nov 11, 2026
de2cef5
[java][okhttp] State the basic auth charset difference accurately
rar91279 Nov 12, 2026
cdcd009
Merge branch 'java-generic-okhttp' of https://github.com/rar91279/ope…
wing328 Nov 17, 2026
c575a92
cleanup tests, workflows
wing328 Nov 17, 2026
6cafd6a
update workflow
wing328 Nov 17, 2026
4f2779f
update samples
wing328 Nov 17, 2026
7817014
update samples
wing328 Nov 17, 2026
cddf29d
update samples
wing328 Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/gradle-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- samples/client/petstore/java/jersey2-java8
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/okhttp
- samples/client/petstore/java/okhttp-group-parameter
- samples/client/petstore/java/webclient-swagger2
- samples/client/petstore/java/native
- samples/client/petstore/java/native-jakarta
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/samples-java-sbt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
- 'samples/client/petstore/java/okhttp/**'
pull_request:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
- 'samples/client/petstore/java/okhttp/**'
jobs:
build:
name: Build sbt/Java client, servers
Expand All @@ -17,6 +19,7 @@ jobs:
sample:
# clients
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
Expand Down
11 changes: 11 additions & 0 deletions bin/configs/java-okhttp-group-parameter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: java
outputDir: samples/client/petstore/java/okhttp-group-parameter
library: okhttp
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-group-parameter.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
serializationLibrary: gson
artifactId: petstore-okhttp-group-parameter
hideGenerationTimestamp: "true"
disallowAdditionalPropertiesIfNotPresent: false
useSingleRequestParameter: true
25 changes: 25 additions & 0 deletions bin/configs/java-okhttp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
generatorName: java
outputDir: samples/client/petstore/java/okhttp
library: okhttp
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-okhttp-gson.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
nameMappings:
_type: underscoreType
type_: typeWithUnderscore
parameterNameMappings:
_type: underscoreType
type_: typeWithUnderscore
additionalProperties:
serializationLibrary: gson
defaultToEmptyContainer: "array?|array|map?"
artifactId: petstore-okhttp
hideGenerationTimestamp: true
useOneOfDiscriminatorLookup: true
disallowAdditionalPropertiesIfNotPresent: false
removeEnumValuePrefix: true
enumNameMappings:
s: LOWER_CASE_S
S: UPPER_CASE_S
operationIdNameMappings:
getArrayOfEnums: getFakeArrayofenums
fakeHealthGet: getFakeHealth
8 changes: 4 additions & 4 deletions docs/generators/java-microprofile.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|generateBuilders|Whether to generate builders for models| |false|
|generateClientAsBean|For resttemplate, restclient and webclient, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false|
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|generateInsecureTlsHook|Generate the ApiClient.disableCertificateValidation hook, which trusts all TLS certificates (default to true). Set to false to omit it, e.g. when static analysis flags the trust-all TrustManager it contains. Available on `jersey2`, `jersey3` libraries.| |true|
|generateInsecureTlsHook|Generate the hook that disables TLS certificate validation and trusts all certificates (default to true): ApiClient.disableCertificateValidation on jersey2/jersey3, ApiClient.setVerifyingSsl(false) on okhttp. Set to false to omit it, e.g. when static analysis flags the trust-all TrustManager it contains. Available on `jersey2`, `jersey3`, `okhttp` libraries.| |true|
|gradleProperties|Append additional Gradle properties to the gradle.properties file| |null|
|groupId|groupId in generated pom.xml| |org.openapitools|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
Expand All @@ -66,7 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. The match is case insensitive, like HTTP header names. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.18.9</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.11. JSON processing: Jackson 2.x (3.x if `useJackson3=true`, requires Java 17+)</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.18.9 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.18.9 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.18.9. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`)</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.18.9</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.18.9</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.18.9</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2 (6.x if `useJackson3=true`). JSON processing: Gson 2.10.1 or Jackson 2.18.9 (3.x if `useJackson3=true`, requires Java 17+). Only for Java 8 (Java 17+ if `useJackson3=true`)</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`). Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.18.9</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd></dl>|okhttp-gson|
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.18.9</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.11. JSON processing: Jackson 2.x (3.x if `useJackson3=true`, requires Java 17+)</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.18.9 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.18.9 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**okhttp**</dt><dd>[BETA] HTTP client: OkHttp 5.4.0. JSON processing: Gson 2.10.1 (default), Jackson 2.22.1 (3.2.1 if `useJackson3=true`) or JSON-B, selected via '-DserializationLibrary'. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.18.9. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`)</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.18.9</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.18.9</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.18.9</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2 (6.x if `useJackson3=true`). JSON processing: Gson 2.10.1 or Jackson 2.18.9 (3.x if `useJackson3=true`, requires Java 17+). Only for Java 8 (Java 17+ if `useJackson3=true`)</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`). Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.18.9</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.18.9 (3.x if `useJackson3=true`)</dd></dl>|okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|
Expand Down Expand Up @@ -100,9 +100,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useDeductionForOneOfInterfaces|Annotate discriminator-free oneOf interfaces with Jackson's @JsonTypeInfo(use = Id.DEDUCTION) and @JsonSubTypes so the concrete subtype is resolved from the JSON field set rather than a type-tag property. Has no effect when a discriminator is present (name-based resolution is used instead). Requires subtypes to have structurally distinct sets of properties.| |false|
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
|useGzipFeature|Send gzip-encoded requests| |false|
|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native', 'apache-httpclient', 'jersey3', and 'rest-assured' libraries (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true).| |false|
|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native', 'apache-httpclient', 'jersey3', 'okhttp', and 'rest-assured' libraries (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true).| |false|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useJspecify|Use Jspecify for null checks. Only supported for [microprofile, native, restclient, resttemplate, webclient]| |false|
|useJspecify|Use Jspecify for null checks. Only supported for [microprofile, native, okhttp, restclient, resttemplate, webclient]| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|
Expand Down
Loading
Loading