-
Notifications
You must be signed in to change notification settings - Fork 2
Developers notes
Piotr Kosiński edited this page Aug 31, 2021
·
2 revisions
Client generation steps (assumes ../dsb) is cloned https://github.com/energywebfoundation/dsb repository
Install generator
npm install @openapitools/openapi-generator-cli -g
- Generate client
openapi-generator-cli generate -i ../dsb/specs/schema.yaml -o ./ -g python --package-name dsb_client --additional-properties=packageVersion=<VERSION> --git-repo-id "dsb-client-python" --git-user-id "energywebfoundation"
Specify packageVersion according to SemVer rules.
-
git checkout requirements.txt -
Make sure
setup.pyREQUIRES = [ ] section corresponds to requirements.txt file -
Retain README.md file first section
-
Find and replace
Find 👇
configuration = dsb_client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): access-token
configuration = dsb_client.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
Replace with 👇
configuration = dsb_client.Configuration(
host = "http://localhost",
access_token = 'YOUR_BEARER_TOKEN'
)