@igniteconnex/ignite-openapi-viewer
v1.0.2
Published
Open API viewer for IgniteConnex
Downloads
4
Readme
ignite-openapi
This node allows to work with APIs defined by OpenAPISpec. You can set parameters within the Node-RED-UI and trigger the flow from within your flow.
Development
There are two ways to install it, inside node red editor.
1. As provided in node red Docs
Firstly you can load it in node red editor as provided in node red docs (https://nodered.org/docs/creating-nodes/first-node#lower-casespecjs).
2. Using docker
you would need to mount the file or repo to the docker volumes. Then once container starts. You would go inside container terminal and "npm install {location of node module according docker volumes}". And restart the container and you're ready to go.
Usage
1. Get the API-operations list
There are two ways to provide openAPISpec to the node depending on Endpoint Type you select
Public URL
Enter the public URL to your OpenAPI configuration (json or yaml file) and push the "Load Specification" button. That's it. You can now have hits on the created endpoints.
API Spec
Enter the Ignioteconnex API Key and openAPISpec resiurce ID and push the "Load Specification" button. That's it. You can now have hits on the created endpoints.
2. Request Validation
spec-api-router node itself handles bad requests(400) or endpoint not found (404) unautherized request (401) although it can't validate the tokens or API Keys provided but if those API Keys or Tokens isn't present in the request but is specified in openAPISpec, it'll return 401. In spec-api-router.js file there's a function "validateRequestParameters" to handle it.