Tarray vs TList

The only way to do that is if you create your own Swagger endpoint. You can open unit XData.OpenApi.Service.Internal.pas and check the source code. It's simply yet another XData service operation contract and implementation. You can copy and paste such code and create your own service operation, and then after you retrieve the documentation object in this line:

    Doc := Builder.GetDocument;

You can modify the Doc object as you wish, modifying the type of the response, for example. That of course will require a deeper knowledge of Swagger and the underlying XData objects representing it.

That is similar for the Swagger UI files. It's totally separated from the swagger.json which contains the API specification. You can download the files directly from Swagger UI and serve the files yourself, somehow: GitHub - swagger-api/swagger-ui: Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API..