├── .gitignore ├── Gemfile ├── Gemfile.lock ├── README.md ├── Rakefile ├── app ├── assets │ ├── images │ │ └── .keep │ ├── javascripts │ │ └── application.js │ └── stylesheets │ │ └── application.css ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ ├── groups_controller.rb │ ├── properties_controller.rb │ └── users_controller.rb ├── helpers │ └── application_helper.rb ├── mailers │ └── .keep ├── models │ ├── .keep │ └── concerns │ │ └── .keep └── views │ └── layouts │ └── application.html.erb ├── bin ├── bundle ├── rails └── rake ├── config.ru ├── config ├── application.rb ├── boot.rb ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── backtrace_silencers.rb │ ├── filter_parameter_logging.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── secret_token.rb │ ├── session_store.rb │ ├── swagger_docs.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml └── routes.rb ├── db └── seeds.rb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── log └── .keep ├── public ├── 404.html ├── 422.html ├── 500.html ├── api-docs.json ├── api │ ├── index.html │ └── swagger-ui │ │ ├── css │ │ ├── highlight.default.css │ │ └── screen.css │ │ ├── images │ │ ├── logo_small.png │ │ ├── pet_store_api.png │ │ ├── throbber.gif │ │ └── wordnik_api.png │ │ ├── lib │ │ ├── backbone-min.js │ │ ├── handlebars-1.0.0.js │ │ ├── highlight.7.3.pack.js │ │ ├── jquery-1.8.0.min.js │ │ ├── jquery.ba-bbq.min.js │ │ ├── jquery.slideto.min.js │ │ ├── jquery.wiggle.min.js │ │ ├── shred.bundle.js │ │ ├── shred │ │ │ └── content.js │ │ ├── swagger.js │ │ └── underscore-min.js │ │ ├── swagger-ui.js │ │ └── swagger-ui.min.js ├── favicon.ico ├── groups.json ├── properties.json ├── robots.txt └── users.json ├── swagger-docs-screenshot-1.png ├── swagger-docs-screenshot-2.png ├── test ├── controllers │ └── .keep ├── fixtures │ └── .keep ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep └── test_helper.rb └── vendor └── assets ├── javascripts └── .keep └── stylesheets └── .keep /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/*.log 16 | /tmp 17 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 4 | gem 'rails', '4.0.0' 5 | 6 | # Use sqlite3 as the database for Active Record 7 | gem 'sqlite3' 8 | 9 | # Use SCSS for stylesheets 10 | gem 'sass-rails', '~> 4.0.0' 11 | 12 | # Use Uglifier as compressor for JavaScript assets 13 | gem 'uglifier', '>= 1.3.0' 14 | 15 | # Use CoffeeScript for .js.coffee assets and views 16 | gem 'coffee-rails', '~> 4.0.0' 17 | 18 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes 19 | gem 'therubyracer', platforms: :ruby 20 | 21 | # Use jquery as the JavaScript library 22 | gem 'jquery-rails' 23 | 24 | # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 25 | gem 'turbolinks' 26 | 27 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 28 | gem 'jbuilder', '~> 1.2' 29 | 30 | group :doc do 31 | # bundle exec rake doc:rails generates the API under doc/api. 32 | gem 'sdoc', require: false 33 | end 34 | 35 | gem 'swagger-docs' 36 | 37 | # Use ActiveModel has_secure_password 38 | # gem 'bcrypt-ruby', '~> 3.0.0' 39 | 40 | # Use unicorn as the app server 41 | # gem 'unicorn' 42 | 43 | # Use Capistrano for deployment 44 | # gem 'capistrano', group: :development 45 | 46 | # Use debugger 47 | # gem 'debugger', group: [:development, :test] 48 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.0.0) 5 | actionpack (= 4.0.0) 6 | mail (~> 2.5.3) 7 | actionpack (4.0.0) 8 | activesupport (= 4.0.0) 9 | builder (~> 3.1.0) 10 | erubis (~> 2.7.0) 11 | rack (~> 1.5.2) 12 | rack-test (~> 0.6.2) 13 | activemodel (4.0.0) 14 | activesupport (= 4.0.0) 15 | builder (~> 3.1.0) 16 | activerecord (4.0.0) 17 | activemodel (= 4.0.0) 18 | activerecord-deprecated_finders (~> 1.0.2) 19 | activesupport (= 4.0.0) 20 | arel (~> 4.0.0) 21 | activerecord-deprecated_finders (1.0.3) 22 | activesupport (4.0.0) 23 | i18n (~> 0.6, >= 0.6.4) 24 | minitest (~> 4.2) 25 | multi_json (~> 1.3) 26 | thread_safe (~> 0.1) 27 | tzinfo (~> 0.3.37) 28 | arel (4.0.1) 29 | atomic (1.1.14) 30 | builder (3.1.4) 31 | coffee-rails (4.0.1) 32 | coffee-script (>= 2.2.0) 33 | railties (>= 4.0.0, < 5.0) 34 | coffee-script (2.2.0) 35 | coffee-script-source 36 | execjs 37 | coffee-script-source (1.6.3) 38 | erubis (2.7.0) 39 | execjs (2.0.2) 40 | hike (1.2.3) 41 | i18n (0.6.5) 42 | jbuilder (1.5.2) 43 | activesupport (>= 3.0.0) 44 | multi_json (>= 1.2.0) 45 | jquery-rails (3.0.4) 46 | railties (>= 3.0, < 5.0) 47 | thor (>= 0.14, < 2.0) 48 | json (1.8.1) 49 | libv8 (3.16.14.3) 50 | mail (2.5.4) 51 | mime-types (~> 1.16) 52 | treetop (~> 1.4.8) 53 | mime-types (1.25) 54 | minitest (4.7.5) 55 | multi_json (1.8.2) 56 | polyglot (0.3.3) 57 | rack (1.5.2) 58 | rack-test (0.6.2) 59 | rack (>= 1.0) 60 | rails (4.0.0) 61 | actionmailer (= 4.0.0) 62 | actionpack (= 4.0.0) 63 | activerecord (= 4.0.0) 64 | activesupport (= 4.0.0) 65 | bundler (>= 1.3.0, < 2.0) 66 | railties (= 4.0.0) 67 | sprockets-rails (~> 2.0.0) 68 | railties (4.0.0) 69 | actionpack (= 4.0.0) 70 | activesupport (= 4.0.0) 71 | rake (>= 0.8.7) 72 | thor (>= 0.18.1, < 2.0) 73 | rake (10.1.0) 74 | rdoc (3.12.2) 75 | json (~> 1.4) 76 | ref (1.0.5) 77 | sass (3.2.12) 78 | sass-rails (4.0.1) 79 | railties (>= 4.0.0, < 5.0) 80 | sass (>= 3.1.10) 81 | sprockets-rails (~> 2.0.0) 82 | sdoc (0.3.20) 83 | json (>= 1.1.3) 84 | rdoc (~> 3.10) 85 | sprockets (2.10.0) 86 | hike (~> 1.2) 87 | multi_json (~> 1.0) 88 | rack (~> 1.0) 89 | tilt (~> 1.1, != 1.3.0) 90 | sprockets-rails (2.0.1) 91 | actionpack (>= 3.0) 92 | activesupport (>= 3.0) 93 | sprockets (~> 2.8) 94 | sqlite3 (1.3.8) 95 | swagger-docs (0.0.3) 96 | therubyracer (0.12.0) 97 | libv8 (~> 3.16.14.0) 98 | ref 99 | thor (0.18.1) 100 | thread_safe (0.1.3) 101 | atomic 102 | tilt (1.4.1) 103 | treetop (1.4.15) 104 | polyglot 105 | polyglot (>= 0.3.1) 106 | turbolinks (1.3.0) 107 | coffee-rails 108 | tzinfo (0.3.38) 109 | uglifier (2.3.0) 110 | execjs (>= 0.3.0) 111 | json (>= 1.8.0) 112 | 113 | PLATFORMS 114 | ruby 115 | 116 | DEPENDENCIES 117 | coffee-rails (~> 4.0.0) 118 | jbuilder (~> 1.2) 119 | jquery-rails 120 | rails (= 4.0.0) 121 | sass-rails (~> 4.0.0) 122 | sdoc 123 | sqlite3 124 | swagger-docs 125 | therubyracer 126 | turbolinks 127 | uglifier (>= 1.3.0) 128 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # swagger-docs-sample 2 | ##Sample Rails application for swagger-docs 3 | 4 | ```bash 5 | bundle 6 | rake swagger:docs 7 | rails server 8 | ``` 9 | 10 | This is a sample rails application that demonstrates the swagger-docs rake 11 | task and it's output. 12 | 13 | This sample app has some sample JSON controllers which contain swagger_controller 14 | directives in them - e.g. 15 | 16 | ```ruby 17 | class PropertiesController < ApplicationController 18 | 19 | swagger_controller :properties, "Properties" 20 | 21 | swagger_api :show do 22 | summary "Fetches all properties" 23 | param :path, :id, :integer, :required, "Property ID" 24 | response :unauthorized 25 | response :not_acceptable 26 | end 27 | 28 | def show 29 | render :json => {result:"Success"}, :status => 200 30 | end 31 | 32 | end 33 | ``` 34 | 35 | The swagger-docs rake task (rake swagger:docs) then examines 36 | your controllers to determine which controllers should be documented for swagger-ui. 37 | 38 | Swagger-ui is included in the project (with some minor tweaks to its files for its path location). 39 | Once you have fired up your rails server for this sample application point your browser to: 40 | 41 | http://localhost:3000/api 42 | 43 | You should then see the swagger-ui API homepage for this sample application 44 | where you can then see the documentation that has been generated and interact 45 | with the dummy controllers - as shown below: 46 | 47 | ## swagger-docs -> swagger-ui screenshots 48 | 49 | ![Screen shot 1](swagger-docs-screenshot-1.png) 50 | 51 | ![Screen shot 2](swagger-docs-screenshot-2.png) 52 | 53 | ## More information 54 | 55 | For more information about swagger-docs visit the project home page: 56 | 57 | https://github.com/richhollis/swagger-docs 58 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | SwaggerDocsSample::Application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require turbolinks 16 | //= require_tree . 17 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require_self 12 | *= require_tree . 13 | */ 14 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/groups_controller.rb: -------------------------------------------------------------------------------- 1 | class GroupsController < ApplicationController 2 | 3 | swagger_controller :groups, "Groups" 4 | 5 | swagger_api :index do 6 | summary "Fetches all group memberships" 7 | param :path, :id, :integer, :required, "Group ID" 8 | response :unauthorized 9 | response :not_acceptable 10 | end 11 | 12 | def index 13 | render :json => {result:"Success"}, :status => 200 14 | end 15 | 16 | end -------------------------------------------------------------------------------- /app/controllers/properties_controller.rb: -------------------------------------------------------------------------------- 1 | class PropertiesController < ApplicationController 2 | 3 | swagger_controller :properties, "Properties" 4 | 5 | swagger_api :show do 6 | summary "Fetches all properties" 7 | param :path, :id, :integer, :required, "Property ID" 8 | response :unauthorized 9 | response :not_acceptable 10 | end 11 | 12 | def show 13 | render :json => {result:"Success"}, :status => 200 14 | end 15 | 16 | end -------------------------------------------------------------------------------- /app/controllers/users_controller.rb: -------------------------------------------------------------------------------- 1 | class UsersController < ApplicationController 2 | 3 | swagger_controller :users, "Users" 4 | 5 | swagger_api :index do 6 | summary "Fetches all users" 7 | response :unauthorized 8 | response :not_acceptable 9 | end 10 | 11 | def index 12 | render :json => {result:"Success"}, :status => 200 13 | end 14 | 15 | end -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/app/mailers/.keep -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SwaggerDocsSample 5 | <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> 6 | <%= javascript_include_tag "application", "data-turbolinks-track" => true %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(:default, Rails.env) 8 | 9 | module SwaggerDocsSample 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | 15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 17 | # config.time_zone = 'Central Time (US & Canada)' 18 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 21 | # config.i18n.default_locale = :de 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | 4 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) 5 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | development: 7 | adapter: sqlite3 8 | database: db/development.sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | # Warning: The database defined as "test" will be erased and 13 | # re-generated from your development database when you run "rake". 14 | # Do not set this db to the same as development or production. 15 | test: 16 | adapter: sqlite3 17 | database: db/test.sqlite3 18 | pool: 5 19 | timeout: 5000 20 | 21 | production: 22 | adapter: sqlite3 23 | database: db/production.sqlite3 24 | pool: 5 25 | timeout: 5000 26 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | SwaggerDocsSample::Application.initialize! 6 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | SwaggerDocsSample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports and disable caching. 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send. 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | # Print deprecation notices to the Rails logger. 20 | config.active_support.deprecation = :log 21 | 22 | # Raise an error on page load if there are pending migrations 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | end 30 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | SwaggerDocsSample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both thread web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 20 | # config.action_dispatch.rack_cache = true 21 | 22 | # Disable Rails's static asset server (Apache or nginx will already do this). 23 | config.serve_static_assets = false 24 | 25 | # Compress JavaScripts and CSS. 26 | config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # Generate digests for assets URLs. 33 | config.assets.digest = true 34 | 35 | # Version of your assets, change this if you want to expire all your assets. 36 | config.assets.version = '1.0' 37 | 38 | # Specifies the header that your server uses for sending files. 39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 40 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Set to :debug to see everything in the log. 46 | config.log_level = :info 47 | 48 | # Prepend all log lines with the following tags. 49 | # config.log_tags = [ :subdomain, :uuid ] 50 | 51 | # Use a different logger for distributed setups. 52 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 53 | 54 | # Use a different cache store in production. 55 | # config.cache_store = :mem_cache_store 56 | 57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 58 | # config.action_controller.asset_host = "http://assets.example.com" 59 | 60 | # Precompile additional assets. 61 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 62 | # config.assets.precompile += %w( search.js ) 63 | 64 | # Ignore bad email addresses and do not raise email delivery errors. 65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 66 | # config.action_mailer.raise_delivery_errors = false 67 | 68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 69 | # the I18n.default_locale when a translation can not be found). 70 | config.i18n.fallbacks = true 71 | 72 | # Send deprecation notices to registered listeners. 73 | config.active_support.deprecation = :notify 74 | 75 | # Disable automatic flushing of the log to improve performance. 76 | # config.autoflush_log = false 77 | 78 | # Use default logging formatter so that PID and timestamp are not suppressed. 79 | config.log_formatter = ::Logger::Formatter.new 80 | end 81 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | SwaggerDocsSample::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static asset server for tests with Cache-Control for performance. 16 | config.serve_static_assets = true 17 | config.static_cache_control = "public, max-age=3600" 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Print deprecation notices to the stderr. 35 | config.active_support.deprecation = :stderr 36 | end 37 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /config/initializers/secret_token.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure your secret_key_base is kept private 11 | # if you're sharing your code publicly. 12 | SwaggerDocsSample::Application.config.secret_key_base = '12948660d7fc2cd219a682d0226a9b67b61fbcafb005c6b28f75906c7a9d66495db707e7528e9106e0f3404bb9bbc4739c4d7bae6a60c9742f214027a896679b' 13 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | SwaggerDocsSample::Application.config.session_store :cookie_store, key: '_swagger-docs-sample_session' 4 | -------------------------------------------------------------------------------- /config/initializers/swagger_docs.rb: -------------------------------------------------------------------------------- 1 | Swagger::Docs::Config.register_apis({ 2 | "1.0" => {:controller_base_path => "", :api_file_path => "public"} 3 | }) 4 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | SwaggerDocsSample::Application.routes.draw do 2 | 3 | match '/properties/:id', to: 'properties#show', via: 'get' 4 | match '/users', to: 'users#index', via: 'get' 5 | match '/group/:id/members', to: 'groups#index', via: 'get' 6 | 7 | # The priority is based upon order of creation: first created -> highest priority. 8 | # See how all your routes lay out with "rake routes". 9 | 10 | # You can have the root of your site routed with "root" 11 | # root 'welcome#index' 12 | 13 | # Example of regular route: 14 | # get 'products/:id' => 'catalog#view' 15 | 16 | # Example of named route that can be invoked with purchase_url(id: product.id) 17 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase 18 | 19 | # Example resource route (maps HTTP verbs to controller actions automatically): 20 | # resources :products 21 | 22 | # Example resource route with options: 23 | # resources :products do 24 | # member do 25 | # get 'short' 26 | # post 'toggle' 27 | # end 28 | # 29 | # collection do 30 | # get 'sold' 31 | # end 32 | # end 33 | 34 | # Example resource route with sub-resources: 35 | # resources :products do 36 | # resources :comments, :sales 37 | # resource :seller 38 | # end 39 | 40 | # Example resource route with more complex sub-resources: 41 | # resources :products do 42 | # resources :comments 43 | # resources :sales do 44 | # get 'recent', on: :collection 45 | # end 46 | # end 47 | 48 | # Example resource route with concerns: 49 | # concern :toggleable do 50 | # post 'toggle' 51 | # end 52 | # resources :posts, concerns: :toggleable 53 | # resources :photos, concerns: :toggleable 54 | 55 | # Example resource route within a namespace: 56 | # namespace :admin do 57 | # # Directs /admin/products/* to Admin::ProductsController 58 | # # (app/controllers/admin/products_controller.rb) 59 | # resources :products 60 | # end 61 | end 62 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/lib/assets/.keep -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/lib/tasks/.keep -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/log/.keep -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The page you were looking for doesn't exist.

54 |

You may have mistyped the address or the page may have moved.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The change you wanted was rejected.

54 |

Maybe you tried to change something you didn't have access to.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

We're sorry, but something went wrong.

54 |
55 |

If you are the application owner check the logs for more information.

56 | 57 | 58 | -------------------------------------------------------------------------------- /public/api-docs.json: -------------------------------------------------------------------------------- 1 | {"apiVersion":"1.0","swaggerVersion":"1.2","basePath":"/","apis":[{"path":"properties.{format}","description":"Properties"},{"path":"users.{format}","description":"Users"},{"path":"groups.{format}","description":"Groups"}]} -------------------------------------------------------------------------------- /public/api/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Swagger UI 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 52 | 53 | 54 | 55 | 72 | 73 |
74 |   75 |
76 | 77 |
78 | 79 |
80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /public/api/swagger-ui/css/highlight.default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #F0F0F0; 10 | } 11 | 12 | pre code, 13 | pre .subst, 14 | pre .tag .title, 15 | pre .lisp .title, 16 | pre .clojure .built_in, 17 | pre .nginx .title { 18 | color: black; 19 | } 20 | 21 | pre .string, 22 | pre .title, 23 | pre .constant, 24 | pre .parent, 25 | pre .tag .value, 26 | pre .rules .value, 27 | pre .rules .value .number, 28 | pre .preprocessor, 29 | pre .ruby .symbol, 30 | pre .ruby .symbol .string, 31 | pre .aggregate, 32 | pre .template_tag, 33 | pre .django .variable, 34 | pre .smalltalk .class, 35 | pre .addition, 36 | pre .flow, 37 | pre .stream, 38 | pre .bash .variable, 39 | pre .apache .tag, 40 | pre .apache .cbracket, 41 | pre .tex .command, 42 | pre .tex .special, 43 | pre .erlang_repl .function_or_atom, 44 | pre .markdown .header { 45 | color: #800; 46 | } 47 | 48 | pre .comment, 49 | pre .annotation, 50 | pre .template_comment, 51 | pre .diff .header, 52 | pre .chunk, 53 | pre .markdown .blockquote { 54 | color: #888; 55 | } 56 | 57 | pre .number, 58 | pre .date, 59 | pre .regexp, 60 | pre .literal, 61 | pre .smalltalk .symbol, 62 | pre .smalltalk .char, 63 | pre .go .constant, 64 | pre .change, 65 | pre .markdown .bullet, 66 | pre .markdown .link_url { 67 | color: #080; 68 | } 69 | 70 | pre .label, 71 | pre .javadoc, 72 | pre .ruby .string, 73 | pre .decorator, 74 | pre .filter .argument, 75 | pre .localvars, 76 | pre .array, 77 | pre .attr_selector, 78 | pre .important, 79 | pre .pseudo, 80 | pre .pi, 81 | pre .doctype, 82 | pre .deletion, 83 | pre .envvar, 84 | pre .shebang, 85 | pre .apache .sqbracket, 86 | pre .nginx .built_in, 87 | pre .tex .formula, 88 | pre .erlang_repl .reserved, 89 | pre .prompt, 90 | pre .markdown .link_label, 91 | pre .vhdl .attribute, 92 | pre .clojure .attribute, 93 | pre .coffeescript .property { 94 | color: #88F 95 | } 96 | 97 | pre .keyword, 98 | pre .id, 99 | pre .phpdoc, 100 | pre .title, 101 | pre .built_in, 102 | pre .aggregate, 103 | pre .css .tag, 104 | pre .javadoctag, 105 | pre .phpdoc, 106 | pre .yardoctag, 107 | pre .smalltalk .class, 108 | pre .winutils, 109 | pre .bash .variable, 110 | pre .apache .tag, 111 | pre .go .typename, 112 | pre .tex .command, 113 | pre .markdown .strong, 114 | pre .request, 115 | pre .status { 116 | font-weight: bold; 117 | } 118 | 119 | pre .markdown .emphasis { 120 | font-style: italic; 121 | } 122 | 123 | pre .nginx .built_in { 124 | font-weight: normal; 125 | } 126 | 127 | pre .coffeescript .javascript, 128 | pre .javascript .xml, 129 | pre .tex .formula, 130 | pre .xml .javascript, 131 | pre .xml .vbscript, 132 | pre .xml .css, 133 | pre .xml .cdata { 134 | opacity: 0.5; 135 | } 136 | -------------------------------------------------------------------------------- /public/api/swagger-ui/css/screen.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ 2 | html, 3 | body, 4 | div, 5 | span, 6 | applet, 7 | object, 8 | iframe, 9 | h1, 10 | h2, 11 | h3, 12 | h4, 13 | h5, 14 | h6, 15 | p, 16 | blockquote, 17 | pre, 18 | a, 19 | abbr, 20 | acronym, 21 | address, 22 | big, 23 | cite, 24 | code, 25 | del, 26 | dfn, 27 | em, 28 | img, 29 | ins, 30 | kbd, 31 | q, 32 | s, 33 | samp, 34 | small, 35 | strike, 36 | strong, 37 | sub, 38 | sup, 39 | tt, 40 | var, 41 | b, 42 | u, 43 | i, 44 | center, 45 | dl, 46 | dt, 47 | dd, 48 | ol, 49 | ul, 50 | li, 51 | fieldset, 52 | form, 53 | label, 54 | legend, 55 | table, 56 | caption, 57 | tbody, 58 | tfoot, 59 | thead, 60 | tr, 61 | th, 62 | td, 63 | article, 64 | aside, 65 | canvas, 66 | details, 67 | embed, 68 | figure, 69 | figcaption, 70 | footer, 71 | header, 72 | hgroup, 73 | menu, 74 | nav, 75 | output, 76 | ruby, 77 | section, 78 | summary, 79 | time, 80 | mark, 81 | audio, 82 | video { 83 | margin: 0; 84 | padding: 0; 85 | border: 0; 86 | font-size: 100%; 87 | font: inherit; 88 | vertical-align: baseline; 89 | } 90 | /* HTML5 display-role reset for older browsers */ 91 | article, 92 | aside, 93 | details, 94 | figcaption, 95 | figure, 96 | footer, 97 | header, 98 | hgroup, 99 | menu, 100 | nav, 101 | section { 102 | display: block; 103 | } 104 | body { 105 | line-height: 1; 106 | } 107 | ol, 108 | ul { 109 | list-style: none; 110 | } 111 | blockquote, 112 | q { 113 | quotes: none; 114 | } 115 | blockquote:before, 116 | blockquote:after, 117 | q:before, 118 | q:after { 119 | content: ''; 120 | content: none; 121 | } 122 | table { 123 | border-collapse: collapse; 124 | border-spacing: 0; 125 | } 126 | .swagger-ui-wrap { 127 | line-height: 1; 128 | font-family: "Droid Sans", sans-serif; 129 | max-width: 960px; 130 | margin-left: auto; 131 | margin-right: auto; 132 | } 133 | .swagger-ui-wrap b, 134 | .swagger-ui-wrap strong { 135 | font-family: "Droid Sans", sans-serif; 136 | font-weight: bold; 137 | } 138 | .swagger-ui-wrap q, 139 | .swagger-ui-wrap blockquote { 140 | quotes: none; 141 | } 142 | .swagger-ui-wrap p { 143 | line-height: 1.4em; 144 | padding: 0 0 10px; 145 | color: #333333; 146 | } 147 | .swagger-ui-wrap q:before, 148 | .swagger-ui-wrap q:after, 149 | .swagger-ui-wrap blockquote:before, 150 | .swagger-ui-wrap blockquote:after { 151 | content: none; 152 | } 153 | .swagger-ui-wrap .heading_with_menu h1, 154 | .swagger-ui-wrap .heading_with_menu h2, 155 | .swagger-ui-wrap .heading_with_menu h3, 156 | .swagger-ui-wrap .heading_with_menu h4, 157 | .swagger-ui-wrap .heading_with_menu h5, 158 | .swagger-ui-wrap .heading_with_menu h6 { 159 | display: block; 160 | clear: none; 161 | float: left; 162 | -moz-box-sizing: border-box; 163 | -webkit-box-sizing: border-box; 164 | -ms-box-sizing: border-box; 165 | box-sizing: border-box; 166 | width: 60%; 167 | } 168 | .swagger-ui-wrap table { 169 | border-collapse: collapse; 170 | border-spacing: 0; 171 | } 172 | .swagger-ui-wrap table thead tr th { 173 | padding: 5px; 174 | font-size: 0.9em; 175 | color: #666666; 176 | border-bottom: 1px solid #999999; 177 | } 178 | .swagger-ui-wrap table tbody tr:last-child td { 179 | border-bottom: none; 180 | } 181 | .swagger-ui-wrap table tbody tr.offset { 182 | background-color: #f0f0f0; 183 | } 184 | .swagger-ui-wrap table tbody tr td { 185 | padding: 6px; 186 | font-size: 0.9em; 187 | border-bottom: 1px solid #cccccc; 188 | vertical-align: top; 189 | line-height: 1.3em; 190 | } 191 | .swagger-ui-wrap ol { 192 | margin: 0px 0 10px; 193 | padding: 0 0 0 18px; 194 | list-style-type: decimal; 195 | } 196 | .swagger-ui-wrap ol li { 197 | padding: 5px 0px; 198 | font-size: 0.9em; 199 | color: #333333; 200 | } 201 | .swagger-ui-wrap ol, 202 | .swagger-ui-wrap ul { 203 | list-style: none; 204 | } 205 | .swagger-ui-wrap h1 a, 206 | .swagger-ui-wrap h2 a, 207 | .swagger-ui-wrap h3 a, 208 | .swagger-ui-wrap h4 a, 209 | .swagger-ui-wrap h5 a, 210 | .swagger-ui-wrap h6 a { 211 | text-decoration: none; 212 | } 213 | .swagger-ui-wrap h1 a:hover, 214 | .swagger-ui-wrap h2 a:hover, 215 | .swagger-ui-wrap h3 a:hover, 216 | .swagger-ui-wrap h4 a:hover, 217 | .swagger-ui-wrap h5 a:hover, 218 | .swagger-ui-wrap h6 a:hover { 219 | text-decoration: underline; 220 | } 221 | .swagger-ui-wrap h1 span.divider, 222 | .swagger-ui-wrap h2 span.divider, 223 | .swagger-ui-wrap h3 span.divider, 224 | .swagger-ui-wrap h4 span.divider, 225 | .swagger-ui-wrap h5 span.divider, 226 | .swagger-ui-wrap h6 span.divider { 227 | color: #aaaaaa; 228 | } 229 | .swagger-ui-wrap a { 230 | color: #547f00; 231 | } 232 | .swagger-ui-wrap a img { 233 | border: none; 234 | } 235 | .swagger-ui-wrap article, 236 | .swagger-ui-wrap aside, 237 | .swagger-ui-wrap details, 238 | .swagger-ui-wrap figcaption, 239 | .swagger-ui-wrap figure, 240 | .swagger-ui-wrap footer, 241 | .swagger-ui-wrap header, 242 | .swagger-ui-wrap hgroup, 243 | .swagger-ui-wrap menu, 244 | .swagger-ui-wrap nav, 245 | .swagger-ui-wrap section, 246 | .swagger-ui-wrap summary { 247 | display: block; 248 | } 249 | .swagger-ui-wrap pre { 250 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 251 | background-color: #fcf6db; 252 | border: 1px solid #e5e0c6; 253 | padding: 10px; 254 | } 255 | .swagger-ui-wrap pre code { 256 | line-height: 1.6em; 257 | background: none; 258 | } 259 | .swagger-ui-wrap .content > .content-type > div > label { 260 | clear: both; 261 | display: block; 262 | color: #0F6AB4; 263 | font-size: 1.1em; 264 | margin: 0; 265 | padding: 15px 0 5px; 266 | } 267 | .swagger-ui-wrap .content pre { 268 | font-size: 12px; 269 | margin-top: 5px; 270 | padding: 5px; 271 | } 272 | .swagger-ui-wrap .icon-btn { 273 | cursor: pointer; 274 | } 275 | .swagger-ui-wrap .info_title { 276 | padding-bottom: 10px; 277 | font-weight: bold; 278 | font-size: 25px; 279 | } 280 | .swagger-ui-wrap p.big, 281 | .swagger-ui-wrap div.big p { 282 | font-size: 1em; 283 | margin-bottom: 10px; 284 | } 285 | .swagger-ui-wrap form.fullwidth ol li.string input, 286 | .swagger-ui-wrap form.fullwidth ol li.url input, 287 | .swagger-ui-wrap form.fullwidth ol li.text textarea, 288 | .swagger-ui-wrap form.fullwidth ol li.numeric input { 289 | width: 500px !important; 290 | } 291 | .swagger-ui-wrap .info_license { 292 | padding-bottom: 5px; 293 | } 294 | .swagger-ui-wrap .info_tos { 295 | padding-bottom: 5px; 296 | } 297 | .swagger-ui-wrap .message-fail { 298 | color: #cc0000; 299 | } 300 | .swagger-ui-wrap .info_contact { 301 | padding-bottom: 5px; 302 | } 303 | .swagger-ui-wrap .info_description { 304 | padding-bottom: 10px; 305 | font-size: 15px; 306 | } 307 | .swagger-ui-wrap .markdown ol li, 308 | .swagger-ui-wrap .markdown ul li { 309 | padding: 3px 0px; 310 | line-height: 1.4em; 311 | color: #333333; 312 | } 313 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, 314 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, 315 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { 316 | display: block; 317 | padding: 4px; 318 | width: auto; 319 | clear: both; 320 | } 321 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, 322 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, 323 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { 324 | font-size: 1.3em; 325 | } 326 | .swagger-ui-wrap table.fullwidth { 327 | width: 100%; 328 | } 329 | .swagger-ui-wrap .model-signature { 330 | font-family: "Droid Sans", sans-serif; 331 | font-size: 1em; 332 | line-height: 1.5em; 333 | } 334 | .swagger-ui-wrap .model-signature .signature-nav a { 335 | text-decoration: none; 336 | color: #AAA; 337 | } 338 | .swagger-ui-wrap .model-signature .signature-nav a:hover { 339 | text-decoration: underline; 340 | color: black; 341 | } 342 | .swagger-ui-wrap .model-signature .signature-nav .selected { 343 | color: black; 344 | text-decoration: none; 345 | } 346 | .swagger-ui-wrap .model-signature .propType { 347 | color: #5555aa; 348 | } 349 | .swagger-ui-wrap .model-signature pre:hover { 350 | background-color: #ffffdd; 351 | } 352 | .swagger-ui-wrap .model-signature pre { 353 | font-size: .85em; 354 | line-height: 1.2em; 355 | overflow: auto; 356 | max-height: 200px; 357 | cursor: pointer; 358 | } 359 | .swagger-ui-wrap .model-signature ul.signature-nav { 360 | display: block; 361 | margin: 0; 362 | padding: 0; 363 | } 364 | .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { 365 | padding-right: 0; 366 | border-right: none; 367 | } 368 | .swagger-ui-wrap .model-signature ul.signature-nav li { 369 | float: left; 370 | margin: 0 5px 5px 0; 371 | padding: 2px 5px 2px 0; 372 | border-right: 1px solid #ddd; 373 | } 374 | .swagger-ui-wrap .model-signature .propOpt { 375 | color: #555; 376 | } 377 | .swagger-ui-wrap .model-signature .snippet small { 378 | font-size: 0.75em; 379 | } 380 | .swagger-ui-wrap .model-signature .propOptKey { 381 | font-style: italic; 382 | } 383 | .swagger-ui-wrap .model-signature .description .strong { 384 | font-weight: bold; 385 | color: #000; 386 | font-size: .9em; 387 | } 388 | .swagger-ui-wrap .model-signature .description div { 389 | font-size: 0.9em; 390 | line-height: 1.5em; 391 | margin-left: 1em; 392 | } 393 | .swagger-ui-wrap .model-signature .description .stronger { 394 | font-weight: bold; 395 | color: #000; 396 | } 397 | .swagger-ui-wrap .model-signature .propName { 398 | font-weight: bold; 399 | } 400 | .swagger-ui-wrap .model-signature .signature-container { 401 | clear: both; 402 | } 403 | .swagger-ui-wrap .body-textarea { 404 | width: 300px; 405 | height: 100px; 406 | border: 1px solid #aaa; 407 | } 408 | .swagger-ui-wrap .markdown p code, 409 | .swagger-ui-wrap .markdown li code { 410 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 411 | background-color: #f0f0f0; 412 | color: black; 413 | padding: 1px 3px; 414 | } 415 | .swagger-ui-wrap .required { 416 | font-weight: bold; 417 | } 418 | .swagger-ui-wrap input.parameter { 419 | width: 300px; 420 | border: 1px solid #aaa; 421 | } 422 | .swagger-ui-wrap h1 { 423 | color: black; 424 | font-size: 1.5em; 425 | line-height: 1.3em; 426 | padding: 10px 0 10px 0; 427 | font-family: "Droid Sans", sans-serif; 428 | font-weight: bold; 429 | } 430 | .swagger-ui-wrap .heading_with_menu { 431 | float: none; 432 | clear: both; 433 | overflow: hidden; 434 | display: block; 435 | } 436 | .swagger-ui-wrap .heading_with_menu ul { 437 | display: block; 438 | clear: none; 439 | float: right; 440 | -moz-box-sizing: border-box; 441 | -webkit-box-sizing: border-box; 442 | -ms-box-sizing: border-box; 443 | box-sizing: border-box; 444 | margin-top: 10px; 445 | } 446 | .swagger-ui-wrap h2 { 447 | color: black; 448 | font-size: 1.3em; 449 | padding: 10px 0 10px 0; 450 | } 451 | .swagger-ui-wrap h2 a { 452 | color: black; 453 | } 454 | .swagger-ui-wrap h2 span.sub { 455 | font-size: 0.7em; 456 | color: #999999; 457 | font-style: italic; 458 | } 459 | .swagger-ui-wrap h2 span.sub a { 460 | color: #777777; 461 | } 462 | .swagger-ui-wrap span.weak { 463 | color: #666666; 464 | } 465 | .swagger-ui-wrap .message-success { 466 | color: #89BF04; 467 | } 468 | .swagger-ui-wrap caption, 469 | .swagger-ui-wrap th, 470 | .swagger-ui-wrap td { 471 | text-align: left; 472 | font-weight: normal; 473 | vertical-align: middle; 474 | } 475 | .swagger-ui-wrap .code { 476 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 477 | } 478 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { 479 | font-family: "Droid Sans", sans-serif; 480 | height: 250px; 481 | padding: 4px; 482 | display: block; 483 | clear: both; 484 | } 485 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { 486 | display: block; 487 | clear: both; 488 | } 489 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { 490 | float: none; 491 | clear: both; 492 | overflow: hidden; 493 | display: block; 494 | } 495 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { 496 | display: block; 497 | float: left; 498 | clear: none; 499 | margin: 0; 500 | padding: 0; 501 | } 502 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { 503 | display: block; 504 | float: left; 505 | clear: none; 506 | margin: 0 5px 0 0; 507 | } 508 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { 509 | color: black; 510 | } 511 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { 512 | display: block; 513 | clear: both; 514 | width: auto; 515 | padding: 0 0 3px; 516 | color: #666666; 517 | } 518 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { 519 | padding-left: 3px; 520 | color: #888888; 521 | } 522 | .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { 523 | margin-left: 0; 524 | font-style: italic; 525 | font-size: 0.9em; 526 | margin: 0; 527 | } 528 | .swagger-ui-wrap form.formtastic fieldset.buttons { 529 | margin: 0; 530 | padding: 0; 531 | } 532 | .swagger-ui-wrap span.blank, 533 | .swagger-ui-wrap span.empty { 534 | color: #888888; 535 | font-style: italic; 536 | } 537 | .swagger-ui-wrap .markdown h3 { 538 | color: #547f00; 539 | } 540 | .swagger-ui-wrap .markdown h4 { 541 | color: #666666; 542 | } 543 | .swagger-ui-wrap .markdown pre { 544 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 545 | background-color: #fcf6db; 546 | border: 1px solid #e5e0c6; 547 | padding: 10px; 548 | margin: 0 0 10px 0; 549 | } 550 | .swagger-ui-wrap .markdown pre code { 551 | line-height: 1.6em; 552 | } 553 | .swagger-ui-wrap div.gist { 554 | margin: 20px 0 25px 0 !important; 555 | } 556 | .swagger-ui-wrap ul#resources { 557 | font-family: "Droid Sans", sans-serif; 558 | font-size: 0.9em; 559 | } 560 | .swagger-ui-wrap ul#resources li.resource { 561 | border-bottom: 1px solid #dddddd; 562 | } 563 | .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, 564 | .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { 565 | color: black; 566 | } 567 | .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, 568 | .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { 569 | color: #555555; 570 | } 571 | .swagger-ui-wrap ul#resources li.resource:last-child { 572 | border-bottom: none; 573 | } 574 | .swagger-ui-wrap ul#resources li.resource div.heading { 575 | border: 1px solid transparent; 576 | float: none; 577 | clear: both; 578 | overflow: hidden; 579 | display: block; 580 | } 581 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options { 582 | overflow: hidden; 583 | padding: 0; 584 | display: block; 585 | clear: none; 586 | float: right; 587 | margin: 14px 10px 0 0; 588 | } 589 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { 590 | float: left; 591 | clear: none; 592 | margin: 0; 593 | padding: 2px 10px; 594 | border-right: 1px solid #dddddd; 595 | color: #666666; 596 | font-size: 0.9em; 597 | } 598 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { 599 | color: #aaaaaa; 600 | text-decoration: none; 601 | } 602 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { 603 | text-decoration: underline; 604 | color: black; 605 | } 606 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, 607 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, 608 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { 609 | text-decoration: underline; 610 | } 611 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, 612 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { 613 | padding-left: 0; 614 | } 615 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, 616 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { 617 | padding-right: 0; 618 | border-right: none; 619 | } 620 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, 621 | .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { 622 | padding-left: 0; 623 | } 624 | .swagger-ui-wrap ul#resources li.resource div.heading h2 { 625 | color: #999999; 626 | padding-left: 0; 627 | display: block; 628 | clear: none; 629 | float: left; 630 | font-family: "Droid Sans", sans-serif; 631 | font-weight: bold; 632 | } 633 | .swagger-ui-wrap ul#resources li.resource div.heading h2 a { 634 | color: #999999; 635 | } 636 | .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { 637 | color: black; 638 | } 639 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { 640 | float: none; 641 | clear: both; 642 | overflow: hidden; 643 | display: block; 644 | margin: 0 0 10px; 645 | padding: 0; 646 | } 647 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { 648 | float: none; 649 | clear: both; 650 | overflow: hidden; 651 | display: block; 652 | margin: 0; 653 | padding: 0; 654 | } 655 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { 656 | display: block; 657 | clear: none; 658 | float: left; 659 | width: auto; 660 | margin: 0; 661 | padding: 0; 662 | line-height: 1.1em; 663 | color: black; 664 | } 665 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { 666 | padding-left: 10px; 667 | } 668 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { 669 | color: black; 670 | text-decoration: none; 671 | } 672 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { 673 | text-decoration: underline; 674 | } 675 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { 676 | text-transform: uppercase; 677 | text-decoration: none; 678 | color: white; 679 | display: inline-block; 680 | width: 50px; 681 | font-size: 0.7em; 682 | text-align: center; 683 | padding: 7px 0 4px; 684 | -moz-border-radius: 2px; 685 | -webkit-border-radius: 2px; 686 | -o-border-radius: 2px; 687 | -ms-border-radius: 2px; 688 | -khtml-border-radius: 2px; 689 | border-radius: 2px; 690 | } 691 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { 692 | margin: 0; 693 | padding: 0; 694 | } 695 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { 696 | overflow: hidden; 697 | padding: 0; 698 | display: block; 699 | clear: none; 700 | float: right; 701 | margin: 6px 10px 0 0; 702 | } 703 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { 704 | float: left; 705 | clear: none; 706 | margin: 0; 707 | padding: 2px 10px; 708 | font-size: 0.9em; 709 | } 710 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { 711 | text-decoration: none; 712 | } 713 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { 714 | border-top: none; 715 | padding: 10px; 716 | -moz-border-radius-bottomleft: 6px; 717 | -webkit-border-bottom-left-radius: 6px; 718 | -o-border-bottom-left-radius: 6px; 719 | -ms-border-bottom-left-radius: 6px; 720 | -khtml-border-bottom-left-radius: 6px; 721 | border-bottom-left-radius: 6px; 722 | -moz-border-radius-bottomright: 6px; 723 | -webkit-border-bottom-right-radius: 6px; 724 | -o-border-bottom-right-radius: 6px; 725 | -ms-border-bottom-right-radius: 6px; 726 | -khtml-border-bottom-right-radius: 6px; 727 | border-bottom-right-radius: 6px; 728 | margin: 0 0 20px; 729 | } 730 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { 731 | font-size: 1.1em; 732 | margin: 0; 733 | padding: 15px 0 5px; 734 | } 735 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { 736 | float: none; 737 | clear: both; 738 | overflow: hidden; 739 | display: block; 740 | } 741 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { 742 | padding: 4px 0 0 10px; 743 | display: inline-block; 744 | font-size: 0.9em; 745 | } 746 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header img { 747 | display: block; 748 | clear: none; 749 | float: right; 750 | } 751 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { 752 | display: block; 753 | clear: none; 754 | float: left; 755 | padding: 6px 8px; 756 | } 757 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { 758 | outline: 2px solid black; 759 | outline-color: #cc0000; 760 | } 761 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { 762 | font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; 763 | padding: 10px; 764 | font-size: 0.9em; 765 | max-height: 400px; 766 | overflow-y: auto; 767 | } 768 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { 769 | background-color: #f9f2e9; 770 | border: 1px solid #f0e0ca; 771 | } 772 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { 773 | background-color: #c5862b; 774 | } 775 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { 776 | border-right: 1px solid #dddddd; 777 | border-right-color: #f0e0ca; 778 | color: #c5862b; 779 | } 780 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { 781 | color: #c5862b; 782 | } 783 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { 784 | background-color: #faf5ee; 785 | border: 1px solid #f0e0ca; 786 | } 787 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { 788 | color: #c5862b; 789 | } 790 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { 791 | color: #dcb67f; 792 | } 793 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { 794 | background-color: #fcffcd; 795 | border: 1px solid black; 796 | border-color: #ffd20f; 797 | } 798 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { 799 | text-transform: uppercase; 800 | background-color: #ffd20f; 801 | } 802 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { 803 | border-right: 1px solid #dddddd; 804 | border-right-color: #ffd20f; 805 | color: #ffd20f; 806 | } 807 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { 808 | color: #ffd20f; 809 | } 810 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { 811 | background-color: #fcffcd; 812 | border: 1px solid black; 813 | border-color: #ffd20f; 814 | } 815 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { 816 | color: #ffd20f; 817 | } 818 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { 819 | color: #6fc992; 820 | } 821 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { 822 | background-color: #f5e8e8; 823 | border: 1px solid #e8c6c7; 824 | } 825 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { 826 | text-transform: uppercase; 827 | background-color: #a41e22; 828 | } 829 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { 830 | border-right: 1px solid #dddddd; 831 | border-right-color: #e8c6c7; 832 | color: #a41e22; 833 | } 834 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { 835 | color: #a41e22; 836 | } 837 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { 838 | background-color: #f7eded; 839 | border: 1px solid #e8c6c7; 840 | } 841 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { 842 | color: #a41e22; 843 | } 844 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { 845 | color: #c8787a; 846 | } 847 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { 848 | background-color: #e7f6ec; 849 | border: 1px solid #c3e8d1; 850 | } 851 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { 852 | background-color: #10a54a; 853 | } 854 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { 855 | border-right: 1px solid #dddddd; 856 | border-right-color: #c3e8d1; 857 | color: #10a54a; 858 | } 859 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { 860 | color: #10a54a; 861 | } 862 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { 863 | background-color: #ebf7f0; 864 | border: 1px solid #c3e8d1; 865 | } 866 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { 867 | color: #10a54a; 868 | } 869 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { 870 | color: #6fc992; 871 | } 872 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { 873 | background-color: #FCE9E3; 874 | border: 1px solid #F5D5C3; 875 | } 876 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { 877 | background-color: #D38042; 878 | } 879 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { 880 | border-right: 1px solid #dddddd; 881 | border-right-color: #f0cecb; 882 | color: #D38042; 883 | } 884 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { 885 | color: #D38042; 886 | } 887 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { 888 | background-color: #faf0ef; 889 | border: 1px solid #f0cecb; 890 | } 891 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { 892 | color: #D38042; 893 | } 894 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { 895 | color: #dcb67f; 896 | } 897 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { 898 | background-color: #e7f0f7; 899 | border: 1px solid #c3d9ec; 900 | } 901 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { 902 | background-color: #0f6ab4; 903 | } 904 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { 905 | border-right: 1px solid #dddddd; 906 | border-right-color: #c3d9ec; 907 | color: #0f6ab4; 908 | } 909 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { 910 | color: #0f6ab4; 911 | } 912 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { 913 | background-color: #ebf3f9; 914 | border: 1px solid #c3d9ec; 915 | } 916 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { 917 | color: #0f6ab4; 918 | } 919 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { 920 | color: #6fa5d2; 921 | } 922 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, 923 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, 924 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, 925 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, 926 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, 927 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { 928 | border-top: none; 929 | } 930 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, 931 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, 932 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, 933 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, 934 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, 935 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, 936 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, 937 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, 938 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, 939 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, 940 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, 941 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { 942 | padding-right: 0; 943 | border-right: none; 944 | } 945 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, 946 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, 947 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { 948 | text-decoration: underline; 949 | } 950 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, 951 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { 952 | padding-left: 0; 953 | } 954 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, 955 | .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { 956 | padding-left: 0; 957 | } 958 | .swagger-ui-wrap p#colophon { 959 | margin: 0 15px 40px 15px; 960 | padding: 10px 0; 961 | font-size: 0.8em; 962 | border-top: 1px solid #dddddd; 963 | font-family: "Droid Sans", sans-serif; 964 | color: #999999; 965 | font-style: italic; 966 | } 967 | .swagger-ui-wrap p#colophon a { 968 | text-decoration: none; 969 | color: #547f00; 970 | } 971 | .swagger-ui-wrap h3 { 972 | color: black; 973 | font-size: 1.1em; 974 | padding: 10px 0 10px 0; 975 | } 976 | .swagger-ui-wrap .markdown ol, 977 | .swagger-ui-wrap .markdown ul { 978 | font-family: "Droid Sans", sans-serif; 979 | margin: 5px 0 10px; 980 | padding: 0 0 0 18px; 981 | list-style-type: disc; 982 | } 983 | .swagger-ui-wrap form.form_box { 984 | background-color: #ebf3f9; 985 | border: 1px solid #c3d9ec; 986 | padding: 10px; 987 | } 988 | .swagger-ui-wrap form.form_box label { 989 | color: #0f6ab4 !important; 990 | } 991 | .swagger-ui-wrap form.form_box input[type=submit] { 992 | display: block; 993 | padding: 10px; 994 | } 995 | .swagger-ui-wrap form.form_box p.weak { 996 | font-size: 0.8em; 997 | } 998 | .swagger-ui-wrap form.form_box p { 999 | font-size: 0.9em; 1000 | padding: 0 0 15px; 1001 | color: #7e7b6d; 1002 | } 1003 | .swagger-ui-wrap form.form_box p a { 1004 | color: #646257; 1005 | } 1006 | .swagger-ui-wrap form.form_box p strong { 1007 | color: black; 1008 | } 1009 | #header { 1010 | background-color: #89bf04; 1011 | padding: 14px; 1012 | } 1013 | #header a#logo { 1014 | font-size: 1.5em; 1015 | font-weight: bold; 1016 | text-decoration: none; 1017 | background: transparent url(../images/logo_small.png) no-repeat left center; 1018 | padding: 20px 0 20px 40px; 1019 | color: white; 1020 | } 1021 | #header form#api_selector { 1022 | display: block; 1023 | clear: none; 1024 | float: right; 1025 | } 1026 | #header form#api_selector .input { 1027 | display: block; 1028 | clear: none; 1029 | float: left; 1030 | margin: 0 10px 0 0; 1031 | } 1032 | #header form#api_selector .input input#input_apiKey { 1033 | width: 200px; 1034 | } 1035 | #header form#api_selector .input input#input_baseUrl { 1036 | width: 400px; 1037 | } 1038 | #header form#api_selector .input a#explore { 1039 | display: block; 1040 | text-decoration: none; 1041 | font-weight: bold; 1042 | padding: 6px 8px; 1043 | font-size: 0.9em; 1044 | color: white; 1045 | background-color: #547f00; 1046 | -moz-border-radius: 4px; 1047 | -webkit-border-radius: 4px; 1048 | -o-border-radius: 4px; 1049 | -ms-border-radius: 4px; 1050 | -khtml-border-radius: 4px; 1051 | border-radius: 4px; 1052 | } 1053 | #header form#api_selector .input a#explore:hover { 1054 | background-color: #547f00; 1055 | } 1056 | #header form#api_selector .input input { 1057 | font-size: 0.9em; 1058 | padding: 3px; 1059 | margin: 0; 1060 | } 1061 | #content_message { 1062 | margin: 10px 15px; 1063 | font-style: italic; 1064 | color: #999999; 1065 | } 1066 | #message-bar { 1067 | min-height: 30px; 1068 | text-align: center; 1069 | padding-top: 10px; 1070 | } 1071 | -------------------------------------------------------------------------------- /public/api/swagger-ui/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/public/api/swagger-ui/images/logo_small.png -------------------------------------------------------------------------------- /public/api/swagger-ui/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/public/api/swagger-ui/images/pet_store_api.png -------------------------------------------------------------------------------- /public/api/swagger-ui/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/public/api/swagger-ui/images/throbber.gif -------------------------------------------------------------------------------- /public/api/swagger-ui/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/richhollis/swagger-docs-sample/c33e1e788b8ef5a71c86610fffbb145b243a725b/public/api/swagger-ui/images/wordnik_api.png -------------------------------------------------------------------------------- /public/api/swagger-ui/lib/backbone-min.js: -------------------------------------------------------------------------------- 1 | // Backbone.js 0.9.2 2 | 3 | // (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. 4 | // Backbone may be freely distributed under the MIT license. 5 | // For all details and documentation: 6 | // http://backbonejs.org 7 | (function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= 8 | {});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= 9 | z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= 10 | {};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== 11 | b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: 12 | b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; 13 | a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, 14 | h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); 15 | return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= 16 | {};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| 17 | !this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); 18 | this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('