Sha256: 74d413a976f469f28903364ce1c4903d94afcf2a85ea981b5843ae096b858994

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

class Instance < Praxis::MediaType

  identifier 'application/vnd.acme.instance'

  attributes do
    attribute :id, Integer
    attribute :name, String, 
      example: /[:first_name:]/,
      regexp: /^\w+$/

    attribute :href, String

    attribute :root_volume, Volume, null: true

    attribute :volumes, Volume::Collection
    
  end

  default_fieldset do
    attribute :id
    attribute :root_volume
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
praxis-2.0.pre.18 spec/spec_app/design/media_types/instance.rb