Skip to content

Sample regen #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ via vscode code counter tool

| Generator | Files | Code |
| -------- | ----- | ---- |
| openapi_generator_python_nextgen | 27 | 2712 |
| openapi_generator_python_nextgen | 28 | 2781 |
| openapi_generator_python_prior | 30 | 5075 |
| openapi_json_schema_generator_python | 365 | 9527
| openapi_json_schema_generator_python | 365 | 9256


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

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

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

docker run --rm -v "${PWD}:/local" openapijsonschematools/openapi-json-schema-generator-cli:3.0.0-latest generate \
-i /local/petstore.yaml \
-g python \
-o /local/openapi_json_schema_generator_python
-o /local/openapi_json_schema_generator_python
/Users/justinblack/programming/openapi-python-client-comparison/petstore/openapi_generator_python_prior/
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ openapi_client/api/pet_api.py
openapi_client/api/store_api.py
openapi_client/api/user_api.py
openapi_client/api_client.py
openapi_client/api_response.py
openapi_client/configuration.py
openapi_client/exceptions.py
openapi_client/models/__init__.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
6.6.0-SNAPSHOT
10 changes: 6 additions & 4 deletions petstore/openapi_generator_python_nextgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Execute `pytest` to run the tests.
Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function

import time
import openapi_client
Expand Down Expand Up @@ -124,10 +123,13 @@ Class | Method | HTTP request | Description
- [User](docs/User.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


## petstore_auth
Authentication schemes defined for the API:
<a id="petstore_auth"></a>
### petstore_auth

- **Type**: OAuth
- **Flow**: implicit
Expand All @@ -136,8 +138,8 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets


## api_key
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: api_key
Expand Down
32 changes: 23 additions & 9 deletions petstore/openapi_generator_python_nextgen/docs/PetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ Add a new pet to the store

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -59,6 +60,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->add_pet: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -97,12 +99,12 @@ Deletes a pet

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -130,6 +132,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->delete_pet: %s\n" % e)
```


### Parameters

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

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -202,6 +206,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->find_pets_by_status: %s\n" % e)
```


### Parameters

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

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -274,6 +280,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -312,12 +319,13 @@ Returns a single pet

* Api Key Authentication (api_key):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -350,6 +358,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->get_pet_by_id: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -389,12 +398,13 @@ Update an existing pet

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -423,6 +433,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->update_pet: %s\n" % e)
```


### Parameters

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

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -497,6 +508,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -536,12 +548,13 @@ uploads an image

* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.api_response import ApiResponse
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand All @@ -561,7 +574,7 @@ with openapi_client.ApiClient(configuration) as api_client:
api_instance = openapi_client.PetApi(api_client)
pet_id = 56 # int | ID of pet to update
additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional)
file = openapi_client.bytearray() # bytearray | file to upload (optional)
file = None # bytearray | file to upload (optional)

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


### Parameters

Name | Type | Description | Notes
Expand Down
14 changes: 10 additions & 4 deletions petstore/openapi_generator_python_nextgen/docs/StoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example

```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand All @@ -46,6 +46,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling StoreApi->delete_order: %s\n" % e)
```


### Parameters

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

* Api Key Authentication (api_key):
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand Down Expand Up @@ -121,6 +122,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling StoreApi->get_inventory: %s\n" % e)
```


### Parameters
This endpoint does not need any parameter.

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

```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.order import Order
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand All @@ -182,6 +185,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling StoreApi->get_order_by_id: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down Expand Up @@ -220,12 +224,13 @@ Place an order for a pet
### Example

```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.order import Order
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
Expand All @@ -248,6 +253,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling StoreApi->place_order: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
Expand Down
Loading