Module: Tamara::JsonSchemas::Types::Uuid
- Included in:
- Orders::Authorize, Orders::Details::TamaraOrder
- Defined in:
- lib/tamara/json_schemas/types/uuid.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.schema(allows_null: false) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/tamara/json_schemas/types/uuid.rb', line 5 def self.schema(allows_null: false) { "$schema": "http://json-schema.org/draft-06/schema", type: ["string", (allows_null ? "null" : nil)].compact, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" } end |
Instance Method Details
#schema ⇒ Object
13 14 15 |
# File 'lib/tamara/json_schemas/types/uuid.rb', line 13 def schema Tamara::JsonSchemas::Types::Uuid.schema end |