Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2015 17:08
Show Gist options
  • Save anonymous/7e38b6f2a67b8487ac4a to your computer and use it in GitHub Desktop.
Save anonymous/7e38b6f2a67b8487ac4a to your computer and use it in GitHub Desktop.
class ApiController < ApplicationController
include Swagger::Docs::ImpotentMethods
skip_before_action :verify_authenticity_token
class << self
#Swagger::Docs::Generator::set_real_methods
def inherited(subclass)
super
subclass.class_eval do
swagger_model :ZipCode do
property :zip_code, :string, :required, 'Zip Code'
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment