SwagDoc is a Delphi library to generate swagger.json file for Swagger Spec version 2.0. Create a public documentation REST API using Swagger 2.0 for Delphi Language. SwagDoc's only responsibility is to generate the swagger.json file. The swagger.json file is responsible for containing all the documentation for your REST API. This file must be attached to the Swagger UI (User Interface) files.
Swagger (Open API) - version 2.0
SwagDoc follows the specification 2.0 because it is more popular in the market and also because it is considered a more stable version to exist the longest. SwagDoc does not yet support the Swagger 3.0 version, but depending on the demand and contributions to the project it may evolve to support spec 3.0.
The main prerequisite for working with SwagDoc is to know the Swagger 2.0 specification that can be viewed in the link below.
When creating a Swagger documentation for your REST API you can produce a page like the following example.
Swagger References and Tutorials
Swagger Editor: https://editor.swagger.io
Swagger Hub: https://swagger.io/tools/swaggerhub
The classic swagger sample: http://petstore.swagger.io
Tools and Integrations: https://swagger.io/tools/open-source/open-source-integrations
Swagger UI distribution files
For you to produce a page containing a Swagger documentation you need the Swagger UI distribution files.
These files you can find in the github swagger-api / swagger-ui repository.
First you need to download the swagger user interface files and generate the swagger.json file. You then need to change the index.html file to indicate the relative path of the location where the swagger.json file is located on your web server that is hosting the swagger user interface files.
See an example below.