casperlundberg / dynamic-monitoring-system

1 stars 0 forks source link

SHOULD GENERATOR ONLY CREATE DATACLASS FOR CONFIGRUATION OF GENERIC REQUEST AND UI CLASSES? #31

Open casperlundberg opened 5 days ago

casperlundberg commented 5 days ago

I seems simpler and very useful.

The dataclasses can be used for response bodies structure and type-checking for them. Their instances also holds the response data for ui to gather

The generic request class can be configured from the ui object and get data from the dataclass objects. The ui object can also take a dataclass object as input and be configured from the main ui.

Something like this

Generator -> dataclass for response obj, dataclass for static values (url etc) FOR each endpoint Main ui:

casperlundberg commented 1 day ago

The dataclasses that are generated (and unique for each endpoint) will be the models for the data that the ui will access.

The http helper class will be the same for every http call, just different instances of that class.