Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client generation fails on a schema of type "string" #201

Open
etrottier opened this issue Feb 5, 2018 · 0 comments
Open

client generation fails on a schema of type "string" #201

etrottier opened this issue Feb 5, 2018 · 0 comments

Comments

@etrottier
Copy link

etrottier commented Feb 5, 2018

the BigQuery API had a discovery doc which contained the following (more or less):

{
  "schemas": {
    "JobReference": {
      "id": "JobReference",
      "type": "object",
      "properties": {
        "location": {
          "$ref": "Location"
        }
      }
    },
    "Location": {
      "id": "Location",
      "type": "string"
    }
  }
}

and it seems that apitools doesn't like a schema that's just a string:

Traceback (most recent call last):
  File "apitools/gen/gen_client.py", line 347, in main
    return args.func(args) or 0
  File "apitools/gen/gen_client.py", line 160, in GenerateClient
    codegen = _GetCodegenFromFlags(args)
  File "apitools/gen/gen_client.py", line 105, in _GetCodegenFromFlags
    apitools_version=args.apitools_version)
  File "apitools/gen/gen_client_lib.py", line 95, in __init__
    schema_name, schema)
  File "apitools/gen/message_registry.py", line 266, in AddDescriptorFromSchema
    schema.get('type'))
ValueError: ('Cannot create message descriptors for type %s', u'string')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant