We have implemented our own event to customize the definitions exported to the swagger, which removes the unit name from the definitions. This works well when we deploy to Linux, however the code isn't even called when we build for Win64.
We're deploying the PAServer on Ubuntu 20.04, and can see any changes made to the definitions.
It has been noted that when you start the server on Linux you have to use Active := True, however for Windows 64 you have to use StartListening.
Could you give some guidance with how to fix this issue?
Hard to tell what is going on, the used platform it should not make any difference.
Can you please try to reduce your project to a minimum (or create a new one from scratch) so that we can reproduce the issue at our side?
The Linux deployment generates a swagger with the correct definitions but no swagger 'required' element, whereas the Win64 version has incorrect definitions but the 'required' elements.
This is your original question. The answer is that your project has two servers: TIndySparkleHTTPServer and the SparkleHttpSysDispatcher. You are adding the middleware only to the first one, but not to the second.
The easiest way is that you add the middleware directly in the TXDataServer component, using the middleware editor.
In any case, here is the modified project with the mentioned suggestion.
I fail to see what does this comment has to do with the original comment at all. And, I cannot see what you mention here. I see "required" flag being included. So please open a new topic and provide the exact project and steps to reproduce the issue, than you.