Supporting adaptors with multiple configuration schemas
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
oneOfin 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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