简体   繁体   中英

Generating documentation for a Datasnap RESTful API

I've been looking for a way to include an auto-generated documentation endpoint to an existing Delphi Datasnap RESTful API.

Can it be done? Are there annotations or external tools I can use? Where would I begin, how would I proceed? If not from within Delphi itself, can I integrate with eg Swagger?

It seems somewhat anachronistic to build a RESTful API without offering a documentation endpoint these days...

Any and all information that could help me in the right direction would be greatly appreciated.

Using Swagger, via YAML has just been added to Delphi through EMS, the latest RESTful API development option in Delphi.

https://delphiaball.co.uk/2016/04/22/swagger-yaml-delphi/

Its based on Attributes that are added to the API end points as they are defined and that in turn creates the YAML to import into Swagger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM