Sha256: 0713ee55e61624968007db0ead861cb156de88ae6484cd6cdbb63b733898bea3

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

Praxis::ApiDefinition.define do

  response_template :other_response do |media_type:|
    status 200
    media_type media_type
  end

  response_template :multipart do
    status 200
    media_type 'multipart/form-data'
  end

  response_template :bulk_response do |media_type:, parts: |
    status 200
    media_type 'multipart/form-data'

    parts[:media_type] ||= media_type if parts.kind_of? Hash
    parts(parts)
  end

  trait :authenticated do
    headers do
      header :host
    end
  end

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
traxis-0.0.2 spec/spec_app/design/api.rb
praxis-0.9 spec/spec_app/design/api.rb