AzuCLI::Generate::Endpoint
Inherits Reference < Object
Endpoint generator that creates Azu::Endpoint structs
Constants
OUTPUT_DIR = "./src/endpoints"
Constructors
new(name : String, actions : Array(String) = [] of String, endpoint_type : String = "api", scaffold : Bool = false, module_name : String | Nil = nil)
SourceInstance methods
action
Sourceaction=(action : String)
Sourceactions
Sourceactions=(actions : Array(String))
Sourceendpoint_type
Sourceendpoint_type=(endpoint_type : String)
Sourcefields
Sourcefields=(fields : Hash(String, String))
Sourcemodule_name
Sourcemodule_name=(module_name : String)
Sourcename
Sourcename=(name : String)
Sourcerender(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
Override render to create one file per action
request_type
Get the request/response types based on endpoint type (nested under resource module)
resource_plural
Sourceresource_plural=(resource_plural : String)
Sourceresource_singular
Sourceresource_singular=(resource_singular : String)
Sourceresponse_type
Sourcescaffold
Sourcescaffold=(scaffold : Bool)
Sourcesnake_case_name
Sourcesnake_case_name=(snake_case_name : String)
Source