Created
November 8, 2017 14:31
-
-
Save alekseyl/4575bcf6621f27dde862b13083a5ebb1 to your computer and use it in GitHub Desktop.
apipie quote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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