Sha256: 3b0d4fe6349267b56cb7c5810afaadffb4a163c721b1e30b7ccbf5f1418f074c

Contents?: true

Size: 534 Bytes

Versions: 24

Compression:

Stored size: 534 Bytes

Contents

# Use this file to define your overall api behavior, response templates and traits.
Praxis::ApiDefinition.define do
  info do
    name 'example'
    title 'Example API'

    # Attributes for OpenAPI docs
    termsOfService 'https://mysitehere.com'
    contact name: 'API Info', email: 'info@mysitehere.com'
  end
  
  # Trait that when included will require a Bearer authorization header to be passed in.
  trait :authorized do
    headers do
      key "Authorization", String, regexp: /^.*Bearer\s/, required: true
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
praxis-2.0.pre.13 tasks/thor/templates/generator/example_app/design/api.rb
praxis-2.0.pre.12 tasks/thor/templates/generator/example_app/design/api.rb
praxis-2.0.pre.11 tasks/thor/templates/generator/example_app/design/api.rb
praxis-2.0.pre.10 tasks/thor/templates/generator/example_app/design/api.rb