Basic structure of schema parsing complete.
* Note that additionalProperties fields are not currently supported and may only be accessed in raw form. Shouldn't be a big deal because only the Buzz API uses them extensively.
This commit is contained in:
1 parent
d9a108415b
commit
27ae32d2e7
3 files changed
+145
-100
No files matched your search
@@ -62,7 +62,10 @@ module Google
|
||||
#
|
||||
# @return [String] The service id.
|
||||
def id
|
||||
return @discovery_document['id']
|
||||
return (
|
||||
@discovery_document['id'] ||
|
||||
"#{self.name}:#{self.version}"
|
||||
)
|
||||
end
|
||||
|
||||
##
|
||||
@@ -160,9 +163,7 @@ module Google
|
||||
def schemas
|
||||
return @schemas ||= (
|
||||
(@discovery_document['schemas'] || []).inject({}) do |accu, (k, v)|
|
||||
accu[k] = Google::APIClient::Schema.new(
|
||||
self, self.name, self.version, v
|
||||
)
|
||||
accu[k] = Google::APIClient::Schema.parse(self, v)
|
||||
accu
|
||||
end
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user