You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
| helpTxt | Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more. ||
15
+
| helpTxt | Generates a Java client library<br /><br />Features in this generator:<br />- v3.0.0 - [v3.0.3](#schema-feature) OpenAPI Specification support for component schemas<br />- Very [thorough documentation generated in the style of javadocs, includes code samples](samples/client/petstore/java/docs/components/schemas/Money.md#money)<br />- Input types constrained for a Schema in SomeSchema.validate<br /> - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data<br />- Immutable List output classes generated and returned by validate for List<?> input<br />- Immutable Map output classes generated and returned by validate for Map<?, ?> input<br />- Strictly typed list input can be instantiated in client code using generated ListBuilders<br />- Strictly typed map input can be instantiated in client code using generated MapBuilders<br /> - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:<br /> - `new MapBuilder().requiredA("a").requiredB("b").build()`<br /> - `new MapBuilder().requiredA("a").requiredB("b").optionalProp("c").additionalProperty("someAddProp", "d").build()`<br />- Run time type checking and validation when<br /> - validating schema payloads<br /> - instantiating List output class (validation run)<br /> - instantiating Map output class (validation run)<br /> - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class<br />- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods<br />- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client<br /> - ensuring that null pointer exceptions will not happen<br />- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in<br /> - component schema names<br /> - schema property names (a fallback setter is written in the MapBuilder)<br />- Generated interfaces are largely consistent with the python code<br />- Openapi spec inline schemas supported at any depth in any location<br />- Format support for: int32, int64, float, double, date, datetime, uuid<br />- Payload values are not coerced when validated, so a datetime value can pass other validations that describe the payload only as type string<br />- types are generated for enums of type string/integer/boolean using typing.Literal<br />- String transmission of numbers supported with type: string, format: number | |
16
16
17
17
## CONFIG OPTIONS
18
18
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
@@ -48,8 +48,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
48
48
49
49
| Extension name | Description | Applicable for | Default value |
Copy file name to clipboardExpand all lines: src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java
+33-1
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,39 @@ public String getName() {
308
308
309
309
@Override
310
310
publicStringgetHelp() {
311
-
return"Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more.";
311
+
returnString.join("<br />",
312
+
"Generates a Java client library",
313
+
"",
314
+
"Features in this generator:",
315
+
"- v3.0.0 - [v3.0.3](#schema-feature) OpenAPI Specification support for component schemas",
316
+
"- Very [thorough documentation generated in the style of javadocs, includes code samples](samples/client/petstore/java/docs/components/schemas/Money.md#money)",
317
+
"- Input types constrained for a Schema in SomeSchema.validate",
318
+
" - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data",
319
+
"- Immutable List output classes generated and returned by validate for List<?> input",
320
+
"- Immutable Map output classes generated and returned by validate for Map<?, ?> input",
321
+
"- Strictly typed list input can be instantiated in client code using generated ListBuilders",
322
+
"- Strictly typed map input can be instantiated in client code using generated MapBuilders",
323
+
" - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:",
" - instantiating List output class (validation run)",
329
+
" - instantiating Map output class (validation run)",
330
+
" - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class",
331
+
"- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods",
332
+
"- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client",
333
+
" - ensuring that null pointer exceptions will not happen",
334
+
"- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in",
335
+
" - component schema names",
336
+
" - schema property names (a fallback setter is written in the MapBuilder)",
337
+
"- Generated interfaces are largely consistent with the python code",
338
+
"- Openapi spec inline schemas supported at any depth in any location",
339
+
"- Format support for: int32, int64, float, double, date, datetime, uuid",
340
+
"- Payload values are not coerced when validated, so a datetime value can pass other validations that describe the payload only as type string",
341
+
"- types are generated for enums of type string/integer/boolean using typing.Literal",
342
+
"- String transmission of numbers supported with type: string, format: number"
Copy file name to clipboardExpand all lines: src/main/java/org/openapijsonschematools/codegen/generators/models/VendorExtension.java
+2-2
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@
5
5
6
6
publicenumVendorExtension {
7
7
8
-
X_ENUM_VARNAMES("x-enum-varnames", ExtensionLevel.SCHEMA, "A list of strings that defines the enum variable names, must be adjacent to enums", "[]"),
9
-
X_ENUM_DESCRIPTIONS("x-enum-descriptions", ExtensionLevel.SCHEMA, "A list of strings that defines the enum descriptions, must be adjacent to enums", "[]"),
8
+
X_ENUM_VARNAMES("x-enum-varnames", ExtensionLevel.SCHEMA, "A list of strings that defines the enum variable names, must be adjacent to enum", "[]"),
9
+
X_ENUM_DESCRIPTIONS("x-enum-descriptions", ExtensionLevel.SCHEMA, "A list of strings that defines the enum descriptions, must be adjacent to enum", "[]"),
0 commit comments