Liking cljdoc? Tell your friends :D

ring.swagger.swagger2


convert-operationclj

(convert-operation operation options)

Returns a map with methods as keys and the Operation maps with parameters and responses transformed to comply with Swagger spec as values

Returns a map with methods as keys and the Operation
maps with parameters and responses transformed to comply
with Swagger spec as values
sourceraw docstring

convert-parametersclj

(convert-parameters parameters options)
source

convert-responsesclj

(convert-responses responses options)
source

ensure-body-and-response-schema-namesclj

(ensure-body-and-response-schema-names swagger)

Takes a ring-swagger spec and returns a new version with a generated names for all anonymous nested schemas that come as body parameters or response models.

Takes a ring-swagger spec and returns a new version
with a generated names for all anonymous nested schemas
that come as body parameters or response models.
sourceraw docstring

ensure-body-sub-schemasclj

(ensure-body-sub-schemas route)
source

ensure-response-sub-schemasclj

(ensure-response-sub-schemas route)
source

extract-modelsclj

(extract-models swagger)
source

extract-paths-and-definitionsclj

(extract-paths-and-definitions swagger options)
source

option-defaultsclj

source

Optionsclj

source

Swaggerclj

source

swagger-defaultsclj

source

swagger-jsonclj

(swagger-json swagger)
(swagger-json swagger options)

Inputs: ([swagger :- (s/maybe Swagger)] [swagger :- (s/maybe Swagger) options :- (s/maybe Options)])

Produces swagger-json output from ring-swagger spec. Optional second argument is a options map, supporting the following options with defaults:

:ignore-missing-mappings? - (false) boolean whether to silently ignore missing schema to JSON Schema mappings. if set to false, IllegalArgumentException is thrown if a Schema can't be presented as JSON Schema.

:default-response-description-fn - ((constantly "")) - a fn to generate default response descriptions from http status code. Takes a status code (Int) and returns a String.

:handle-duplicate-schemas-fn - (ring.swagger.core/ignore-duplicate-schemas), a function to handle possible duplicate schema definitions. Takes schema-name and set of found attached schema values as parameters. Returns sequence of schema-name and selected schema value.

:collection-format - Sets the collectionFormat for query and formData parameters. Possible values: multi, ssv, csv, tsv, pipes.

Inputs: ([swagger :- (s/maybe Swagger)] [swagger :- (s/maybe Swagger) options :- (s/maybe Options)])

Produces swagger-json output from ring-swagger spec.
 Optional second argument is a options map, supporting
 the following options with defaults:

 :ignore-missing-mappings?        - (false) boolean whether to silently ignore
                                    missing schema to JSON Schema mappings. if
                                    set to false, IllegalArgumentException is
                                    thrown if a Schema can't be presented as
                                    JSON Schema.

 :default-response-description-fn - ((constantly "")) - a fn to generate default
                                    response descriptions from http status code.
                                    Takes a status code (Int) and returns a String.

 :handle-duplicate-schemas-fn     - (ring.swagger.core/ignore-duplicate-schemas),
                                    a function to handle possible duplicate schema
                                    definitions. Takes schema-name and set of found
                                    attached schema values as parameters. Returns
                                    sequence of schema-name and selected schema value.

 :collection-format               - Sets the collectionFormat for query and formData
                                    parameters.
                                    Possible values: multi, ssv, csv, tsv, pipes.
sourceraw docstring

swagger-pathclj

(swagger-path uri)

Replaces Compojure/Clout style path params in uri with Swagger style path params.

Does not support wildcard-paths or inline-regexes.

The regex is copied from Clout.

Replaces Compojure/Clout style path params in uri with Swagger style
path params.

Does not support wildcard-paths or inline-regexes.

The regex is copied from Clout.
sourceraw docstring

transform-modelsclj

(transform-models schemas options)
source

transform-operationsclj

(transform-operations f swagger)

Transforms the operations under the :paths of a ring-swagger spec by applying (f operation) to all operations. If the function returns nil, the given operation is removed.

Transforms the operations under the :paths of a ring-swagger spec by applying (f operation)
to all operations. If the function returns nil, the given operation is removed.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close