Sha256: 08da1d4244ad188d91a4c92592e059c4e5f0ba990f2de2f2c5e30ed124128a7a

Contents?: true

Size: 618 Bytes

Versions: 2

Compression:

Stored size: 618 Bytes

Contents

module ApiResources
  class Volumes
    include Praxis::ResourceDefinition

    media_type Volume
    version '1.0', using: :path

    prefix '/volumes'

    trait :authenticated
    
    action :index do
      routing do
        get ''
      end
      response :ok
      response :unauthorized
    end

    action :show do
      routing do
        get '/:id'
      end

      response :ok
      response :unauthorized

      params do
        attribute :id
        attribute :junk, String, default: ''
        attribute :some_date, DateTime, default: DateTime.parse('2012-12-21')
      end
      
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
praxis-0.16.1 spec/spec_app/design/resources/volumes.rb
praxis-0.16.0 spec/spec_app/design/resources/volumes.rb