Credentials.get_schema/1 does not respect OPENFN_ADAPTORS_REPO when LOCAL_ADAPTORS=true
@stuartc is already working on this.
Since Aug 24, 2026.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
Summary
When LOCAL_ADAPTORS=true and OPENFN_ADAPTORS_REPO are set, Lightning loads adaptor code/versions from the local repo, but the credential form loads credential schemas from a completely independent path that does not respect OPENFN_ADAPTORS_REPO. As a result the credential form can render a schema that diverges from the local adaptor.
Observed behaviour
The two paths are independent:
Adaptor code (respects OPENFN_ADAPTORS_REPO):
lib/lightning/config/bootstrap.ex:206-235readsOPENFN_ADAPTORS_REPO+LOCAL_ADAPTORSintoconfig :lightning, Lightning.AdaptorRegistry, local_adaptors_repo: ...lib/lightning/adaptor_registry.ex:94(handle_continue/2) branches onlocal_adaptors_repoand callsread_adaptors_from_local_repo/1, reading from<repo_path>/packages/<package>.
Credential schemas (does NOT respect it):
lib/lightning_web/live/credential_live/credential_form_component.ex:641callsCredentials.get_schema/1.lib/lightning/credentials.ex:577-588(get_schema/1) readsApplication.fetch_env(:lightning, :schemas_path)→<schemas_path>/<schema_name>.json.schemas_pathis configured separately atlib/lightning/config/bootstrap.ex:237-243fromSCHEMAS_PATH(default./priv, i.e.priv/schemas).- That directory is populated only by
mix lightning.install_schemas, which downloadsconfiguration-schema.jsonfrom the jsdelivr CDN (lib/mix/tasks/install_schemas.ex:102-103) — i.e. the published package versions on NPM.
Nothing in the get_schema/1 path consults Lightning.AdaptorRegistry's local_adaptors_repo.
Impact
With local adaptors enabled, adaptor code/versions come from the local repo, but the credential form's schema still comes from whatever was last installed from the CDN via mix lightning.install_schemas. If a local adaptor's configuration-schema.json differs from the published version, the credential form will not reflect the local schema.
Environment
LOCAL_ADAPTORS=trueOPENFN_ADAPTORS_REPO=<path to local adaptors repo>
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.
Assessment
This issue has not been assessed yet.