Component generator
ByteChef command-line application
This is an application that helps you with generating components from OpenApi specifications. It is work in progress. Until the app is published, use bytechef.sh
script to execute the app.
Step-by-step guide to generate connector
- Crete new package with name of your connector in
server/apps/libs/modules/components/yourconnector
- Inside your new package create
openapi.yaml
file and write OpenAPI specification for your connector. - Change working directory to the
BYTECHEF_HOME/cli/cli-app
folder. - Generate YourConnector component/connector by executing the following command:
Setup gradle
- In file
bytechef/settings.gradle.kts
, add line:include("server:libs:modules:components:yourconnector")
- In both files
bytechef/server/ee/apps/worker-app/build.gradle.kts
andbytechef/server/apps/server-app/build.gradle.kts
, add lineimplementation(project(":server:libs:modules:components:yourconnector"))
- Load gradle changes. After that IntelliJ should recognize your connector as a java module.
Connector icon
- Find and download from internet the user interface icon in .svg format for your connector and put it in
server/libs/modules/components/yourconnector/src/main/resources/assets/yourconnector.svg
- In
YourConnectorComponentHandler.class
override methodmodifyComponent(ModifiableComponentDefinition modifiableComponentDefinition)
with
Connection
If your authentication has some custom parameters then in YourConnectorComponentHandler.class
override method modifyConnection(ModifiableConnectionDefinition modifiableConnectionDefinition)
.
For example, look at ShopifyComponentHandler.class
, DiscordComponentHandler.class
or PipelinerComponentHandler.class
.
Dynamic options
Similarly, if some parameters should have dynamic options then in YourConnectorComponentHandler.class
override method modifyProperty(ActionDefinition actionDefinition, ModifiableProperty<?> modifiableProperty)
.
For example, look at ShopifyComponentHandler.class
.
Dynamic properties
To mark some object as dynamic properties
type, set x-property-type: "dynamicProperties"
extension as part of the object definition.