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

CLI: Adding new command 'configuration' #771

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SatyamMattoo
Copy link
Contributor

Short Description

Added a new configuration command that retrieves and displays the configuration of a specified adaptor. The command supports flags to return the sample schema, full schema, or both.

Related issue

Fixes #711

Implementation Details

Added a new configuration command to fetch and display adaptor configurations.
The command accepts an adaptor name (with or without a version) and retrieves the full configuration from the CDN.
Constructs a sample configuration using required fields and their examples from the full schema.
Supports --schema , --sample and --both (default) flags to specify the desired output.

Command: openfn configuration @openfn/language-dhis2 -o tmp/output.json --schema

QA Notes

Unit tests added for the command options and the configuration handler function. Tested locally with various adaptors to ensure correctness.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added unit tests

@SatyamMattoo SatyamMattoo marked this pull request as draft September 13, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: add a schema command which prints configuration schema
1 participant