Liking cljdoc? Tell your friends :D

ring.swagger.openapi3


convert-content-schemaclj

(convert-content-schema contents options)
source

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

endpoint-processorclj

(endpoint-processor endpoint)
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-parameterclj

(extract-parameter in model options)
source

extract-paths-and-definitionsclj

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

get-response-refclj

(get-response-ref v)
source

move-schemasclj

(move-schemas swagger)
source

OpenApiclj

source

openapi-defaultsclj

source

openapi-jsonclj

(openapi-json openapi)
(openapi-json openapi options)

Inputs: ([openapi :- (s/maybe OpenApi)] [openapi :- (s/maybe OpenApi) options :- (s/maybe Options)])

Produces openapi-json output from ring-swagger openapi3 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: ([openapi :- (s/maybe OpenApi)] [openapi :- (s/maybe OpenApi) options :- (s/maybe Options)])

Produces openapi-json output from ring-swagger openapi3 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

option-defaultsclj

source

Optionsclj

source

process-contentsclj

(process-contents content prefix)
source

remove-req-body-nameclj

(remove-req-body-name {:keys [content]})
source

remove-response-content-nameclj

(remove-response-content-name {:keys [content] :as schema})
source

remove-response-nameclj

(remove-response-name schemas)
source

security-operationsclj

(security-operations swagger)
source

security-processorclj

(security-processor endpoint)
source

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

to-responses-defnclj

(to-responses-defn responses)
source

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 builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close