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 = [] of Swagger::Action, external_docs : Objects::ExternalDocs? = nil) #

[View source]

Instance Method Detail

def actions : Array(Swagger::Action) #

[View source]
def actions=(actions) #

[View source]
def description : String #

[View source]
def description=(description) #

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

[View source]
def external_docs=(external_docs) #

[View source]
def name : String #

[View source]
def name=(name) #

[View source]