Sha256: f7f5aabe8356e140cc17dd79834d437fb91136a25dd13002efcb1337cc5193e3
Contents?: true
Size: 766 Bytes
Versions: 7
Compression:
Stored size: 766 Bytes
Contents
class Person < Praxis::MediaType attributes do attribute :id, Integer attribute :name, String, example: /[:name:]/ attribute :href, String, example: proc { |person| "/people/#{person.id}" } end view :default do attribute :id attribute :name end view :link do attribute :id attribute :name attribute :href end end class Address < Praxis::MediaType identifier 'application/json' description 'Address MediaType' attributes do attribute :id, Integer attribute :name, String attribute :owner, Person links do link :owner link :super, Person, using: :manager end end view :default do attribute :id attribute :name attribute :owner attribute :links end end
Version data entries
7 entries across 7 versions & 1 rubygems