Optional
cacheThe statically known cache policy. Use "dynamic"
if the policy is determine dynamically.
Optional
credentialsControls how browsers deal with credentials.
Optional
deprecatedIf true
or a string
, use of this Api is deprecated and usage should be discontinued as soon as possible. A string value may be
used to document why the deprecation occurred and/or preferred upgrade strategies and APIs.
Optional
descriptionA description, which can be used by code generation tools to generate documentation
Optional
exampleAn example, which can be used by code generation tools to generate documentation
Optional
isIf true
, it's safe to retry this API any time.
A name that can be used to describe this API, when logging for example
Optional
requestThe type of request to make.
The responsibility for encoding requests is handled by separate packages, such as
yaschema-api-fetcher, but generally, for "form-data"
, body fields will be
encoded similarly to how query fields are sent. That is, one should generally use setAllowedSerializationForms
on numbers and
booleans, since primitives are encoded as strings and arrays will be sent using the []
suffixed field names. Unlike queries
however, form data supports Files. express-yaschema-api-handler
and yaschema-api-fetcher also support JSON-encoded form data fields, which are
automatically prefixed with yaschema/json:
(for encoding objects and nested arrays, for example).
Optional
responseThe type of response that will be generated. Use "dynamic"
if the response type will be determined dynamically.
The type of route, which will be used to select a URL base and is configurable using setUrlBaseForRouteType
The URL for accessing this API, which may be relative to a URL base configuring for the routeType
. Use {…}
syntax to mark
parameters, as you might with Express.
An HTTP API description