Closed paulhdk closed 3 months ago
UPDATE: I solved it in the meantime by setting up a local nginx
server, updating the openapi.yaml
accordingly, and intercepting the requests for inspection.
@paulhdk Sorry I didn't get to this sooner; I was out on vacation.
Glad you found a solution to your problem.
To answer your original question, though: you can achieve this in Swift OpenAPI by making use of a middleware. We have an example project that shows how to do this:
A word of caution when implementing logging middleware:
Question
Is it possible to somehow generate debug output, e.g., printing JSON data that is sent in the final request by the generated code?
I'm currently trying to debug an HTTP 400 response, and I wasn't able to find something in the other issue re: debug output.
Many thanks!