The request models for LCO/OCS still have some free-form dictionary fields with no local validation: the various extra_data fields. These are dict[Any, Any] and it's not clear to me how you are supposed to know how to fill most of them out without using the Observation Portal front-end to build your request for you.
The /api/instruments/ endpoint does contain validation rules for some of these fields per instrument in the form of a cerberbus DSL. It might be possible to parse these rules in order to generate the correct fields in Pydantic to remove the need for extra_data.
It will certainly be a challenge!
The request models for LCO/OCS still have some free-form dictionary fields with no local validation: the various
extra_datafields. These aredict[Any, Any]and it's not clear to me how you are supposed to know how to fill most of them out without using the Observation Portal front-end to build your request for you.The
/api/instruments/endpoint does contain validation rules for some of these fields per instrument in the form of a cerberbus DSL. It might be possible to parse these rules in order to generate the correct fields in Pydantic to remove the need forextra_data.It will certainly be a challenge!