Hello,
I use an old way to create my Xdata-Server, like this:
SparkleServer := THttpSysServer.Create;
Module := TXDataServerModule.Create(mResource, TkshSQLConnection.CreatePool(20));
// ... configure the module
TXDataModelBuilder.LoadXmlDoc(Module.XModel);
// this works:
Module.XModel.Title := 'KSH WebAPI';
Module.XModel.Version := '1.0';
Module.XModel.Description := '...';
SparkleServer.AddModule(Module);
SparkleServer.Start;
With this code I cannot find the documentation in the swaggerUI. What do I have to do to include the documentation for services or methods or objects in the swaggerui?
Regards
Harald
wlandgraf
(Wagner Landgraf)
August 16, 2022, 11:12am
2
It's described here and here .
In summary:
uses {...}, XData.OpenAPI.Service, XData.SwaggerUI.Service;
{...}
RegisterOpenAPIService;
RegisterSwaggerUIService;
Hello Wagner,
thank You for Your support. Your hint made me read the documentation over and over again - and that's when I found what was missing:
I have the xml documentation files in a subdirectory of my project and that's when I need the second parameter of the method:
TXDataModelBuilder.LoadXmlDoc(XDataServer.Model, 'C:\MyXMLFiles');
Now it works as expected.
Thanks again
Harald
1 Like
system
(system)
Closed
August 17, 2022, 11:26am
4
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.