Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 47bbf1a

Browse files
committed
Fixes java docs
1 parent bd0884d commit 47bbf1a

4 files changed

Lines changed: 46 additions & 26 deletions

File tree

docs/generators/java.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -190,26 +190,26 @@ These options may be applied as additional-properties (cli) or configOptions (pl
190190
| Name | Supported | Defined By |
191191
| ---- | --------- | ---------- |
192192
|Custom|✗|OAS2,OAS3
193-
|Int32||OAS2,OAS3
194-
|Int64||OAS2,OAS3
195-
|Integer||OAS2,OAS3
196-
|Float||OAS2,OAS3
197-
|Double||OAS2,OAS3
198-
|Number||OAS2,OAS3
199-
|String||OAS2,OAS3
193+
|Int32||OAS2,OAS3
194+
|Int64||OAS2,OAS3
195+
|Integer||OAS2,OAS3
196+
|Float||OAS2,OAS3
197+
|Double||OAS2,OAS3
198+
|Number||OAS2,OAS3
199+
|String||OAS2,OAS3
200200
|Byte|✗|OAS2,OAS3
201201
|Binary|✗|OAS2,OAS3
202-
|Boolean||OAS2,OAS3
203-
|Date||OAS2,OAS3
204-
|DateTime||OAS2,OAS3
202+
|Boolean||OAS2,OAS3
203+
|Date||OAS2,OAS3
204+
|DateTime||OAS2,OAS3
205205
|Password|✗|OAS2,OAS3
206206
|File|✗|OAS2
207-
|Uuid||OAS2,OAS3
208-
|Array||OAS2,OAS3
209-
|Null||OAS3
210-
|AnyType||OAS2,OAS3
211-
|Object||OAS2,OAS3
212-
|Enum||OAS2,OAS3
207+
|Uuid||OAS2,OAS3
208+
|Array||OAS2,OAS3
209+
|Null||OAS3
210+
|AnyType||OAS2,OAS3
211+
|Object||OAS2,OAS3
212+
|Enum||OAS2,OAS3
213213

214214
### Documentation Feature
215215
| Name | Supported | Defined By |
@@ -231,7 +231,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
231231
### Global Feature
232232
| Name | Supported | Defined By |
233233
| ---- | --------- | ---------- |
234-
|Info||OAS2,OAS3
234+
|Info||OAS2,OAS3
235235
|Servers|✓|OAS3
236236
|Paths|✓|OAS2,OAS3
237237
|Webhooks|✗|OAS3
@@ -332,7 +332,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
332332
### Wire Format Feature
333333
| Name | Supported | Defined By |
334334
| ---- | --------- | ---------- |
335-
|JSON||OAS2,OAS3
335+
|JSON||OAS2,OAS3
336336
|XML|✗|OAS2,OAS3
337337
|PROTOBUF|✗|ToolingExtension
338338
|Custom|✗|OAS2,OAS3

docs/generators/python.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
7070

7171
<ul class="column-ul">
7272
<li>@property</li>
73-
<li>all_params</li>
7473
<li>and</li>
7574
<li>as</li>
7675
<li>assert</li>
7776
<li>async</li>
78-
<li>auth_settings</li>
7977
<li>await</li>
80-
<li>body_params</li>
8178
<li>bool</li>
8279
<li>break</li>
8380
<li>class</li>
8481
<li>continue</li>
82+
<li>cookie_params</li>
8583
<li>datetime</li>
8684
<li>decimal</li>
8785
<li>def</li>
@@ -95,7 +93,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
9593
<li>finally</li>
9694
<li>float</li>
9795
<li>for</li>
98-
<li>form_params</li>
9996
<li>from</li>
10097
<li>functools</li>
10198
<li>global</li>
@@ -109,7 +106,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
109106
<li>is</li>
110107
<li>lambda</li>
111108
<li>list</li>
112-
<li>local_var_files</li>
113109
<li>none</li>
114110
<li>nonlocal</li>
115111
<li>not</li>

src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@
3636
import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata;
3737
import org.openapijsonschematools.codegen.generators.generatormetadata.Stability;
3838
import org.openapijsonschematools.codegen.generators.generatormetadata.features.ComponentsFeature;
39+
import org.openapijsonschematools.codegen.generators.generatormetadata.features.DataTypeFeature;
3940
import org.openapijsonschematools.codegen.generators.generatormetadata.features.GlobalFeature;
4041
import org.openapijsonschematools.codegen.generators.generatormetadata.features.OperationFeature;
4142
import org.openapijsonschematools.codegen.generators.generatormetadata.features.SchemaFeature;
4243
import org.openapijsonschematools.codegen.common.CodegenConstants;
4344
import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType;
4445
import org.openapijsonschematools.codegen.generators.generatormetadata.features.SecurityFeature;
46+
import org.openapijsonschematools.codegen.generators.generatormetadata.features.WireFormatFeature;
4547
import org.openapijsonschematools.codegen.generators.models.CliOption;
4648
import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader;
4749
import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey;
@@ -190,6 +192,24 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings
190192
private final Map<String, String> schemaKeyToModelNameCache = new HashMap<>();
191193

192194
private static final FeatureSet featureSet = FeatureSet.newBuilder()
195+
.includeDataTypeFeatures(
196+
DataTypeFeature.Int32,
197+
DataTypeFeature.Int64,
198+
DataTypeFeature.Integer,
199+
DataTypeFeature.Float,
200+
DataTypeFeature.Double,
201+
DataTypeFeature.Number,
202+
DataTypeFeature.String,
203+
DataTypeFeature.Boolean,
204+
DataTypeFeature.Date,
205+
DataTypeFeature.DateTime,
206+
DataTypeFeature.Uuid,
207+
DataTypeFeature.Array,
208+
DataTypeFeature.Object,
209+
DataTypeFeature.Null,
210+
DataTypeFeature.AnyType,
211+
DataTypeFeature.Enum
212+
)
193213
.includeDocumentationFeatures(
194214
DocumentationFeature.Readme,
195215
DocumentationFeature.Servers,
@@ -206,7 +226,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings
206226
GlobalFeature.Components,
207227
GlobalFeature.Servers,
208228
GlobalFeature.Security,
209-
GlobalFeature.Paths
229+
GlobalFeature.Paths,
230+
GlobalFeature.Info
210231
)
211232
.includeComponentsFeatures(
212233
ComponentsFeature.schemas,
@@ -273,6 +294,9 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings
273294
SchemaFeature.UnevaluatedProperties,
274295
SchemaFeature.UniqueItems
275296
)
297+
.includeWireFormatFeatures(
298+
WireFormatFeature.JSON
299+
)
276300
.build();
277301
public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder()
278302
.name("java")

src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator
263263
getLowerCaseWords(
264264
Arrays.asList( // from https://docs.python.org/3/reference/lexical_analysis.html#keywords
265265
// local variable name used in API methods (endpoints)
266-
"all_params", "resource_path", "path_params", "query_params",
267-
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
266+
"resource_path", "path_params", "query_params",
267+
"header_params", "cookie_params",
268268
// @property
269269
"property", "@property",
270270
// python reserved words

0 commit comments

Comments
 (0)