Liking cljdoc? Tell your friends :D

nl.jomco.openapi.v3.media-matcher


default-syntax-suffixesclj

Map of syntax-suffix to media-type.

Media type suffixes allow the request to state a specific, possibly non-standard content-type, plus a syntax suffix that maps to a more generic standard type.

For example in a request the header

content-type: application/vnd.custom+xml

Means the request body is of type "application/vnd.custom", but it Syntax conforms to "application/xml"

The mapping of suffix (xml) to media type (application/xml) is flexible; RFC6839 describes the following mapping

See also https://datatracker.ietf.org/doc/html/rfc6839#section-3.1

Map of syntax-suffix to media-type.

Media type suffixes allow the request to state a specific, possibly
non-standard content-type, plus a syntax suffix that maps to a
more generic standard type.


For example in a request the header

   content-type: application/vnd.custom+xml

Means the request body is of type "application/vnd.custom", but it
Syntax conforms to "application/xml"

The mapping of suffix (xml) to media type (application/xml) is
flexible; RFC6839 describes the following mapping

See also https://datatracker.ietf.org/doc/html/rfc6839#section-3.1
sourceraw docstring

media-matcherclj

(media-matcher ranges)
(media-matcher ranges syntax-suffixes)

Find the matching media-type range.

Given a collection of media-type ranges, returns a matcher that given a media-type, returns the most specific matching media-type-range, or nil if no range matches.

syntax-suffixes is a map of syntax-suffix string to media-type string. If syntax-suffixes is not provided, uses default-syntax-suffixes.

Find the matching media-type range.

Given a collection of media-type ranges, returns a matcher that
given a media-type, returns the most specific matching
media-type-range, or nil if no range matches.

`syntax-suffixes` is a map of syntax-suffix string to media-type
string. If `syntax-suffixes` is not provided, uses
`default-syntax-suffixes`.
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