You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can the "httpError" be added to the Expectation?
Sadly the solutions seems to be breaking:
The MockServer only accepts "httpResponse" or "httpError" in the Expectation
This means, that "httpResponse" or "httpError" must be omitted in the json
There is already a "omitempty"-flag on Response - however, this cannot be used properly.
The reason is, that the "omitempty" does not work on structs (like Response) - as structs do not have an empty value in go.
This problem could be solved using a pointer - as a pointer can be nil.
Is this repository still under development?
Are PRs welcome?
It would be nice to have "httpError" in this client.
Currently the following Expectation is implemented:
but the MockServer also supports "httpError" link - the json for this would look somehow like this:
How can the "httpError" be added to the Expectation?
Sadly the solutions seems to be breaking:
The MockServer only accepts "httpResponse" or "httpError" in the Expectation
This means, that "httpResponse" or "httpError" must be omitted in the json
There is already a "omitempty"-flag on Response - however, this cannot be used properly.
The reason is, that the "omitempty" does not work on structs (like Response) - as structs do not have an empty value in go.
This problem could be solved using a pointer - as a pointer can be nil.
This solution could look like this
The text was updated successfully, but these errors were encountered: