Skip to content

Commit df96cbb

Browse files
authored
Merge pull request #5 from openapi-json-schema-tools/oajs_latest_v3_regen_reduction
Sample regen
2 parents 030fa1b + 852c3ee commit df96cbb

File tree

227 files changed

+698
-1351
lines changed

Some content is hidden

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

227 files changed

+698
-1351
lines changed

.DS_Store

0 Bytes
Binary file not shown.

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ via vscode code counter tool
2323

2424
| Generator | Files | Code |
2525
| -------- | ----- | ---- |
26-
| openapi_generator_python_nextgen | 27 | 2712 |
26+
| openapi_generator_python_nextgen | 28 | 2781 |
2727
| openapi_generator_python_prior | 30 | 5075 |
28-
| openapi_json_schema_generator_python | 365 | 9527
28+
| openapi_json_schema_generator_python | 365 | 9256
2929

3030

3131
### openapi_json_schema_generator_python breakdown
32-
- 4.7k src/openapi_client/paths
32+
- 4.4k src/openapi_client/paths
3333
- ~ 50% of this is in operation.py
34-
- 3.2k 7 files in src/openapi_client
34+
- 3.3k 7 files in src/openapi_client
3535
- api_client.py + schemas.py are big
3636
- most of this comes from the 3x operation typing overloads
3737

@@ -53,12 +53,13 @@ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v6.5.0 gen
5353
-g python-prior \
5454
-o /local/openapi_generator_python_prior
5555

56-
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v6.5.0 generate \
56+
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
5757
-i /local/petstore.yaml \
5858
-g python-nextgen \
5959
-o /local/openapi_generator_python_nextgen
6060

6161
docker run --rm -v "${PWD}:/local" openapijsonschematools/openapi-json-schema-generator-cli:3.0.0-latest generate \
6262
-i /local/petstore.yaml \
6363
-g python \
64-
-o /local/openapi_json_schema_generator_python
64+
-o /local/openapi_json_schema_generator_python
65+
/Users/justinblack/programming/openapi-python-client-comparison/petstore/openapi_generator_python_prior/

petstore/openapi_generator_python_nextgen/.github/workflows/python.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.7", "3.8", "3.9", "3.10"]
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1717

1818
steps:
1919
- uses: actions/checkout@v3

petstore/openapi_generator_python_nextgen/.openapi-generator/FILES

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ openapi_client/api/pet_api.py
2020
openapi_client/api/store_api.py
2121
openapi_client/api/user_api.py
2222
openapi_client/api_client.py
23+
openapi_client/api_response.py
2324
openapi_client/configuration.py
2425
openapi_client/exceptions.py
2526
openapi_client/models/__init__.py
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
6.6.0-SNAPSHOT

petstore/openapi_generator_python_nextgen/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Execute `pytest` to run the tests.
4949
Please follow the [installation procedure](#installation--usage) and then run the following:
5050

5151
```python
52-
from __future__ import print_function
5352

5453
import time
5554
import openapi_client
@@ -124,10 +123,13 @@ Class | Method | HTTP request | Description
124123
- [User](docs/User.md)
125124

126125

126+
<a id="documentation-for-authorization"></a>
127127
## Documentation For Authorization
128128

129129

130-
## petstore_auth
130+
Authentication schemes defined for the API:
131+
<a id="petstore_auth"></a>
132+
### petstore_auth
131133

132134
- **Type**: OAuth
133135
- **Flow**: implicit
@@ -136,8 +138,8 @@ Class | Method | HTTP request | Description
136138
- **write:pets**: modify pets in your account
137139
- **read:pets**: read your pets
138140

139-
140-
## api_key
141+
<a id="api_key"></a>
142+
### api_key
141143

142144
- **Type**: API key
143145
- **API key parameter name**: api_key

petstore/openapi_generator_python_nextgen/docs/PetApi.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ Add a new pet to the store
2525

2626
* OAuth Authentication (petstore_auth):
2727
```python
28-
from __future__ import print_function
2928
import time
3029
import os
3130
import openapi_client
31+
from openapi_client.models.pet import Pet
3232
from openapi_client.rest import ApiException
3333
from pprint import pprint
34+
3435
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
3536
# See configuration.py for a list of all supported configuration parameters.
3637
configuration = openapi_client.Configuration(
@@ -59,6 +60,7 @@ with openapi_client.ApiClient(configuration) as api_client:
5960
print("Exception when calling PetApi->add_pet: %s\n" % e)
6061
```
6162

63+
6264
### Parameters
6365

6466
Name | Type | Description | Notes
@@ -97,12 +99,12 @@ Deletes a pet
9799

98100
* OAuth Authentication (petstore_auth):
99101
```python
100-
from __future__ import print_function
101102
import time
102103
import os
103104
import openapi_client
104105
from openapi_client.rest import ApiException
105106
from pprint import pprint
107+
106108
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
107109
# See configuration.py for a list of all supported configuration parameters.
108110
configuration = openapi_client.Configuration(
@@ -130,6 +132,7 @@ with openapi_client.ApiClient(configuration) as api_client:
130132
print("Exception when calling PetApi->delete_pet: %s\n" % e)
131133
```
132134

135+
133136
### Parameters
134137

135138
Name | Type | Description | Notes
@@ -168,12 +171,13 @@ Multiple status values can be provided with comma separated strings
168171

169172
* OAuth Authentication (petstore_auth):
170173
```python
171-
from __future__ import print_function
172174
import time
173175
import os
174176
import openapi_client
177+
from openapi_client.models.pet import Pet
175178
from openapi_client.rest import ApiException
176179
from pprint import pprint
180+
177181
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
178182
# See configuration.py for a list of all supported configuration parameters.
179183
configuration = openapi_client.Configuration(
@@ -202,6 +206,7 @@ with openapi_client.ApiClient(configuration) as api_client:
202206
print("Exception when calling PetApi->find_pets_by_status: %s\n" % e)
203207
```
204208

209+
205210
### Parameters
206211

207212
Name | Type | Description | Notes
@@ -240,12 +245,13 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
240245

241246
* OAuth Authentication (petstore_auth):
242247
```python
243-
from __future__ import print_function
244248
import time
245249
import os
246250
import openapi_client
251+
from openapi_client.models.pet import Pet
247252
from openapi_client.rest import ApiException
248253
from pprint import pprint
254+
249255
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
250256
# See configuration.py for a list of all supported configuration parameters.
251257
configuration = openapi_client.Configuration(
@@ -274,6 +280,7 @@ with openapi_client.ApiClient(configuration) as api_client:
274280
print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e)
275281
```
276282

283+
277284
### Parameters
278285

279286
Name | Type | Description | Notes
@@ -312,12 +319,13 @@ Returns a single pet
312319

313320
* Api Key Authentication (api_key):
314321
```python
315-
from __future__ import print_function
316322
import time
317323
import os
318324
import openapi_client
325+
from openapi_client.models.pet import Pet
319326
from openapi_client.rest import ApiException
320327
from pprint import pprint
328+
321329
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
322330
# See configuration.py for a list of all supported configuration parameters.
323331
configuration = openapi_client.Configuration(
@@ -350,6 +358,7 @@ with openapi_client.ApiClient(configuration) as api_client:
350358
print("Exception when calling PetApi->get_pet_by_id: %s\n" % e)
351359
```
352360

361+
353362
### Parameters
354363

355364
Name | Type | Description | Notes
@@ -389,12 +398,13 @@ Update an existing pet
389398

390399
* OAuth Authentication (petstore_auth):
391400
```python
392-
from __future__ import print_function
393401
import time
394402
import os
395403
import openapi_client
404+
from openapi_client.models.pet import Pet
396405
from openapi_client.rest import ApiException
397406
from pprint import pprint
407+
398408
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
399409
# See configuration.py for a list of all supported configuration parameters.
400410
configuration = openapi_client.Configuration(
@@ -423,6 +433,7 @@ with openapi_client.ApiClient(configuration) as api_client:
423433
print("Exception when calling PetApi->update_pet: %s\n" % e)
424434
```
425435

436+
426437
### Parameters
427438

428439
Name | Type | Description | Notes
@@ -463,12 +474,12 @@ Updates a pet in the store with form data
463474

464475
* OAuth Authentication (petstore_auth):
465476
```python
466-
from __future__ import print_function
467477
import time
468478
import os
469479
import openapi_client
470480
from openapi_client.rest import ApiException
471481
from pprint import pprint
482+
472483
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
473484
# See configuration.py for a list of all supported configuration parameters.
474485
configuration = openapi_client.Configuration(
@@ -497,6 +508,7 @@ with openapi_client.ApiClient(configuration) as api_client:
497508
print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
498509
```
499510

511+
500512
### Parameters
501513

502514
Name | Type | Description | Notes
@@ -536,12 +548,13 @@ uploads an image
536548

537549
* OAuth Authentication (petstore_auth):
538550
```python
539-
from __future__ import print_function
540551
import time
541552
import os
542553
import openapi_client
554+
from openapi_client.models.api_response import ApiResponse
543555
from openapi_client.rest import ApiException
544556
from pprint import pprint
557+
545558
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
546559
# See configuration.py for a list of all supported configuration parameters.
547560
configuration = openapi_client.Configuration(
@@ -561,7 +574,7 @@ with openapi_client.ApiClient(configuration) as api_client:
561574
api_instance = openapi_client.PetApi(api_client)
562575
pet_id = 56 # int | ID of pet to update
563576
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
564-
file = openapi_client.bytearray() # bytearray | file to upload (optional)
577+
file = None # bytearray | file to upload (optional)
565578

566579
try:
567580
# uploads an image
@@ -572,6 +585,7 @@ with openapi_client.ApiClient(configuration) as api_client:
572585
print("Exception when calling PetApi->upload_file: %s\n" % e)
573586
```
574587

588+
575589
### Parameters
576590

577591
Name | Type | Description | Notes

petstore/openapi_generator_python_nextgen/docs/StoreApi.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
2020
### Example
2121

2222
```python
23-
from __future__ import print_function
2423
import time
2524
import os
2625
import openapi_client
2726
from openapi_client.rest import ApiException
2827
from pprint import pprint
28+
2929
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
3030
# See configuration.py for a list of all supported configuration parameters.
3131
configuration = openapi_client.Configuration(
@@ -46,6 +46,7 @@ with openapi_client.ApiClient(configuration) as api_client:
4646
print("Exception when calling StoreApi->delete_order: %s\n" % e)
4747
```
4848

49+
4950
### Parameters
5051

5152
Name | Type | Description | Notes
@@ -84,12 +85,12 @@ Returns a map of status codes to quantities
8485

8586
* Api Key Authentication (api_key):
8687
```python
87-
from __future__ import print_function
8888
import time
8989
import os
9090
import openapi_client
9191
from openapi_client.rest import ApiException
9292
from pprint import pprint
93+
9394
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
9495
# See configuration.py for a list of all supported configuration parameters.
9596
configuration = openapi_client.Configuration(
@@ -121,6 +122,7 @@ with openapi_client.ApiClient(configuration) as api_client:
121122
print("Exception when calling StoreApi->get_inventory: %s\n" % e)
122123
```
123124

125+
124126
### Parameters
125127
This endpoint does not need any parameter.
126128

@@ -154,12 +156,13 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
154156
### Example
155157

156158
```python
157-
from __future__ import print_function
158159
import time
159160
import os
160161
import openapi_client
162+
from openapi_client.models.order import Order
161163
from openapi_client.rest import ApiException
162164
from pprint import pprint
165+
163166
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
164167
# See configuration.py for a list of all supported configuration parameters.
165168
configuration = openapi_client.Configuration(
@@ -182,6 +185,7 @@ with openapi_client.ApiClient(configuration) as api_client:
182185
print("Exception when calling StoreApi->get_order_by_id: %s\n" % e)
183186
```
184187

188+
185189
### Parameters
186190

187191
Name | Type | Description | Notes
@@ -220,12 +224,13 @@ Place an order for a pet
220224
### Example
221225

222226
```python
223-
from __future__ import print_function
224227
import time
225228
import os
226229
import openapi_client
230+
from openapi_client.models.order import Order
227231
from openapi_client.rest import ApiException
228232
from pprint import pprint
233+
229234
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
230235
# See configuration.py for a list of all supported configuration parameters.
231236
configuration = openapi_client.Configuration(
@@ -248,6 +253,7 @@ with openapi_client.ApiClient(configuration) as api_client:
248253
print("Exception when calling StoreApi->place_order: %s\n" % e)
249254
```
250255

256+
251257
### Parameters
252258

253259
Name | Type | Description | Notes

0 commit comments

Comments
 (0)