This website is built using Docusaurus 2, a modern static website generator.
$ yarn
$ yarn run vercel link
16
is required
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
API Reference component can be embedded into any .mdx
documentation file, you just need to render a component anywhere in the doc you want it to be shown.
It's best to keep the options that are being passed to in a separate .ts
file so that it's possible to typecheck it with TypeScript. The file can be imported and the props be passed from that file.
Take a look at the docs/reference/configs folder for usage examples.
- method
- required
enum("GET" | "POST" | "PUT" | "PATCH" | "DELETE")
- endpoint HTTP method
- required
- path
- required
string
- endpoint path, with leading '/'
- required
- description
string
- a short description of the endpoint
- pathParams
ApiParam[]
- an array of
ApiParam
s that are present in the endpoint path. express like syntax is used for path params (e.g. /send/:param)
- queryParams
ApiParam[]
- an array of
ApiParam
s that will be added to the path search
- bodyParam
ApiParam
- an
ApiParam
that will be used to construct the request body
- responses
- required
ApiResponse[]
- possible responses from the endpoint
- required
- status
- required
number
- the response HTTP status
- required
- description
- required
string
- short description for the response
- required
- body
ApiParam
- will be used to construct response body structure
- param
example
s will be used to construct an example JSON response automatically - can be omitted if the response has no body
- type
- required
enum("string"| "number" | "boolean" | "json" | "array" | "record" | "object" | "oneOf")
- required
- name
string
- displayName
string
- field display name that can be used to show a display name for the field in the UI even when the field has no name
- description
string
, supports markdown
- required
boolean
- shows whether the param's value is required in the request
any string value
- example
string
- default value for the param to show as an example in request builder, or a value to use to build an example response
- enum
string[]
- the values for the param are restricted to these enum values only, will show up as a dropdown instead of a free-form text field
any number value, input will be restricted to numbers only
- example
number
- default value for the param to show as an example in request builder, or a value to use to build an example response
will show up as a true/false dropdown
- example
boolean
- default value for the param to show as an example in request builder, or a value to use to build an example response
any valid json string, a freeform text field with JSON validation
- example
json
- default value for the param to show as an example in request builder, or a value to use to build an example response
allows to add any number of items of the given ApiParam
type to an array
- field
- required
ApiParam
- the type for array items
- required
allows to add any number of items of the given ApiParam
type to an object, allowing to provide the object param key for every item
- field
- required
ApiParam
- the type for object items
- required
an object with pre-defined parameters
- fields
- required
ApiParam[]
- object parameters
- required
gives the user the option to select one of the ApiParam
types and fill the data for it only
- options
- required
ApiParam[]
- all the possible options for the field type
- required