Closed Strech closed 10 years ago
obj = Lurker::Json::Object.new('name' => 'Foo')
obj.merge!('something' => { 'type' => 'Fail'})
---
description: ''
type: object
additionalProperties: false
required: []
properties:
name:
description: ''
type: string
example: Foo
something:
description: ''
type: Fail
example: ''
---
description: ''
type: object
additionalProperties: false
required: []
properties:
name:
description: ''
type: string
example: Foo
something:
description: ''
type: object
additionalProperties: false
required: []
properties:
type:
description: ''
type: string
example: Fail
мда
@razum2um что? Сам YAML с вот таким кодом парсится отлично
properties:
type:
description: ''
type: 'string'
example: ''
Так что не все так плохо
И да, сейчас даже вот так работает:
obj = Lurker::Json::Object.new('name' => 'Foo')
obj.merge!('type' => 'Fail')
---
description: ''
type: object
additionalProperties: false
required: []
properties:
name:
description: ''
type: string
example: Foo
type:
description: ''
type: string
example: Fail
If type not one of the following Json-Schema primitive, treat it as Lurker::Json::Attribute