Skip to content

Commit 0afd6af

Browse files
committed
Bump package version to 1.0.4 and update action descriptions in response models
1 parent 5a032b9 commit 0afd6af

24 files changed

+58
-86
lines changed

.github/workflows/python-publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,25 @@ jobs:
3737
with:
3838
name: release-dists
3939
path: dist/
40+
4041
pypi-publish:
4142
runs-on: ubuntu-latest
4243
needs:
4344
- release-build
45+
permissions:
46+
# IMPORTANT: this permission is mandatory for trusted publishing
47+
id-token: write
48+
49+
# Dedicated environments with protections for publishing are strongly recommended.
50+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
51+
environment:
52+
name: pypi
53+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54+
# url: https://pypi.org/p/YOURPROJECT
55+
#
56+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57+
# ALTERNATIVE: exactly, uncomment the following line instead:
58+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
4459

4560
steps:
4661
- name: Retrieve release distributions
@@ -52,6 +67,4 @@ jobs:
5267
- name: Publish release distributions to PyPI
5368
uses: pypa/gh-action-pypi-publish@release/v1
5469
with:
55-
user: __token__
56-
password: ${{ secrets.PYPI_API_TOKEN }}
5770
packages-dir: dist/

.openapi-generator/FILES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.github/workflows/python.yml
22
.gitignore
33
.gitlab-ci.yml
4+
.openapi-generator-ignore
45
.travis.yml
56
README.md
67
docs/AddClientResponse.md
@@ -17,6 +18,13 @@ setup.cfg
1718
setup.py
1819
test-requirements.txt
1920
test/__init__.py
21+
test/test_add_client_response.py
22+
test/test_add_order_response.py
23+
test/test_default_api.py
24+
test/test_update_client_response.py
25+
test/test_whmcs_base_response.py
26+
test/test_whmcs_error_response.py
27+
test/test_whmcs_success_response.py
2028
tox.ini
2129
whmcs_client/__init__.py
2230
whmcs_client/api/__init__.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ All requests are sent as form-encoded data to the /api.php endpoint.
1212
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1313

1414
- API version: 1.0.0
15-
- Package version: 1.0.3
15+
- Package version: 1.0.4
1616
- Generator version: 7.13.0
1717
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1818

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"packageName": "whmcs_client",
33
"projectName": "whmcs-api-client",
4-
"packageVersion": "1.0.3",
4+
"packageVersion": "1.0.4",
55
"packageUrl": "https://github.com/truehostcloud/whmcs-python-client",
66
"packageCompany": "Truehost",
77
"packageAuthor": "William Mwai",

docs/AddClientResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | The result of the operation |
9-
**action** | **str** | Always 'AddClient' for AddClient responses |
9+
**action** | **str** | The action that was performed |
1010
**warnings** | **List[str]** | Any warning messages | [optional]
1111
**message** | **str** | Success or error message | [optional]
1212
**clientid** | **str** | The ID of the newly created client | [optional]

docs/AddOrderResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | The result of the operation |
9-
**action** | **str** | Always 'AddOrder' for AddOrder responses |
9+
**action** | **str** | The action that was performed |
1010
**warnings** | **List[str]** | Any warning messages | [optional]
1111
**message** | **str** | Success or error message | [optional]
1212
**orderid** | **str** | The Order ID for the created order | [optional]

docs/DefaultApi.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Execute WHMCS API action
1515
Executes a WHMCS API action. The specific action is determined by the 'action' field
1616
in the request body. Different actions have different required and optional parameters.
1717

18-
Authentication credentials (username/password or API key) must be included in every request.
19-
2018

2119
### Example
2220

docs/UpdateClientResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | The result of the operation |
9-
**action** | **str** | Always 'UpdateClient' for UpdateClient responses |
9+
**action** | **str** | The action that was performed |
1010
**warnings** | **List[str]** | Any warning messages | [optional]
1111
**message** | **str** | Success or error message | [optional]
1212
**clientid** | **str** | The ID of the updated client | [optional]

docs/WHMCSSuccessResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**result** | **str** | The result of the operation |
9-
**action** | **str** | Always 'AddOrder' for AddOrder responses |
9+
**action** | **str** | The action that was performed |
1010
**warnings** | **List[str]** | Any warning messages | [optional]
1111
**message** | **str** | Success or error message | [optional]
1212
**clientid** | **str** | The ID of the updated client | [optional]

openapi.yaml

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,22 @@ paths:
2323
description: |
2424
Executes a WHMCS API action. The specific action is determined by the 'action' field
2525
in the request body. Different actions have different required and optional parameters.
26-
27-
Authentication credentials (username/password or API key) must be included in every request.
2826
operationId: api_post
2927
requestBody:
3028
required: true
3129
content:
3230
application/x-www-form-urlencoded:
3331
schema:
34-
$ref: '#/components/schemas/RequestBody'
32+
oneOf:
33+
- $ref: '#/components/schemas/AddClientRequest'
34+
- $ref: '#/components/schemas/UpdateClientRequest'
35+
- $ref: '#/components/schemas/AddOrderRequest'
36+
discriminator:
37+
propertyName: action
38+
mapping:
39+
AddClient: '#/components/schemas/AddClientRequest'
40+
UpdateClient: '#/components/schemas/UpdateClientRequest'
41+
AddOrder: '#/components/schemas/AddOrderRequest'
3542
responses:
3643
'200':
3744
description: Successful response
@@ -568,22 +575,12 @@ components:
568575
- $ref: '#/components/schemas/AddClientResponse'
569576
- $ref: '#/components/schemas/UpdateClientResponse'
570577
- $ref: '#/components/schemas/AddOrderResponse'
571-
discriminator:
572-
propertyName: action
573-
mapping:
574-
AddClient: '#/components/schemas/AddClientResponse'
575-
UpdateClient: '#/components/schemas/UpdateClientResponse'
576-
AddOrder: '#/components/schemas/AddOrderResponse'
577578

578579
AddClientResponse:
579580
allOf:
580581
- $ref: '#/components/schemas/WHMCSBaseResponse'
581582
- type: object
582583
properties:
583-
action:
584-
type: string
585-
enum: [AddClient]
586-
description: Always 'AddClient' for AddClient responses
587584
clientid:
588585
type: string
589586
description: The ID of the newly created client
@@ -593,10 +590,6 @@ components:
593590
- $ref: '#/components/schemas/WHMCSBaseResponse'
594591
- type: object
595592
properties:
596-
action:
597-
type: string
598-
enum: [UpdateClient]
599-
description: Always 'UpdateClient' for UpdateClient responses
600593
clientid:
601594
type: string
602595
description: The ID of the updated client
@@ -606,10 +599,6 @@ components:
606599
- $ref: '#/components/schemas/WHMCSBaseResponse'
607600
- type: object
608601
properties:
609-
action:
610-
type: string
611-
enum: [AddOrder]
612-
description: Always 'AddOrder' for AddOrder responses
613602
orderid:
614603
type: string
615604
description: The Order ID for the created order
@@ -640,15 +629,3 @@ components:
640629
type: string
641630
description: Error message describing what went wrong
642631
example: "Authentication Failed"
643-
644-
RequestBody:
645-
oneOf:
646-
- $ref: '#/components/schemas/AddClientRequest'
647-
- $ref: '#/components/schemas/UpdateClientRequest'
648-
- $ref: '#/components/schemas/AddOrderRequest'
649-
discriminator:
650-
propertyName: action
651-
mapping:
652-
AddClient: '#/components/schemas/AddClientRequest'
653-
UpdateClient: '#/components/schemas/UpdateClientRequest'
654-
AddOrder: '#/components/schemas/AddOrderRequest'

0 commit comments

Comments
 (0)