Closed nkev closed 1 year ago
Hi @nkev!
Thanks for reporting this. I understand the struggle here!
There is already a very old issue: https://github.com/go-swagger/go-swagger/issues/2590 but I think the idea you are suggesting by creating a helper function makes total sense.
The idea would be to extend the generated code with a new template, and I actually gave it a try: The output is not as reliable. I would rather to just stick with it as it is and add such helper methods on application level (as you already did).
Thanks for sharing a great always up-to-date API client!
The errors returned have custom error types, e.g.
*catalog.SearchCatalogItemsBadRequest
but it's not easy to print the error messages. It just prints&{Errors:[0x14000b0a4c0]}
because the errors are pointers.Is there a better way than going through every possible error type, like below?
Perhaps a helper function is needed in this library.