Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Problems with example script in README.md #52

Open
iawells opened this issue Oct 25, 2023 · 4 comments
Open

Problems with example script in README.md #52

iawells opened this issue Oct 25, 2023 · 4 comments

Comments

@iawells
Copy link

iawells commented Oct 25, 2023

I can't push this because I haven't got the rights, but this appears to do the trick:

Author: Ian Wells <[email protected]>
Date:   Tue Oct 24 17:24:46 2023 -0700

    Fix test script within README.md

    It has a Python complaint and is not passing a required parameter
    to the API it uses as an example.

diff --git a/equinix_metal/README.md b/equinix_metal/README.md
index 39a484e..ea43399 100644
--- a/equinix_metal/README.md
+++ b/equinix_metal/README.md
@@ -130,7 +130,7 @@ Execute `pytest` to run the tests.
 Please follow the [installation procedure](#installation--usage) and then run the following:

-
+import os
 import time
 import equinix_metal
 from equinix_metal.rest import ApiException
@@ -158,7 +158,7 @@ configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
 with equinix_metal.ApiClient(configuration) as api_client:
     # Create an instance of the API class
     api_instance = equinix_metal.AuthenticationApi(api_client)
-    auth_token_input = equinix_metal.AuthTokenInput() # AuthTokenInput | API key to create
+    auth_token_input = equinix_metal.AuthTokenInput(description='API key from test script') # AuthTokenInput | API key to create
     include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)

     try:
@t0mk
Copy link
Contributor

t0mk commented Oct 25, 2023

hi @iawells, thanks for checking out the client and thanks for your fix. Nobody can push to main, we have PR review policy. Can you do a simple pull-request? I promise that I'll test and review promptly.

If I'd dio the PR, we'll need someone third (with contrib access to this repo) to do the review.

@t0mk
Copy link
Contributor

t0mk commented Nov 7, 2023

@iawells this is actually generated code, we'll check with the openapi generator upstream.

@iawells
Copy link
Author

iawells commented Nov 15, 2023

I don't think the example is generated code, is it? (The thing it calls certainly is, and is generated to a spec that requires a description.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants