metal-stack-cloud / api

MIT License
1 stars 0 forks source link

Wild idea: No specific requests in API definition, only resources #22

Closed Gerrit91 closed 10 months ago

Gerrit91 commented 2 years ago

This would be breaking, but while I was working with the CLI stuff quite a lot, I am wondering if it would be better and more robust to just define a single resource describing the state instead of having individual requests like "createClusterRequest", which are different from the actual entity and update requests.

Having a resource describing the whole state and just modifying this resource is also how Kubernetes does it and I think it makes it much less error-prone when we want to provide functionality like apply for a CLI / more consistent for users who want to do infrastructure as code.

Does anybody have an opinion on this?

majst01 commented 2 years ago

For cli this would be probably easier, but i guess for the frontend devs this is a nightmare

Maybe both ?

mwindower commented 1 year ago

Gerrit will gather pros/cons, then we will discuss

Gerrit91 commented 10 months ago

It's now too late, we cannot change this anymore I think.