Module cowboy_swagger

cowboy-swagger main interface.

Description

cowboy-swagger main interface.

Data Types

metadata()

metadata() = trails:metadata(swagger_map())

parameter_definition_name()

parameter_definition_name() = binary()

parameter_obj()

abstract datatype: parameter_obj()

property_desc()

property_desc() = #{type => binary(), description => binary(), example => binary(), items => property_desc()}

property_obj()

property_obj() = #{binary() => property_desc()}

response_obj()

abstract datatype: response_obj()

responses_definitions()

responses_definitions() = #{binary() => response_obj()}

swagger_map()

abstract datatype: swagger_map()

Function Index

add_definition/2
schema/1
to_json/1Returns the swagger json specification from given trails.

Function Details

add_definition/2

add_definition(Name::parameter_definition_name(), Properties::property_obj()) -> ok

schema/1

schema(DefinitionName::parameter_definition_name()) -> #{}

to_json/1

to_json(Trails::[trails:trail()]) -> jsx:json_text()

Returns the swagger json specification from given trails. This function basically takes the metadata from each trails:trail() (which must be compliant with Swagger specification) and builds the required swagger.json.


Generated by EDoc, Jan 27 2017, 06:54:14.