Skip to content

Commit

Permalink
Rename bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
JungleCatSW committed Dec 18, 2023
1 parent 75c6980 commit 809fa68
Show file tree
Hide file tree
Showing 35 changed files with 397 additions and 361 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/workflow-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Gen Swagger File
run: python3 tools/swaggerfix.py
- name: Run Swagger Codegen
uses: ./.github/actions/swagger-codegen
with:
output: out
input: swagger/public.swagger.json
input: fix.swagger.json
action: generate
- name: Copy files
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Gen Swagger File
run: python3 tools/swaggerfix.py
- name: Run Swagger Codegen
uses: ./.github/actions/swagger-codegen
with:
output: out
input: swagger/public.swagger.json
input: fix.swagger.json
action: generate
- name: Copy files
run: |
Expand Down
7 changes: 5 additions & 2 deletions codegen.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
python3 tools/swaggerfix.py

rm -rf src
rm -rf swagger-codegen
git clone https://github.com/swagger-api/swagger-codegen
cp swagger/public.swagger.json swagger-codegen
mv fix.swagger.json swagger-codegen

cd swagger-codegen
./run-in-docker.sh mvn package
./run-in-docker.sh generate -i public.swagger.json \
./run-in-docker.sh generate -i fix.swagger.json \
-l python -o /gen/out -DpackageName=src.cudo_compute
cd ..
cp swagger-codegen/out/README.md docs
Expand Down
26 changes: 13 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [ActivateBody](docs/ActivateBody.md)
- [AddBillingAccountUserPermissionBody](docs/AddBillingAccountUserPermissionBody.md)
- [AddDataCenterUserPermissionBody](docs/AddDataCenterUserPermissionBody.md)
- [AddProjectUserPermissionBody](docs/AddProjectUserPermissionBody.md)
- [Any](docs/Any.md)
- [ApiKey](docs/ApiKey.md)
- [AttachSecurityGroupResponse](docs/AttachSecurityGroupResponse.md)
Expand All @@ -189,30 +193,22 @@ Class | Method | HTTP request | Description
- [BillingAccountPaymentMethods](docs/BillingAccountPaymentMethods.md)
- [BillingAccountSetupIntent](docs/BillingAccountSetupIntent.md)
- [BillingAccountSpendRow](docs/BillingAccountSpendRow.md)
- [Body](docs/Body.md)
- [Body1](docs/Body1.md)
- [Body10](docs/Body10.md)
- [Body11](docs/Body11.md)
- [Body12](docs/Body12.md)
- [Body2](docs/Body2.md)
- [Body3](docs/Body3.md)
- [Body4](docs/Body4.md)
- [Body5](docs/Body5.md)
- [Body6](docs/Body6.md)
- [Body7](docs/Body7.md)
- [Body8](docs/Body8.md)
- [Body9](docs/Body9.md)
- [Cluster](docs/Cluster.md)
- [ConnectVMResponse](docs/ConnectVMResponse.md)
- [CountHostsResponse](docs/CountHostsResponse.md)
- [CountVMsResponse](docs/CountVMsResponse.md)
- [CpuModelCategory](docs/CpuModelCategory.md)
- [CreateBillingAccountRequest](docs/CreateBillingAccountRequest.md)
- [CreateDiskSnapshotBody](docs/CreateDiskSnapshotBody.md)
- [CreateDiskSnapshotResponse](docs/CreateDiskSnapshotResponse.md)
- [CreateNetworkBody](docs/CreateNetworkBody.md)
- [CreateNetworkResponse](docs/CreateNetworkResponse.md)
- [CreateObjectStorageUserBody](docs/CreateObjectStorageUserBody.md)
- [CreatePrivateVMImageResponse](docs/CreatePrivateVMImageResponse.md)
- [CreateSecurityGroupResponse](docs/CreateSecurityGroupResponse.md)
- [CreateStorageDiskBody](docs/CreateStorageDiskBody.md)
- [CreateStorageDiskResponse](docs/CreateStorageDiskResponse.md)
- [CreateVMBody](docs/CreateVMBody.md)
- [CreateVMRequestNIC](docs/CreateVMRequestNIC.md)
- [CreateVMResponse](docs/CreateVMResponse.md)
- [DataCenter](docs/DataCenter.md)
Expand Down Expand Up @@ -300,6 +296,9 @@ Class | Method | HTTP request | Description
- [RebootVMResponse](docs/RebootVMResponse.md)
- [Region](docs/Region.md)
- [RemoveBillingAccountPaymentMethodResponse](docs/RemoveBillingAccountPaymentMethodResponse.md)
- [RemoveBillingAccountUserPermissionBody](docs/RemoveBillingAccountUserPermissionBody.md)
- [RemoveDataCenterUserPermissionBody](docs/RemoveDataCenterUserPermissionBody.md)
- [RemoveProjectUserPermissionBody](docs/RemoveProjectUserPermissionBody.md)
- [ResizeVMDiskResponse](docs/ResizeVMDiskResponse.md)
- [ResizeVMResponse](docs/ResizeVMResponse.md)
- [RevertDiskResponse](docs/RevertDiskResponse.md)
Expand All @@ -322,6 +321,7 @@ Class | Method | HTTP request | Description
- [TaxId](docs/TaxId.md)
- [TerminateVMResponse](docs/TerminateVMResponse.md)
- [Unit](docs/Unit.md)
- [UpdateBillingAccountBody](docs/UpdateBillingAccountBody.md)
- [UpdatePrivateVMImageResponse](docs/UpdatePrivateVMImageResponse.md)
- [UpdateSecurityGroupResponse](docs/UpdateSecurityGroupResponse.md)
- [UpdateVMMetadataResponse](docs/UpdateVMMetadataResponse.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/APIKeysApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **generate_api_key**
> ApiKey generate_api_key(body)
> ApiKey generate_api_key(generate_api_key_body)
Generate

Expand All @@ -74,11 +74,11 @@ from pprint import pprint

# create an instance of the API class
api_instance = src.cudo_compute.APIKeysApi()
body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest |
generate_api_key_body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest |

try:
# Generate
api_response = api_instance.generate_api_key(body)
api_response = api_instance.generate_api_key(generate_api_key_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIKeysApi->generate_api_key: %s\n" % e)
Expand All @@ -88,7 +88,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| |
**generate_api_key_body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Body9.md → docs/docs/ActivateBody.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body9
# ActivateBody

## Properties
Name | Type | Description | Notes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body1
# AddBillingAccountUserPermissionBody

## Properties
Name | Type | Description | Notes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body3
# AddDataCenterUserPermissionBody

## Properties
Name | Type | Description | Notes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body5
# AddProjectUserPermissionBody

## Properties
Name | Type | Description | Notes
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/BillingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Method | HTTP request | Description


# **create_billing_account**
> BillingAccount create_billing_account(body)
> BillingAccount create_billing_account(create_billing_account_body)
Create a billing account

Expand All @@ -34,11 +34,11 @@ from pprint import pprint

# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest |
create_billing_account_body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest |

try:
# Create a billing account
api_response = api_instance.create_billing_account(body)
api_response = api_instance.create_billing_account(create_billing_account_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->create_billing_account: %s\n" % e)
Expand All @@ -48,7 +48,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**CreateBillingAccountRequest**](CreateBillingAccountRequest.md)| |
**create_billing_account_body** | [**CreateBillingAccountRequest**](CreateBillingAccountRequest.md)| |

### Return type

Expand Down Expand Up @@ -584,7 +584,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **update_billing_account**
> BillingAccount update_billing_account(billing_account_id, body)
> BillingAccount update_billing_account(billing_account_id, update_billing_account_body)
Update billing account

Expand All @@ -599,11 +599,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
billing_account_id = 'billing_account_id_example' # str |
body = src.cudo_compute.Body() # Body |
update_billing_account_body = src.cudo_compute.UpdateBillingAccountBody() # UpdateBillingAccountBody |

try:
# Update billing account
api_response = api_instance.update_billing_account(billing_account_id, body)
api_response = api_instance.update_billing_account(billing_account_id, update_billing_account_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->update_billing_account: %s\n" % e)
Expand All @@ -614,7 +614,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**billing_account_id** | **str**| |
**body** | [**Body**](Body.md)| |
**update_billing_account_body** | [**UpdateBillingAccountBody**](UpdateBillingAccountBody.md)| |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Body7.md → docs/docs/CreateDiskSnapshotBody.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body7
# CreateDiskSnapshotBody

## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Body8.md → docs/docs/CreateNetworkBody.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body8
# CreateNetworkBody

## Properties
Name | Type | Description | Notes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body10
# CreateObjectStorageUserBody

## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Body6.md → docs/docs/CreateStorageDiskBody.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body6
# CreateStorageDiskBody

## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Body12.md → docs/docs/CreateVMBody.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Body12
# CreateVMBody

## Properties
Name | Type | Description | Notes
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/DisksApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **create_disk_snapshot**
> CreateDiskSnapshotResponse create_disk_snapshot(project_id, id, body)
> CreateDiskSnapshotResponse create_disk_snapshot(project_id, id, create_disk_snapshot_body)
Create Disk Snapshot

Expand All @@ -83,11 +83,11 @@ from pprint import pprint
api_instance = src.cudo_compute.DisksApi()
project_id = 'project_id_example' # str |
id = 'id_example' # str |
body = src.cudo_compute.Body7() # Body7 |
create_disk_snapshot_body = src.cudo_compute.CreateDiskSnapshotBody() # CreateDiskSnapshotBody |

try:
# Create Disk Snapshot
api_response = api_instance.create_disk_snapshot(project_id, id, body)
api_response = api_instance.create_disk_snapshot(project_id, id, create_disk_snapshot_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DisksApi->create_disk_snapshot: %s\n" % e)
Expand All @@ -99,7 +99,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **str**| |
**id** | **str**| |
**body** | [**Body7**](Body7.md)| |
**create_disk_snapshot_body** | [**CreateDiskSnapshotBody**](CreateDiskSnapshotBody.md)| |

### Return type

Expand All @@ -117,7 +117,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **create_storage_disk**
> CreateStorageDiskResponse create_storage_disk(project_id, body)
> CreateStorageDiskResponse create_storage_disk(project_id, create_storage_disk_body)
Create storage disk

Expand All @@ -132,11 +132,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.DisksApi()
project_id = 'project_id_example' # str |
body = src.cudo_compute.Body6() # Body6 |
create_storage_disk_body = src.cudo_compute.CreateStorageDiskBody() # CreateStorageDiskBody |

try:
# Create storage disk
api_response = api_instance.create_storage_disk(project_id, body)
api_response = api_instance.create_storage_disk(project_id, create_storage_disk_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DisksApi->create_storage_disk: %s\n" % e)
Expand All @@ -147,7 +147,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **str**| |
**body** | [**Body6**](Body6.md)| |
**create_storage_disk_body** | [**CreateStorageDiskBody**](CreateStorageDiskBody.md)| |

### Return type

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/NetworksApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Method | HTTP request | Description


# **create_network**
> CreateNetworkResponse create_network(project_id, body)
> CreateNetworkResponse create_network(project_id, create_network_body)
Create network

Expand All @@ -33,11 +33,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.NetworksApi()
project_id = 'project_id_example' # str |
body = src.cudo_compute.Body8() # Body8 |
create_network_body = src.cudo_compute.CreateNetworkBody() # CreateNetworkBody |

try:
# Create network
api_response = api_instance.create_network(project_id, body)
api_response = api_instance.create_network(project_id, create_network_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling NetworksApi->create_network: %s\n" % e)
Expand All @@ -48,7 +48,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **str**| |
**body** | [**Body8**](Body8.md)| |
**create_network_body** | [**CreateNetworkBody**](CreateNetworkBody.md)| |

### Return type

Expand Down
Loading

0 comments on commit 809fa68

Please sign in to comment.