Sha256: f15f1bd0c1304f46e746818929a0e0bd1ee0343064a4c9a15029d17731d9457a

Contents?: true

Size: 1.04 KB

Versions: 13

Compression:

Stored size: 1.04 KB

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



  trait :authenticated do
    headers do
      key "Authorization", String, required: false
    end
  end

  info do # applies to all API infos
    name "Spec App"
    title "A simple App to do some simple integration testing"
    description "This example API should really be replaced by a set of more full-fledged example apps in the future"

    base_path "/api"
    produces 'json'
    #version_with :path
    #base_path "/v:api_version"

    # Custom attributes (for OpenApi, for example)
    termsOfService "http://example.com/tos"
    contact name: 'Joe', email: 'joe@email.com'
    license name: "Apache 2.0",
            url: "https://www.apache.org/licenses/LICENSE-2.0.html"
  end

  info '1.0' do # Applies to 1.0 version (and inherits everything else form the global one)
    description "A simple 1.0 App"
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
praxis-2.0.pre.18 spec/spec_app/design/api.rb
praxis-2.0.pre.17 spec/spec_app/design/api.rb
praxis-2.0.pre.16 spec/spec_app/design/api.rb
praxis-2.0.pre.15 spec/spec_app/design/api.rb
praxis-2.0.pre.14 spec/spec_app/design/api.rb
praxis-2.0.pre.13 spec/spec_app/design/api.rb
praxis-2.0.pre.12 spec/spec_app/design/api.rb
praxis-2.0.pre.11 spec/spec_app/design/api.rb
praxis-2.0.pre.10 spec/spec_app/design/api.rb
praxis-2.0.pre.9 spec/spec_app/design/api.rb
praxis-2.0.pre.8 spec/spec_app/design/api.rb
praxis-2.0.pre.7 spec/spec_app/design/api.rb
praxis-2.0.pre.6 spec/spec_app/design/api.rb