AllenNeuralDynamics / aind-metadata-entry-js

Metadata entry using javascript
https://metadata-entry.allenneuraldynamics.org
MIT License
1 stars 1 forks source link

Does not render dict fields #91

Closed mekhlakapoor closed 1 year ago

mekhlakapoor commented 1 year ago

Describe the bug In the ophys rig schema, the field "software parameters" expects a dictionary. However, the app renders no input field for it. Because there is no input area for this field, users are unable to submit ophys rig forms

Expected behavior Find out what the expected dict looks like

Screenshots Screen Shot 2023-06-29 at 11 26 18 AM

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

jtyoung84 commented 1 year ago

This might be difficult to do in the ui. You can add a property to the schema to let the ui know which type of object to render:

class Software(AindModel):
    """Description of generic software"""

    name: str = Field(..., title="Software name")
    version: str = Field(..., title="Software version")
    parameters: Optional[dict] = Field(..., title="Software parameters", additionalProperties={"type": "string"})
jtyoung84 commented 1 year ago

@mekhlakapoor I created this ticket if you want to update the schema while fixing some other issues with device.py: https://github.com/AllenNeuralDynamics/aind-data-schema/issues/390

mekhlakapoor commented 1 year ago

Closed because its issue #390 on aind-data-schema