Module: Kumonos::Schemas
- Defined in:
- lib/kumonos/schemas.rb
Overview
Schemas
Constant Summary collapse
- ROOT =
Pathname.new(File.('../schemas', __dir__))
- ENVOY_SCHEMA_PATH =
ROOT.join('envoy.json')
- SERVIVE_DEFINITION_PATH =
ROOT.join('service_definition.json')
Class Method Summary collapse
Class Method Details
.validate_envoy_definition(hash) ⇒ Object
14 15 16 17 |
# File 'lib/kumonos/schemas.rb', line 14 def validate_envoy_definition(hash) schema = load_schema(ENVOY_SCHEMA_PATH) JSON::Validator.fully_validate(schema, hash) end |
.validate_service_definition(hash) ⇒ Object
19 20 21 22 |
# File 'lib/kumonos/schemas.rb', line 19 def validate_service_definition(hash) schema = load_schema(SERVIVE_DEFINITION_PATH) JSON::Validator.fully_validate(schema, hash) end |