Skip to content

Commit 265e0d1

Browse files
committed
update doc
1 parent 8160b63 commit 265e0d1

File tree

4 files changed

+388
-17
lines changed

4 files changed

+388
-17
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ Here is a list of template creators:
11431143
* Haskell Servant: @algas
11441144
* Haskell Yesod: @yotsuya
11451145
* Java Camel: @carnevalegiacomo
1146+
* Java Dubbo: @redoom
11461147
* Java MSF4J: @sanjeewa-malalgoda
11471148
* Java Spring Boot: @diyfr
11481149
* Java Undertow: @stevehu

docs/generators.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ The following generators are available:
106106
* [haskell](generators/haskell.md)
107107
* [haskell-yesod (beta)](generators/haskell-yesod.md)
108108
* [java-camel](generators/java-camel.md)
109+
* [java-dubbo (beta)](generators/java-dubbo.md)
109110
* [java-helidon-server (beta)](generators/java-helidon-server.md)
110111
* [java-inflector](generators/java-inflector.md)
111112
* [java-micronaut-server (beta)](generators/java-micronaut-server.md)

docs/generators/java-dubbo.md

Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
---
2+
title: Documentation for the java-dubbo Generator
3+
---
4+
5+
## METADATA
6+
7+
| Property | Value | Notes |
8+
| -------- | ----- | ----- |
9+
| generator name | java-dubbo | pass this to the generate command after -g |
10+
| generator stability | BETA | |
11+
| generator type | SERVER | |
12+
| generator language | Java | |
13+
| generator default templating engine | mustache | |
14+
| helpTxt | Generates a Java Apache Dubbo server application. | |
15+
16+
## CONFIG OPTIONS
17+
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.
18+
19+
| Option | Description | Values | Default |
20+
| ------ | ----------- | ------ | ------- |
21+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
23+
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
24+
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
25+
|apiPackage|package for generated api classes| |org.openapitools.api|
26+
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
27+
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-dubbo|
28+
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
29+
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename. If not provided, uses the version from the OpenAPI specification file. If that's also not present, uses the default value of the artifactVersion option.| |1.0.0|
30+
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
31+
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
32+
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
33+
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
34+
|configPackage|configuration package for generated code| |org.openapitools.configuration|
35+
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
36+
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
37+
|developerEmail|developer email in generated pom.xml| |[email protected]|
38+
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
39+
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
40+
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
41+
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
42+
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
43+
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
44+
|dubboVersion|Dubbo version| |3.2.18|
45+
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
46+
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE', 'legacy' and 'original'| |MACRO_CASE|
47+
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
48+
|generateBuilders|Whether to generate builders for models| |false|
49+
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
50+
|groupId|groupId in generated pom.xml| |org.openapitools|
51+
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
52+
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
53+
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
54+
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
55+
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
56+
|invokerPackage|root package for generated code| |org.openapitools|
57+
|javaVersion|Java version| |17|
58+
|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|
59+
|licenseName|The name of the license| |Unlicense|
60+
|licenseUrl|The URL of the license| |http://unlicense.org|
61+
|modelPackage|package for generated models| |org.openapitools.model|
62+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
63+
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
64+
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
65+
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
66+
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
67+
|registry-address|Registry address (e.g., zookeeper://127.0.0.1:2181 or nacos://127.0.0.1:8848)| |zookeeper://127.0.0.1:2181|
68+
|scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
69+
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
70+
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
71+
|serializableModel|boolean - toggle &quot;implements Serializable&quot; for generated models| |false|
72+
|serviceImplementation|Generate service implementation| |true|
73+
|serviceInterface|Generate service interface| |true|
74+
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd></dl>|null|
75+
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
76+
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
77+
|sourceFolder|source folder for generated code| |src/main/java|
78+
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
79+
|title|API title name| |null|
80+
|useGenericResponse|Use generic response wrapper| |false|
81+
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
82+
|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|
83+
|useTags|use tags for creating interface and controller classnames| |true|
84+
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
85+
86+
## SUPPORTED VENDOR EXTENSIONS
87+
88+
| Extension name | Description | Applicable for | Default value |
89+
| -------------- | ----------- | -------------- | ------------- |
90+
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
91+
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
92+
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
93+
|x-tags|Specify multiple swagger tags for operation|OPERATION|null
94+
|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null
95+
|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null
96+
|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null
97+
|x-field-extra-annotation|List of custom annotations to be added to property|FIELD, OPERATION_PARAMETER|null
98+
99+
100+
## IMPORT MAPPING
101+
102+
| Type/Alias | Imports |
103+
| ---------- | ------- |
104+
|Array|java.util.List|
105+
|ArrayList|java.util.ArrayList|
106+
|Arrays|java.util.Arrays|
107+
|BigDecimal|java.math.BigDecimal|
108+
|BigInteger|java.math.BigInteger|
109+
|Date|java.util.Date|
110+
|DateTime|org.joda.time.*|
111+
|File|java.io.File|
112+
|HashMap|java.util.HashMap|
113+
|HashSet|java.util.HashSet|
114+
|LinkedHashSet|java.util.LinkedHashSet|
115+
|List|java.util.List|
116+
|LocalDate|java.time.LocalDate|
117+
|LocalDateTime|java.time.LocalDateTime|
118+
|LocalTime|java.time.LocalTime|
119+
|Map|java.util.Map|
120+
|MultipartFile|org.springframework.web.multipart.MultipartFile|
121+
|OffsetDateTime|java.time.OffsetDateTime|
122+
|Set|java.util.Set|
123+
|Timestamp|java.sql.Timestamp|
124+
|URI|java.net.URI|
125+
|UUID|java.util.UUID|
126+
127+
128+
## INSTANTIATION TYPES
129+
130+
| Type/Alias | Instantiated By |
131+
| ---------- | --------------- |
132+
|array|ArrayList|
133+
|map|HashMap|
134+
|set|LinkedHashSet|
135+
136+
137+
## LANGUAGE PRIMITIVES
138+
139+
<ul class="column-ul">
140+
<li>Boolean</li>
141+
<li>Double</li>
142+
<li>Float</li>
143+
<li>Integer</li>
144+
<li>List</li>
145+
<li>Long</li>
146+
<li>Map</li>
147+
<li>Object</li>
148+
<li>Set</li>
149+
<li>String</li>
150+
<li>boolean</li>
151+
</ul>
152+
153+
## RESERVED WORDS
154+
155+
<ul class="column-ul">
156+
<li>_</li>
157+
<li>abstract</li>
158+
<li>apiclient</li>
159+
<li>apiexception</li>
160+
<li>apiresponse</li>
161+
<li>assert</li>
162+
<li>boolean</li>
163+
<li>break</li>
164+
<li>byte</li>
165+
<li>case</li>
166+
<li>catch</li>
167+
<li>char</li>
168+
<li>class</li>
169+
<li>configuration</li>
170+
<li>const</li>
171+
<li>continue</li>
172+
<li>default</li>
173+
<li>do</li>
174+
<li>double</li>
175+
<li>else</li>
176+
<li>enum</li>
177+
<li>extends</li>
178+
<li>file</li>
179+
<li>final</li>
180+
<li>finally</li>
181+
<li>float</li>
182+
<li>for</li>
183+
<li>goto</li>
184+
<li>if</li>
185+
<li>implements</li>
186+
<li>import</li>
187+
<li>instanceof</li>
188+
<li>int</li>
189+
<li>interface</li>
190+
<li>list</li>
191+
<li>localdate</li>
192+
<li>localreturntype</li>
193+
<li>localtime</li>
194+
<li>localvaraccept</li>
195+
<li>localvaraccepts</li>
196+
<li>localvarauthnames</li>
197+
<li>localvarcollectionqueryparams</li>
198+
<li>localvarcontenttype</li>
199+
<li>localvarcontenttypes</li>
200+
<li>localvarcookieparams</li>
201+
<li>localvarformparams</li>
202+
<li>localvarheaderparams</li>
203+
<li>localvarpath</li>
204+
<li>localvarpostbody</li>
205+
<li>localvarqueryparams</li>
206+
<li>long</li>
207+
<li>native</li>
208+
<li>new</li>
209+
<li>null</li>
210+
<li>object</li>
211+
<li>offsetdatetime</li>
212+
<li>package</li>
213+
<li>private</li>
214+
<li>protected</li>
215+
<li>public</li>
216+
<li>return</li>
217+
<li>short</li>
218+
<li>static</li>
219+
<li>strictfp</li>
220+
<li>stringutil</li>
221+
<li>super</li>
222+
<li>switch</li>
223+
<li>synchronized</li>
224+
<li>this</li>
225+
<li>throw</li>
226+
<li>throws</li>
227+
<li>transient</li>
228+
<li>try</li>
229+
<li>void</li>
230+
<li>volatile</li>
231+
<li>while</li>
232+
</ul>
233+
234+
## FEATURE SET
235+
236+
237+
### Client Modification Feature
238+
| Name | Supported | Defined By |
239+
| ---- | --------- | ---------- |
240+
|BasePath|✓|ToolingExtension
241+
|Authorizations|✗|ToolingExtension
242+
|UserAgent|✗|ToolingExtension
243+
|MockServer|✗|ToolingExtension
244+
245+
### Data Type Feature
246+
| Name | Supported | Defined By |
247+
| ---- | --------- | ---------- |
248+
|Custom|✗|OAS2,OAS3
249+
|Int32|✓|OAS2,OAS3
250+
|Int64|✓|OAS2,OAS3
251+
|Float|✓|OAS2,OAS3
252+
|Double|✓|OAS2,OAS3
253+
|Decimal|✓|ToolingExtension
254+
|String|✓|OAS2,OAS3
255+
|Byte|✓|OAS2,OAS3
256+
|Binary|✓|OAS2,OAS3
257+
|Boolean|✓|OAS2,OAS3
258+
|Date|✓|OAS2,OAS3
259+
|DateTime|✓|OAS2,OAS3
260+
|Password|✓|OAS2,OAS3
261+
|File|✓|OAS2
262+
|Uuid||
263+
|Array|✓|OAS2,OAS3
264+
|Null|✗|OAS3
265+
|AnyType|✗|OAS2,OAS3
266+
|Object|✓|OAS2,OAS3
267+
|Maps|✓|ToolingExtension
268+
|CollectionFormat|✓|OAS2
269+
|CollectionFormatMulti|✓|OAS2
270+
|Enum|✓|OAS2,OAS3
271+
|ArrayOfEnum|✓|ToolingExtension
272+
|ArrayOfModel|✓|ToolingExtension
273+
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
274+
|ArrayOfCollectionOfModel|✓|ToolingExtension
275+
|ArrayOfCollectionOfEnum|✓|ToolingExtension
276+
|MapOfEnum|✓|ToolingExtension
277+
|MapOfModel|✓|ToolingExtension
278+
|MapOfCollectionOfPrimitives|✓|ToolingExtension
279+
|MapOfCollectionOfModel|✓|ToolingExtension
280+
|MapOfCollectionOfEnum|✓|ToolingExtension
281+
282+
### Documentation Feature
283+
| Name | Supported | Defined By |
284+
| ---- | --------- | ---------- |
285+
|Readme|✓|ToolingExtension
286+
|Model|✓|ToolingExtension
287+
|Api|✓|ToolingExtension
288+
289+
### Global Feature
290+
| Name | Supported | Defined By |
291+
| ---- | --------- | ---------- |
292+
|Host|✓|OAS2,OAS3
293+
|BasePath|✓|OAS2,OAS3
294+
|Info|✓|OAS2,OAS3
295+
|Schemes|✗|OAS2,OAS3
296+
|PartialSchemes|✓|OAS2,OAS3
297+
|Consumes|✓|OAS2
298+
|Produces|✓|OAS2
299+
|ExternalDocumentation|✓|OAS2,OAS3
300+
|Examples|✓|OAS2,OAS3
301+
|XMLStructureDefinitions|✗|OAS2,OAS3
302+
|MultiServer|✗|OAS3
303+
|ParameterizedServer|✗|OAS3
304+
|ParameterStyling|✗|OAS3
305+
|Callbacks|✗|OAS3
306+
|LinkObjects|✗|OAS3
307+
308+
### Parameter Feature
309+
| Name | Supported | Defined By |
310+
| ---- | --------- | ---------- |
311+
|Path|✓|OAS2,OAS3
312+
|Query|✓|OAS2,OAS3
313+
|Header|✓|OAS2,OAS3
314+
|Body|✓|OAS2
315+
|FormUnencoded|✓|OAS2
316+
|FormMultipart|✓|OAS2
317+
|Cookie|✗|OAS3
318+
319+
### Schema Support Feature
320+
| Name | Supported | Defined By |
321+
| ---- | --------- | ---------- |
322+
|Simple|✓|OAS2,OAS3
323+
|Composite|✓|OAS2,OAS3
324+
|Polymorphism|✓|OAS2,OAS3
325+
|Union|✗|OAS3
326+
|allOf|✗|OAS2,OAS3
327+
|anyOf|✗|OAS3
328+
|oneOf|✗|OAS3
329+
|not|✗|OAS3
330+
331+
### Security Feature
332+
| Name | Supported | Defined By |
333+
| ---- | --------- | ---------- |
334+
|BasicAuth|✓|OAS2,OAS3
335+
|ApiKey|✓|OAS2,OAS3
336+
|OpenIDConnect|✗|OAS3
337+
|BearerToken|✗|OAS3
338+
|OAuth2_Implicit|✓|OAS2,OAS3
339+
|OAuth2_Password|✓|OAS2,OAS3
340+
|OAuth2_ClientCredentials|✓|OAS2,OAS3
341+
|OAuth2_AuthorizationCode|✓|OAS2,OAS3
342+
|SignatureAuth|✗|OAS3
343+
|AWSV4Signature|✗|ToolingExtension
344+
345+
### Wire Format Feature
346+
| Name | Supported | Defined By |
347+
| ---- | --------- | ---------- |
348+
|JSON|✓|OAS2,OAS3
349+
|XML|✓|OAS2,OAS3
350+
|PROTOBUF|✗|ToolingExtension
351+
|Custom|✓|OAS2,OAS3

0 commit comments

Comments
 (0)