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: enable form generation and validation using json schema #187

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

helen-m-lin
Copy link
Contributor

@helen-m-lin helen-m-lin commented Nov 26, 2024

closes #107

This PR introduces 2 new endpoints to enable form generation and validation using json schema:

  • GET /api/v1/models/{model_name}/schema
  • POST /api/v1/models/{model_name}/validate

A new on-prem service (React app) will generate and validate the form using the above endpoints. The new service can also post the job request accordingly.

NOTE: A few wrappers around aind-data-transfer-models are required for form generation. These form models:

  • inherit from aind-data-transfer-models, but updates the ConfigDict to forbid extra fields
  • skip deprecated/redundant fields
  • update some field types for render in ui

@@ -212,3 +224,40 @@ def from_airflow_task_instance(
duration=airflow_task_instance.duration,
comment=airflow_task_instance.note,
)


class ModalityConfigsForm(ModalityConfigs):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be best for these wrapper models to go in aind-data-transfer-models?

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.

Use a fillable form for users to input job submissions
1 participant