OpenFn / OpenFn/lightning

Supporting adaptors with multiple configuration schemas

Open
#5,025 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Almsot every adaptor has a configuration schema which defines the shape of a credential.

Occasionally an adaptor has different types of schema with different requirements. For example, Salesforce has a standard schema and an OAuth schema (the OAuth schema is baucally just access_token)

We've just added support for a service acccount in the google adaptors. Now a google adaptor can have either an access_token (from oauth) or a private_key (for a service account). See https://github.com/OpenFn/adaptors/pull/1682

These are mutually exclusive, and depending on which schema you want, different fields are required. This doesn't work so well in Lightning.

Ways we might do these things:

  • Lightning could detect and compile mutiple schema types and provide a selection on the Credential UI
  • We could support fields like oneOf in the JSON schema and show the superset of all fields
  • Allow some kind of logical grouping of properties in a schema or the UI

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Credential UI and the adaptor schema handling, then review the Google service-account adaptor changes in OpenFn/adaptors#1682. Determine how mutually exclusive schemas should be represented and selected, and define completion as credentials supporting each schema type without requiring irrelevant fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.