Sha256: 0bea8fedc0be90e2362bd9dd9dac8cb0d76f72408a848ecde3d541804fe07bd0

Contents?: true

Size: 1014 Bytes

Versions: 21

Compression:

Stored size: 1014 Bytes

Contents

require_relative 'spec_media_types'

Praxis::ApiDefinition.define do
  trait :test do
    description 'testing trait'
  end
end

class PeopleResource
  include Praxis::ResourceDefinition

  description 'People resource'

  media_type Person

  version '1.0'

  canonical_path :show

  trait :test

  prefix '/people'

  action :index do
    description 'index description'
    routing do
      get ''
    end
  end

  action :show do
    description 'show description'
    routing do
      get '/:id'
    end
    params do
      attribute :id, Integer, required: true
    end
  end

end


class AddressResource
  include Praxis::ResourceDefinition

  description 'Address resource'

  media_type Address

  version '1.0'

  prefix '/addresses'

  action :index do
    description 'index description'
    routing do
      get ''
    end
  end

  action :show do
    description 'show description'
    routing do
      get '/:id'
    end
    params do
      attribute :id, Integer, required: true
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
praxis-2.0.pre.9 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.8 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.7 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.6 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.5 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.4 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.3 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.2 spec/support/spec_resource_definitions.rb
praxis-2.0.pre.1 spec/support/spec_resource_definitions.rb
praxis-0.22.pre.2 spec/support/spec_resource_definitions.rb
praxis-0.22.pre.1 spec/support/spec_resource_definitions.rb
praxis-0.21 spec/support/spec_resource_definitions.rb
praxis-0.20.1 spec/support/spec_resource_definitions.rb
praxis-0.20.0 spec/support/spec_resource_definitions.rb
praxis-0.19.0 spec/support/spec_resource_definitions.rb
praxis-0.18.1 spec/support/spec_resource_definitions.rb
praxis-0.18.0 spec/support/spec_resource_definitions.rb
praxis-0.17.1 spec/support/spec_resource_definitions.rb
praxis-0.17.0 spec/support/spec_resource_definitions.rb
praxis-0.16.1 spec/support/spec_resource_definitions.rb