swagger-blocks icon indicating copy to clipboard operation
swagger-blocks copied to clipboard

Can't use property :key

Open gcorreaalves opened this issue 2 years ago • 0 comments

I'm trying to implement a schema with key and value properties, but I getting an error.

schema Object, :Sample do
    property(:key) { key :type, :string }
    
    value do
      type :integer
      minimum 1
      maximum 100
    end
  end

image

schema Object, :Sample do
    key { key :type, :string }
    value { key :type, :integer }
 end

image

Is there a way how to achieve this?

gcorreaalves avatar Mar 10 '23 11:03 gcorreaalves