class

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)
Source

Instance methods

assets_path
Source
call(context)
Source
match_router?(context, path, method = "GET")
Source
not_found(context)
Source
redirect_to(context, uri, status_code = 301)
Source
response_with(context, body, headers : ::HTTP::Headers, status_code = 200)
Source
response_with(context, body, content_type = "application/json", status_code = 200)
Source