Ring-swagger Api Documentation

Version: 0.22.3

ring.swagger.core

basepath

(basepath {:keys [scheme server-name server-port headers], :as request})

extract a base-path from ring request. Doesn’t return default ports and reads the header “x-forwarded-proto” only if it’s set to value “https”. (e.g. your ring-app is behind a nginx reverse https-proxy). Adds possible servlet-context when running in legacy app-server.

collect-models

(collect-models x)

Walks through the data structure and collects all Schemas into a map schema-name->#{values}. Note: schame-name can link to sevetal implementations.

context

(context {:keys [servlet-context]})

Context of a request. Defaults to "", but has the servlet-context in the legacy app-server environments.

fail-on-duplicate-schema!

(fail-on-duplicate-schema! schema-name values)

handle-duplicate-schemas

(handle-duplicate-schemas f schemas)

ignore-duplicate-schemas

(ignore-duplicate-schemas schema-name values)

join-paths

(join-paths & paths)

Join several paths together with “/”. If path ends with a slash, another slash is not added.

name-schemas

(name-schemas names schema)

path-params

(path-params s)

peek-schema

(peek-schema schema)

Recurisively seeks the first form with schema-name. Walks over sets, vectors and Schema predicates.

required-keys

(required-keys schema)

strict-schema

(strict-schema schema)

removes open keys from schema

swagger-path

(swagger-path uri)

with-named-sub-schemas

(with-named-sub-schemas schema)(with-named-sub-schemas schema prefix)

Traverses a schema tree of Maps, Sets and Sequences and add Schema-name to all anonymous maps between the root and any named schemas in thre tree. Names of the schemas are generated by the following: Root schema name (or a generated name) + all keys in the path CamelCased