Class: Google::Apis::DiscoveryV1::RestDescription
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryV1::RestDescription
- Defined in:
- lib/discovery_v1/google_extensions/rest_description.rb
Overview
Extensions to the Google::Apis::DiscoveryV1::RestDescription class
Instance Method Summary collapse
-
#object_schema_names(logger: Logger.new(nil)) ⇒ Array<String>
List the names of the schemas available to use in the Google Discovery V1 API.
-
#validate_object(schema_name:, object:, logger: Logger.new(nil))
Validate the object using the named JSON schema.
Instance Method Details
#object_schema_names(logger: Logger.new(nil)) ⇒ Array<String>
List the names of the schemas available to use in the Google Discovery V1 API
62 63 64 |
# File 'lib/discovery_v1/google_extensions/rest_description.rb', line 62 def object_schema_names(logger: Logger.new(nil)) ::DiscoveryV1::Validation::LoadSchemas.new(rest_description: self, logger:).call.keys.sort end |
#validate_object(schema_name:, object:, logger: Logger.new(nil))
This method returns an undefined value.
Validate the object using the named JSON schema
The JSON schemas are loaded from the Google Disocvery API. The schemas names are
returned by DiscoveryV1.api_object_schema_names
.
48 49 50 |
# File 'lib/discovery_v1/google_extensions/rest_description.rb', line 48 def validate_object(schema_name:, object:, logger: Logger.new(nil)) ::DiscoveryV1::Validation::ValidateObject.new(rest_description: self, logger:).call(schema_name:, object:) end |