Property definitions

nitc $ APICommand :: defaultinit
# An API Handler that use a DocCommand to respond
abstract class APICommand
	super APIHandler

	# Return the doc command to apply for self
	fun command: DocCommand is abstract

	redef fun get(req, res) do
		var command = self.command
		var status = command.http_init(req)
		if status isa CmdError then
			res.api_error(status.http_status_code, status.to_s)
			return
		end
		res.api_json(req, command.to_json)
	end
end
src/doc/api/api_model.nit:66,1--82,3