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
# api/documentation/spaceships/index.rb | |
module Api::Documentation::Spaceships::Index | |
extend ActiveSupport::Concern | |
included do | |
api :GET, "/api/spaceships", "Get a list of awesome spaceships!" | |
param :limit, Integer, desc: "How many awesome spaceships do you want?" | |
param :offset, Integer, desc: "By how many awesome spaceships do you want to offset your query?" | |
error code: 404, desc: "Spaceship not found! Must have been destroyed." | |
error code: 500, desc: "Unplanned Alien invasion reduced our spaceships fleet..." |