diff --git a/docs/index.md b/docs/index.md index ee620776..45489984 100644 --- a/docs/index.md +++ b/docs/index.md @@ -103,6 +103,18 @@ All the code snippets in this documentation assume that you have surrounded them If you omit the "catch" section, errors may not be visible. +### Parameters + +Name | Type | Description +---- | ---- | ----------- +authorization | string | *Optional* Username and password for HTTP basic authentication to the rippled server in the format **username:password**. +feeCushion | number | *Optional* Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`. +proxy | uri string | *Optional* URI for HTTP/HTTPS proxy to use to connect to the rippled server. +proxyAuthorization | string | *Optional* Username and password for HTTP basic authentication to the proxy in the format **username:password**. +servers | array\ | *Optional* Array of rippled servers to connect to. Currently only one server is supported. +trace | boolean | *Optional* If true, log rippled requests and responses to stdout. +trustedCertificates | array\ | *Optional* Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid. + ### Installation ### diff --git a/docs/src/boilerplate.md.ejs b/docs/src/boilerplate.md.ejs index 0007071f..255a8329 100644 --- a/docs/src/boilerplate.md.ejs +++ b/docs/src/boilerplate.md.ejs @@ -27,6 +27,10 @@ All the code snippets in this documentation assume that you have surrounded them If you omit the "catch" section, errors may not be visible. +### Parameters + +<%- renderSchema('input/api-options.json') %> + ### Installation ### diff --git a/src/common/schemas/input/api-options.json b/src/common/schemas/input/api-options.json index 13608725..8d9054f2 100644 --- a/src/common/schemas/input/api-options.json +++ b/src/common/schemas/input/api-options.json @@ -3,29 +3,43 @@ "title": "api-options", "type": "object", "properties": { - "trace": {"type": "boolean"}, - "feeCushion": {"$ref": "value"}, + "trace": { + "type": "boolean", + "description": "If true, log rippled requests and responses to stdout." + }, + "feeCushion": { + "type": "number", + "minimum": 1, + "description": "Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`." + }, "servers": { "type": "array", + "description": "Array of rippled servers to connect to. Currently only one server is supported.", "items": { "type": "string", + "description": "URI for rippled websocket port. Must start with `wss://` or `ws://`.", "format": "uri", "pattern": "^wss?://" } }, "proxy": { - "format": "uri" + "format": "uri", + "description": "URI for HTTP/HTTPS proxy to use to connect to the rippled server." }, "proxyAuthorization": { - "type": "string" + "type": "string", + "description": "Username and password for HTTP basic authentication to the proxy in the format **username:password**." }, "authorization": { - "type": "string" + "type": "string", + "description": "Username and password for HTTP basic authentication to the rippled server in the format **username:password**." }, "trustedCertificates": { "type": "array", + "description": "Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.", "items": { - "type": "string" + "type": "string", + "description": "A PEM-formatted SSL certificate to trust when connecting to a proxy." } } },