new Generator(options)
Generator for generating API endpoints
Parameters:
Name | Type | Description |
---|---|---|
options |
Options for generation |
Methods
(async) generateAPI(apiDiscoveryUri)
Generate API file given discovery URL
Parameters:
Name | Type | Description |
---|---|---|
apiDiscoveryUri |
URL or filename of discovery doc for API |
(async) generateAllAPIs()
Generate all APIs and write to files.
log()
Log output of generator. Works just like console.log.
logResult(id, message)
Write to the state log, which is used for debugging.
Parameters:
Name | Type | Description |
---|---|---|
id |
DiscoveryRestUrl of the endpoint to log |
|
message |
(async) render()
Render a nunjucks template, format it, and write to disk