usecase
usecase copied to clipboard
Clean Architecture Use Case for Go
Good afternoon. Tell me how to properly issue a usecase.NewInteractor so that output can be of different types? For example, my OpenAPI 3.0 schema describes three different types of responses....
**Describe the bug** (1) Interactor response struct with `ETag` response header... ``` ETag string `header:"ETag" json:"-" required:"true" description:"Etag."` ``` ...throws response validation error `{"header:Etag":["missing value"]}` even if `ETag` is present...
https://github.com/swaggest/usecase/blob/7dca61e871bc10d37041529cc149b259a0bf552a/generic_go1.18.go#L32-L33 After using this new generic method I got stuck with an issue with pointers. TR;DR; I think changing the following would make sense; ``` var in T u.Input =...