client generation fails on a schema of type "string"
- Dominant language
- Python
- Stars
- 157
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
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')
```
Contributor guide
Assessment
This issue has not been assessed yet.