core
core copied to clipboard
firmware: simplify controller and move logic and validation to model
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I have searched the existing issues and I am convinced that mine is new.
Is your feature request related to a problem? Please describe.
Our firmware API controller contains the data definitions and validations at the moment, which is how we started with our firmware code in one of the initial releases before the model implementation was finished. To ease maintenance and simplify controller code it would be a good idea to move the data validation artifacts to a model, an empty placeholder is already created in https://github.com/opnsense/core/commit/eb1f41f449bf49454376e952287f74d2b254d0d2.
Describe the solution you like
Start simple, move data definitions and validation.
Describe alternatives you considered
none.
Additional context
none