struct Swagger::Controller
- Swagger::Controller
- Struct
- Value
- Object
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.crConstructors
Instance Method Summary
- #actions : Array(Swagger::Action)
- #actions=(actions)
- #description : String
- #description=(description)
- #external_docs : Swagger::Objects::ExternalDocs?
- #external_docs=(external_docs)
- #name : String
- #name=(name)
Constructor Detail
def self.new(name : String, description : String, actions = [] of Swagger::Action, external_docs : Objects::ExternalDocs? = nil)
#