Closed pawelprazak closed 2 weeks ago
if we can code-generate a copy
method with Input
s this would solve the problem, I think
it should be possible, we can assign existing Output[A]
field to an Input[A]
field 👍
It would be great if besom allowed for tapir-like composability. In tapir, one often declares a "base" endpoint (say, with fixed security headers, error channel etc), which is then used as a base for the rest. In fact, we even use a hierarchyt of such base endpoints (e.g. baseEndpoint -> authenticatedEndpoint). In case of besom, one can imagine a similar use-case - e.g. containers sharing a particular provider, environment variables, memory settings etc. This base description could be then enriched/modified with custom values to obtain new outputs. Currently, to achieve this composability one has to wrap the instantiation of the resource into a helper method with all possible fields exposed as parameters.
As a user I expect to be able to do the following:
but the
PersistentVolumeSpecArgs
constructor is private and by extension, itscopy
method.This is easy to fix by generating an extension in codegen, e.g.:
The question is, is this a reasonable expectation, for the user to expect
copy
in this case @lbialy.