@azure/api-management-custom-widgets-scaffolder package
Interfaces
| CustomWidgetCommonConfig |
Main data which DevPortal needs for every custom widget. |
| DeploymentConfig |
Data needed for deployment. |
| Options |
Miscellaneous data for scaffolding of a custom widget which will not be stored in DevPortal. |
Type Aliases
| ScaffoldTech |
All supported technologies to scaffold a widget in. |
Functions
| display |
Converts user defined name of a custom widget to a unique ID, which is in context of Dev Portal known as "name". Prefix "cw-" to avoid conflicts with existing widgets. |
| generate |
Generates a scaffold project of Custom widget for API Managements' Dev Portal. |
| widget |
Returns name of the folder for widget project. |
Variables
| OVERRIDE_DEFAULT_PORT | Default port for running local dev server on. |
| OVERRIDE_PORT_KEY | Unique identifier under which is specified which port to use for injecting locally hosted custom widget to a running DevPortal instance. |
| TECHNOLOGIES | List of all supported technologies to scaffold a widget in. |
Function Details
displayNameToName(string)
Converts user defined name of a custom widget to a unique ID, which is in context of Dev Portal known as "name". Prefix "cw-" to avoid conflicts with existing widgets.
function displayNameToName(displayName: string): string
Parameters
- displayName
-
string
User defined name of the custom widget.
Returns
string
generateProject(CustomWidgetCommonConfig, DeploymentConfig, Options)
Generates a scaffold project of Custom widget for API Managements' Dev Portal.
function generateProject(widgetConfig: CustomWidgetCommonConfig, deploymentConfig: DeploymentConfig, options?: Options): Promise<void>
Parameters
- widgetConfig
- CustomWidgetCommonConfig
JSON object with data required by DevPortal to handle a widget integration.
- deploymentConfig
- DeploymentConfig
JSON object with data for deployment.
- options
- Options
JSON object with other data, which will not be stored in the DevPortal.
Returns
Promise<void>
widgetFolderName(string)
Returns name of the folder for widget project.
function widgetFolderName(name: string): string
Parameters
- name
-
string
name of the widget
Returns
string
Variable Details
OVERRIDE_DEFAULT_PORT
Default port for running local dev server on.
OVERRIDE_DEFAULT_PORT: 3000
Type
3000
OVERRIDE_PORT_KEY
Unique identifier under which is specified which port to use for injecting locally hosted custom widget to a running DevPortal instance.
OVERRIDE_PORT_KEY: "MS_APIM_CW_localhost_port"
Type
"MS_APIM_CW_localhost_port"
TECHNOLOGIES
List of all supported technologies to scaffold a widget in.
TECHNOLOGIES: ScaffoldTech[]