Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create config generator script for os contribution #742

Merged
merged 17 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions oscontrib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to RudderStack

Thanks for taking the time for contributing to this project!

## How you can contribute a destination to this project

To contribute a destination, you need to provide the all the required data for all the fields you want as the settings to configure the destination.
krishna2020 marked this conversation as resolved.
Show resolved Hide resolved

## How you can provide your destination connection setting details

You can checkout the sample input file [**here**](https://github.com/rudderlabs/rudder-integrations-config/blob/config-generator-script/oscontrib/inputFile.json):
ujjwal-ab marked this conversation as resolved.
Show resolved Hide resolved

In the input file, you need to provide the destination name you want to display in the UI in the displayName field.

Each json object inside the formFields represents a field you want to add as a connection/configuration settings to the destination.

Description of Keys inside each JSON object:

| Property | Description |
| ------------- | -------------------------------------------------------------------------------------- |
| type | This is the input field type you want to add |
krishna2020 marked this conversation as resolved.
Show resolved Hide resolved
| label | This is the display name for your field |
| configKey | This is the key to which the value for this field will be stored in the db |
| required | You can provide true as a value to make this field as required or false |
| placeholder | This is the the placeholder for this field |
| secret | You can provide true as a value to make this field as secret or false |
| preRequisites | You can add the configKey and value if you there is a preRequiste field for this field |

You can also contribute to any open-source RudderStack project. View our [**GitHub page**](https://github.com/rudderlabs) to see all the different projects.

## Getting help

For any questions, concerns, or queries, you can start by asking a question in our [**Slack**](https://rudderstack.com/join-rudderstack-slack-community/) community.
1 change: 1 addition & 0 deletions scripts/configGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def appendFieldsInGroups(settings, field):
if groups:
first_group = groups[0]
if "fields" in first_group:
del field['required']
first_group["fields"].append(field)


Expand Down
4 changes: 2 additions & 2 deletions test/configData/inputData.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"type": "textInput",
"label": "Label2",
"configKey": "key2",
"required": "false",
"required": false,
"regex": "^(.{1,100})$",
"placeholder": "value2",
"secret": false,
Expand All @@ -56,7 +56,7 @@
"type": "textInput",
"label": "Label4",
"configKey": "key4",
"required": "false",
"required": false,
"regex": "^(.{1,100})$",
"placeholder": "value4",
"secret": false,
Expand Down
4 changes: 0 additions & 4 deletions test/configData/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"type": "textInput",
"label": "Label1",
"configKey": "key1",
"required": true,
"regex": "^(.{1,100})$",
"placeholder": "value1",
"secret": false,
Expand All @@ -26,7 +25,6 @@
"type": "textInput",
"label": "Label3",
"configKey": "key3",
"required": true,
"regex": "^(.{1,100})$",
"placeholder": "value3",
"secret": false,
Expand Down Expand Up @@ -54,7 +52,6 @@
"type": "textInput",
"label": "Label2",
"configKey": "key2",
"required": "false",
"regex": "^(.{1,100})$",
"placeholder": "value2",
"secret": false,
Expand All @@ -64,7 +61,6 @@
"type": "textInput",
"label": "Label4",
"configKey": "key4",
"required": "false",
"regex": "^(.{1,100})$",
"placeholder": "value4",
"secret": false,
Expand Down