Skip to content

Instantly share code, notes, and snippets.

@alekseyl
Created November 8, 2017 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alekseyl/4575bcf6621f27dde862b13083a5ebb1 to your computer and use it in GitHub Desktop.
Save alekseyl/4575bcf6621f27dde862b13083a5ebb1 to your computer and use it in GitHub Desktop.
apipie quote
class UsersController < ApplicationController
resource_description do
formats [:json]
api_versions 'public'
end
api :POST, '/users' 'Create user'
description 'Create user with specifed user params'
param :user, Hash, desc: 'User information' do
param :full_name, String, desc: 'Full name of the user'
param :age, Fixnum, desc: 'Age of the user'
end
def create
# Some application code
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment