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

Commit 9593967

Browse files
authored
Java, adds tag apis (#419)
* Adds operation interfaces that have operationId methods * Adjusts operationId camelCase value * Adds tag api files * Fixes java tag api class names and file names * Java operation docs regen * Adds and uses CodegenKey method in operation to shorten java class names * Deprecates schema pascal case method * Uses getPascalCase for 2 more use cases * Deprecates specific pascalCase methods * Adds prefix to java request body classes * Fixes typos in operation template * Java responses classes renamed * Updates operation XParameters schema class names for java * Adds prefix to responses * Adds path api docs * Fixes path api code samples * Adds tag apis docs * Petstore regen * Fixes more links * Fixes python java test error * Samples regen
1 parent 39f30f7 commit 9593967

File tree

1,363 files changed

+82395
-66254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,363 files changed

+82395
-66254
lines changed

samples/client/3_0_3_unit_test/java/README.md

+13-18
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Here is the mapping from json schema types to Java types:
6565

6666
| Json Schema Type | Java Base Class |
6767
| ---------------- | --------------- |
68-
| object | FrozenMap (HashMap) |
69-
| array | FrozenList (ArrayList) |
68+
| object | FrozenMap (Map) |
69+
| array | FrozenList (List) |
7070
| string | String |
7171
| number | Number (int, long, float, double) |
7272
| integer | int, long, float, double (with values equal to integers) |
@@ -102,7 +102,7 @@ invalid Java variable names. Names like:
102102
- " "
103103
- "from"
104104

105-
To allow these use cases to work, FrozenMap (which extends HashMap) is used as the base class of type object schemas.
105+
To allow these use cases to work, FrozenMap (which extends AbstractMap) is used as the base class of type object schemas.
106106
This means that one can use normal Map methods on instances of these classes.
107107

108108
<details>
@@ -118,8 +118,6 @@ This means that one can use normal Map methods on instances of these classes.
118118
N schemas can be validated on the same payload.
119119
To allow multiple schemas to validate, the data must be stored using one base class whether or not
120120
a json schema format constraint exists in the schema.
121-
See the below accessors for string data:
122-
- type string + format: See schemas.as_date, schemas.as_datetime, schemas.as_decimal, schemas.as_uuid
123121

124122
In json schema, type: number with no format validates both integers and floats,
125123
so int and float values are stored for type number.
@@ -137,7 +135,7 @@ For example the string payload '2023-12-20' is validates to both of these schema
137135
- type: string
138136
format: date
139137
```
140-
Because of use cases like this, a datetime.date is allowed as an input to this schema, but the data
138+
Because of use cases like this, a LocalDate is allowed as an input to this schema, but the data
141139
is stored as a string.
142140
</details>
143141

@@ -153,8 +151,16 @@ allowed input and output types.
153151
| ------------ | ----- | ----------- |
154152
| 0 | [Server0](docs/servers/Server0.md) | |
155153

156-
## Component Schemas
154+
## Endpoints
155+
All URIs are relative to the selected server
156+
- The server is selected by passing in serverInfo + serverIndexInfo into configurations.ApiConfiguration
157+
- The security info is selected by passing in securityInfo + securityIndexInfo into configurations.ApiConfiguration
158+
- serverIndex + securityIndex can also be passed in to endpoint calls, see endpoint documentation
159+
160+
| HTTP request | Methods | Description |
161+
| ------------ | ------- | ----------- |
157162

163+
## Component Schemas
158164
| Class | Description |
159165
| ----- | ----------- |
160166
| [AdditionalpropertiesAllowsASchemaWhichShouldValidate.AdditionalpropertiesAllowsASchemaWhichShouldValidate1](docs/components/schemas/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md#additionalpropertiesallowsaschemawhichshouldvalidate1) | |
@@ -244,14 +250,3 @@ allowed input and output types.
244250
| [UriFormat.UriFormat1](docs/components/schemas/UriFormat.md#uriformat1) | |
245251
| [UriReferenceFormat.UriReferenceFormat1](docs/components/schemas/UriReferenceFormat.md#urireferenceformat1) | |
246252
| [UriTemplateFormat.UriTemplateFormat1](docs/components/schemas/UriTemplateFormat.md#uritemplateformat1) | |
247-
248-
## Endpoints
249-
250-
All URIs are relative to the selected server
251-
- The server is selected by passing in serverInfo into configurations.ApiConfiguration
252-
- The security info is selected by passing in securityInfo into configurations.ApiConfiguration
253-
- TODO Code samples in endpoints documents show how to do this
254-
- serverIndex + securityIndex can also be passed in to endpoint calls, see endpoint documentation
255-
256-
| HTTP request | Method | Description |
257-
| ------------ | ------ | ----------- |

samples/client/3_1_0_unit_test/java/README.md

+13-18
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Here is the mapping from json schema types to Java types:
6565

6666
| Json Schema Type | Java Base Class |
6767
| ---------------- | --------------- |
68-
| object | FrozenMap (HashMap) |
69-
| array | FrozenList (ArrayList) |
68+
| object | FrozenMap (Map) |
69+
| array | FrozenList (List) |
7070
| string | String |
7171
| number | Number (int, long, float, double) |
7272
| integer | int, long, float, double (with values equal to integers) |
@@ -102,7 +102,7 @@ invalid Java variable names. Names like:
102102
- " "
103103
- "from"
104104

105-
To allow these use cases to work, FrozenMap (which extends HashMap) is used as the base class of type object schemas.
105+
To allow these use cases to work, FrozenMap (which extends AbstractMap) is used as the base class of type object schemas.
106106
This means that one can use normal Map methods on instances of these classes.
107107

108108
<details>
@@ -118,8 +118,6 @@ This means that one can use normal Map methods on instances of these classes.
118118
N schemas can be validated on the same payload.
119119
To allow multiple schemas to validate, the data must be stored using one base class whether or not
120120
a json schema format constraint exists in the schema.
121-
See the below accessors for string data:
122-
- type string + format: See schemas.as_date, schemas.as_datetime, schemas.as_decimal, schemas.as_uuid
123121

124122
In json schema, type: number with no format validates both integers and floats,
125123
so int and float values are stored for type number.
@@ -137,7 +135,7 @@ For example the string payload '2023-12-20' is validates to both of these schema
137135
- type: string
138136
format: date
139137
```
140-
Because of use cases like this, a datetime.date is allowed as an input to this schema, but the data
138+
Because of use cases like this, a LocalDate is allowed as an input to this schema, but the data
141139
is stored as a string.
142140
</details>
143141

@@ -153,8 +151,16 @@ allowed input and output types.
153151
| ------------ | ----- | ----------- |
154152
| 0 | [Server0](docs/servers/Server0.md) | |
155153

156-
## Component Schemas
154+
## Endpoints
155+
All URIs are relative to the selected server
156+
- The server is selected by passing in serverInfo + serverIndexInfo into configurations.ApiConfiguration
157+
- The security info is selected by passing in securityInfo + securityIndexInfo into configurations.ApiConfiguration
158+
- serverIndex + securityIndex can also be passed in to endpoint calls, see endpoint documentation
159+
160+
| HTTP request | Methods | Description |
161+
| ------------ | ------- | ----------- |
157162

163+
## Component Schemas
158164
| Class | Description |
159165
| ----- | ----------- |
160166
| [ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1](docs/components/schemas/ASchemaGivenForPrefixitems.md#aschemagivenforprefixitems1) | |
@@ -300,14 +306,3 @@ allowed input and output types.
300306
| [UriTemplateFormat.UriTemplateFormat1](docs/components/schemas/UriTemplateFormat.md#uritemplateformat1) | |
301307
| [UuidFormat.UuidFormat1](docs/components/schemas/UuidFormat.md#uuidformat1) | |
302308
| [ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1](docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md#validateagainstcorrectbranchthenvselse1) | |
303-
304-
## Endpoints
305-
306-
All URIs are relative to the selected server
307-
- The server is selected by passing in serverInfo into configurations.ApiConfiguration
308-
- The security info is selected by passing in securityInfo into configurations.ApiConfiguration
309-
- TODO Code samples in endpoints documents show how to do this
310-
- serverIndex + securityIndex can also be passed in to endpoint calls, see endpoint documentation
311-
312-
| HTTP request | Method | Description |
313-
| ------------ | ------ | ----------- |

0 commit comments

Comments
 (0)