lib/prmd/commands/expand.rb in prmd-0.0.1 vs lib/prmd/commands/expand.rb in prmd-0.1.0
- old
+ new
@@ -37,28 +37,23 @@
original['definitions'].each do |key, value|
default = case value['format']
when 'uuid'
{
'example' => '01234567-89ab-cdef-0123-456789abcdef',
- 'readOnly' => true,
'type' => ['string']
}
when 'email'
{
'example' => 'username@example.com',
- 'readOnly' => false,
'type' => ['string']
}
when 'date-time'
{
'example' => '2012-01-01T12:00:00Z',
- 'readOnly' => true,
'type' => ['string']
}
else
- {
- 'readOnly' => false
- }
+ {}
end
expanded['definitions'][key] = default.merge!(value)
end
end