Welcome to the api-doc Documentation repository. This repository contains files and configurations for documenting REST and SOAP APIs using Swagger UI and WSDL parsing.
This repository provides an easy-to-navigate web interface for viewing API documentation. It supports both RESTful APIs (documented using Swagger/OpenAPI) and SOAP APIs (documented using WSDL).
api-docs/
├── assets/
│ ├── openapi/
│ │ └── v3.0/
│ │ └── petstore.json
│ └── wsdl/
│ ├── globalweather.wsdl
│ └── anotherservice.wsdl
├── css/
│ └── style.css
├── js/
│ └── script.js
├── swagger/
│ ├── config.json
│ ├── swagger-ui-bundle.js
│ ├── swagger-ui-standalone-preset.js
│ └── swagger-ui.css
├── wsdl/
│ └── config.json
└── index.html
- openapi/v3.0/petstore.json: The OpenAPI (Swagger) specification file for the Petstore example API.
- wsdl/globalweather.wsdl: WSDL file for the GlobalWeather SOAP service.
- wsdl/anotherservice.wsdl: WSDL file for another SOAP service example.
- rest-custom.css: Custom CSS styles for the API documentation pages.
- swagger-ui.css: Default CSS styles provided by Swagger UI.
- rest-script.js: JavaScript file to handle the rendering of Swagger UI and WSDL parsing.
- config.json: Configuration file for Swagger UI, specifying settings like the URL of the OpenAPI specification.
- swagger-ui-bundle.js: Bundled JavaScript file provided by Swagger UI.
- swagger-ui-standalone-preset.js: Standalone preset for Swagger UI.
- swagger-ui.css: Default CSS styles provided by Swagger UI.
- config.json: Configuration file listing the WSDL files to be displayed in the documentation.
- rest.dsp: The main DSP (Dynamic Server Pages) file that structures the web interface for viewing the API documentation.
To run this project, you need:
- A web server capable of serving DSP pages (e.g., Apache Tomcat).
- Internet access to fetch external resources (e.g., Swagger UI assets).
-
Clone the Repository
git clone https://github.com/TechMechanik/api-docs.git cd api-docs
-
Configure Your Server
Ensure your web server is configured to serve DSP files and has access to the necessary directories.
-
Place Your WSDL Files
Add your WSDL files to the
assets/wsdl/
directory and updatewsdl/config.json
accordingly. -
Update Swagger Config
If needed, update the
swagger/config.json
file to point to your OpenAPI specification file.
-
Start Your Server
Start your web server and navigate to the URL where the
rest.dsp
file is served. For example:http://localhost:8080/api-docs/rest.dsp
-
Navigate the Documentation
- SOAP Section: Click on the SOAP menu items to view the parsed WSDL documentation.
- REST Section: Click on the REST menu items to view the Swagger UI documentation.
Contributions are welcome! Please create an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.