Swagger::HTTP::WebHandler
Inherits HTTP::Handler < Swagger::HTTP::Handler < Reference < Object
Constants
DEMO_API_URL = "https://petstore.swagger.io/v2/swagger.json"
SWAGGER_WEB_URI = "/swagger"
Constructors
new(route : String = SWAGGER_WEB_URI, api_url : String = DEMO_API_URL, asset_dir : String = assets_path)
SourceInstance methods
assets_path
Sourcecall(context)
Sourcematch_router?(context, path, method = "GET")
Sourcenot_found(context)
Sourceredirect_to(context, uri, status_code = 301)
Sourceresponse_with(context, body, headers : ::HTTP::Headers, status_code = 200)
Sourceresponse_with(context, body, content_type = "application/json", status_code = 200)
Source