struct Swagger::Controller

Overview

Define a controller

Swagger::Controller.new("Users", "User APIs", [
  Swagger::Action.new("get", "/users"),
  Swagger::Action.new("get", "/users/{id}"),
  Swagger::Action.new("post", "/users"),
  Swagger::Action.new("put", "/users/{id}"),
  Swagger::Action.new("delete", "/users/{id}"),
]

Defined in:

swagger/controller.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, description : String, actions : Array(Swagger::Action) = [] of Swagger::Action, external_docs : Objects::ExternalDocs | Nil = nil) #

[View source]

Instance Method Detail

def actions : Array(Swagger::Action) #

[View source]
def actions=(actions : Array(Swagger::Action)) #

[View source]
def description : String #

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

[View source]
def external_docs : Swagger::Objects::ExternalDocs? #

[View source]
def external_docs=(external_docs : Swagger::Objects::ExternalDocs | Nil) #

[View source]
def name : String #

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

[View source]