struct Swagger::Action

Overview

Define a action

Swagger::Action.new("get", "/users", "List Users", [
  Swagger::Parameter.new("page", "query", "integer", "Current page", default_value: 1, format: "int32"),
  Swagger::Parameter.new("limit", "query", "integer", "How many items to return at one time (max 100)", default_value: 50, format: "int32"),
])

Defined in:

swagger/action.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(method : String, route : String, responses : Array(Response), summary : String? = nil, parameters : Array(Parameter)? = nil, description : String? = nil, request : Request? = nil, authorization = false, deprecated = false) #

[View source]

Instance Method Detail

def authorization : Bool #

[View source]
def authorization=(authorization) #

[View source]
def deprecated : Bool #

[View source]
def deprecated=(deprecated) #

[View source]
def description : String? #

[View source]
def description=(description) #

[View source]
def method : String #

[View source]
def method=(method) #

[View source]
def parameters : Array(Swagger::Parameter)? #

[View source]
def parameters=(parameters) #

[View source]
def request : Swagger::Request? #

[View source]
def request=(request) #

[View source]
def responses : Array(Swagger::Response) #

[View source]
def responses=(responses) #

[View source]
def route : String #

[View source]
def route=(route) #

[View source]
def summary : String? #

[View source]
def summary=(summary) #

[View source]