rizTaak
rizTaak

Reputation: 188

Which endpointscfg.py to use?

I am currently using google-cloud-sdk and it contains three endpointscfg.py

  1. google-cloud-sdk/bin/endpointscfg.py
  2. google-cloud-sdk/platform/google_appengine/endpointscfg.py
  3. google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py

which version I should use to generate open api spec?

Using the first one gives an error: google-cloud-sdk/platform/google_appengine/endpointscfg.py: error: argument {get_client_lib, get_discovery_doc}: invalid choice: 'get_openapi_spec' (choose from 'get_client_lib', 'get_discovery_doc')

Using second gives error: google-cloud-sdk/platform/google_appengine/endpointscfg.py: error: argument {get_client_lib, get_discovery_doc}: invalid choice: 'get_openapi_spec' (choose from 'get_client_lib', 'get_discovery_doc')

Using third one gives error: Traceback (most recent call last): File "google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 65, in from endpoints import api_config ImportError: No module named endpoints

I am trying to follow

https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python#endpoints_configure

to generate open api spec for my own api

Upvotes: 1

Views: 165

Answers (1)

saiyr
saiyr

Reputation: 2595

Use the one included in the new google-endpoints package. If you follow the instructions in that tutorial, it would be lib/endpoints/endpointscfg.py where lib is inside your app directory.

Upvotes: 1

Related Questions