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 = nil, parameters : Array(Parameter) | Nil = nil, description : String | Nil = nil, request : Request | Nil = nil, authorization : Bool = false, deprecated : Bool = false) #

[View source]

Instance Method Detail

def authorization : Bool #

[View source]
def authorization=(authorization : Bool) #

[View source]
def deprecated : Bool #

[View source]
def deprecated=(deprecated : Bool) #

[View source]
def description : String? #

[View source]
def description=(description : Nil | String) #

[View source]
def method : String #

[View source]
def method=(method : String) #

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

[View source]
def parameters=(parameters : Nil | Array(Swagger::Parameter)) #

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

[View source]
def request=(request : Swagger::Request | Nil) #

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

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

[View source]
def route : String #

[View source]
def route=(route : String) #

[View source]
def summary : String? #

[View source]
def summary=(summary : Nil | String) #

[View source]