-
Notifications
You must be signed in to change notification settings - Fork 558
Description
It seems the conversion from Swagger to TypeScript incorrectly makes every parameter on request body types required. In a lot of cases the request parameters contain all of the properties that you'd expect when fetching objects, which ofter you can't use in the request body, so the only feasible workaround is to cast to with <any>
or Partial<T>
. For example, status
is required in the interface for the body for createNamespace
, which of course doesn't make sense when creating a namespace.
I'm not sure if this is an upstream issue with swagger-codegen
or the configuration, but for the library to work as expected, there probably needs to be a separation between types returned from read/list calls, and the types used for create/patch calls.
Let me know if we can help with this, we're likely to be heavy users of the library so we're happy to contribute, but would probably need some pointers to get started .)