swaggard 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@
18
18
 
19
19
  </head>
20
20
 
21
- <body class='swagger-section'>
21
+ <body class='swagger-section' data-doc-path='<%= doc_path(format: :json)%>'>
22
22
  <div id='header'>
23
23
  <div class='swagger-ui-wrap'>
24
24
  <a id='logo' href='http://swagger.io'>
@@ -28,7 +28,7 @@
28
28
  <%= form_tag '', id: :api_selector do %>
29
29
 
30
30
  <div>
31
- <div class='input'><input placeholder='http://example.com/api' id='input_baseUrl' name='baseUrl' type='text'/></div>
31
+ <div class='input'><input placeholder='http://example.com/api_docs/swagger.json' id='input_baseUrl' name='baseUrl' type='text'/></div>
32
32
 
33
33
  <div class='input'>
34
34
  <input class='additional_parameter' data-parameter-key='<%= @authentication_key %>'
@@ -1,3 +1,3 @@
1
1
  Swaggard::Engine.routes.draw do
2
- get '/(.:format)', to: 'swagger#index'
3
- end
2
+ get '/(.:format)', to: 'swagger#index', as: :doc
3
+ end
@@ -4,8 +4,7 @@ module Swaggard
4
4
  #
5
5
  # Swaggard.configure do |config|
6
6
  # config.api_version = '0.1'
7
- # config.doc_base_path = 'http://swagger.example.com/doc'
8
- # config.api_base_path = 'http://swagger.example.com/api'
7
+ # config.api_base_path = '/api'
9
8
  # config.authentication_type = 'header'
10
9
  # config.authentication_key = 'X-AUTHORIZATION'
11
10
  # config.authentication_value = 'you-secret-key'
@@ -13,7 +12,7 @@ module Swaggard
13
12
  # end
14
13
  class Configuration
15
14
 
16
- attr_accessor :doc_base_path, :controllers_path, :models_paths, :routes
15
+ attr_accessor :controllers_path, :models_paths, :routes
17
16
 
18
17
  attr_writer :swagger_version, :api_base_path, :api_version, :api_path, :api_formats, :title,
19
18
  :description, :tos, :contact_email, :contact_name, :contact_url, :host,
@@ -46,7 +45,7 @@ module Swaggard
46
45
  end
47
46
 
48
47
  def schemes
49
- @schemes ||= [:http]
48
+ @schemes ||= [:https, :http]
50
49
  end
51
50
 
52
51
  def title
@@ -1,5 +1,5 @@
1
1
  module Swaggard
2
2
 
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
 
5
5
  end
@@ -1 +1 @@
1
- {"swagger":"2.0","info":{"description":"","version":"0.1","title":"","termsOfService":"","contact":{"name":"","email":"","url":""},"license":{"name":"","url":""}},"host":"localhost:3000","basePath":"/","tags":[{"name":"admin/pets","description":"This document describes the API for interacting with Pet resources"},{"name":"pets","description":"This document describes the API for interacting with Pet resources"}],"schemes":["http"],"paths":{"/admin/pets":{"get":{"tags":["admin/pets"],"summary":"return a list of Pets","description":"","operationId":"index","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/pets":{"get":{"tags":["pets"],"summary":"return a list of Pets","description":"","operationId":"index","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/pets/{id}":{"get":{"tags":["pets"],"summary":"return a Pet","description":"","operationId":"show","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[{"in":"query","name":"id","description":"The ID for the Pet","required":false,"type":"integer"},{"in":"path","name":"id","description":"Scope response to id","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}}},"definitions":{}}
1
+ {"swagger":"2.0","info":{"description":"","version":"0.1","title":"","termsOfService":"","contact":{"name":"","email":"","url":""},"license":{"name":"","url":""}},"host":"localhost:3000","basePath":"/","tags":[{"name":"admin/pets","description":"This document describes the API for interacting with Pet resources"},{"name":"pets","description":"This document describes the API for interacting with Pet resources"}],"schemes":["https","http"],"paths":{"/admin/pets":{"get":{"tags":["admin/pets"],"summary":"return a list of Pets","description":"","operationId":"index","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/pets":{"get":{"tags":["pets"],"summary":"return a list of Pets","description":"","operationId":"index","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/pets/{id}":{"get":{"tags":["pets"],"summary":"return a Pet","description":"","operationId":"show","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[{"in":"query","name":"id","description":"The ID for the Pet","required":false,"type":"integer"},{"in":"path","name":"id","description":"Scope response to id","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}}},"definitions":{}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swaggard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Gomez