ng-openapi-gen
ng-openapi-gen copied to clipboard
If-None-Match header not being set properly
The API that we're running ng-openapi-gen against supports both the If-Match and If-None-Match headers to handle concurrency issues. This is on a call-by-call basis so it is not feasible to create an HTTP Interceptor to add it to every request. But, as it stands, these headers do not appear to be implemented as expected.
The service generator picks up from Swagger that the headers could be present for a specific call, but when the call is actually made, there is an unreported error being displayed in Chromium DevTools which prevents the call from continuing.
Here is an example of a call setting the If-None-Match header:

When attempting this call through the Swagger UI, the header shows up in curl as a value completely enclosed as a string value:

It does not show as an enclosed string value via DevTools, but as the images show below, there is something in how that header is being set that's preventing the call from being processed.
The first image is with the header set to the same value as was set in Swagger, the second image doesn't not contain the header at all. As you can see, the first call never gets processed, the second call does, but with the expected error received due to not having the If-None-Match header set.


I would appreciate a review of this issue and an update as this is preventing progress from continuing on a vital project.
I'm sorry, but I don't understand exactly the problem.
We can see in the image that the header is being sent....
The fact that the CURL command shows it between quotes is just a representation.
What is the error exactly? Please, attach the error trace of both client and server.
Closed due to inactivity. In case the problem persists, please, comment again and I'll reopen it.