anomaly / gallagher

The missing toolkit for extending Gallagher Command Centre, featuring a CLI, SQL interface, TUI and a Python idiomatic SDK
https://anomaly.github.io/gallagher/
MIT License
11 stars 2 forks source link

Make the list of fields in a response configurable #36

Open devraj opened 4 months ago

devraj commented 4 months ago

Is your feature request related to a problem? Please describe. Many of the endpoints allow providing a list of fields to the request, which varies the size of the response payload (see alarms). We should support this as part of the API calls.

Describe the solution you'd like At the moment the pyndatic models expect all of the fields to exists, we will have to study how to temporarily relax the validation requirements of pydantic models. I would rather not have to duplicate the models for the two use cases.

Provide a pythonic manner to provide the list of fields (rather than strings), again we might have to lean into the pydantic models and how they make the meta data available to the application.

Describe alternatives you've considered NA

Additional context NA