- markdown2html() ⇒
string
Turns Markdown into HTML
- log()
Logs input to server logs to stdout
- logError()
Logs input to server as error to stderr
- getPayloadExamples() ⇒
object
Extracts example from the message payload
- getHeadersExamples() ⇒
object
Extracts example from the message header
- generateExample() ⇒
string
Generate string with example from provided schema
- oneLine() ⇒
string
Turns multiline string into one liner
- docline() ⇒
string
Generate JSDoc from message properties of the header and the payload
- replaceServerVariablesWithValues() ⇒
string
Helper function to replace server variables in the url with actual values
Turns Markdown into HTML
Kind: global function
Returns: string
- HTML string
Md: string
- String with valid Markdown syntax
Logs input to server logs to stdout
Kind: global function
Str: string
Info that is logged
Logs input to server as error to stderr
Kind: global function
Str: string
Info that is logged
Extracts example from the message payload
Kind: global function
Msg: object
- Parser Message function
Extracts example from the message header
Kind: global function
Msg: object
- Parser Message function
Generate string with example from provided schema
Kind: global function
Schema: object
- Schema object as JSON and not Schema model map
Options: object
- Options object. Supported options are listed here https://github.com/Redocly/openapi-sampler#usage
Turns multiline string into one liner
Kind: global function
Str: string
- Any multiline string
Generate JSDoc from message properties of the header and the payload
Kind: global function
Returns: string
- JSDoc compatible entry
Field: object
- Property object
Fieldname: string
- Name of documented property
Scopepropname: string
- Name of param for JSDocs
Example
docline(
Schema {
_json: {
type: 'integer',
minimum: 0,
maximum: 100,
'x-parser-schema-id': '<anonymous-schema-3>'
}
},
my-app-header,
options.message.headers
)
Returned value will be -> * @param {integer} options.message.headers.my-app-header
Helper function to replace server variables in the url with actual values
Kind: global function
Url: string
- url string
Serverservervariables: Object
- Variables model map