This repository provides a template for setting up Swagger UI on GitHub Pages. Swagger UI is a powerful tool for documenting and testing APIs, and with this template, you can easily deploy it on GitHub Pages to share your API documentation with others.
You can [start a new repository from the template | fork this repository | integrate the files in your own repository]. Once you have your own repository, go to Settings ► Actions ► General ► Workflow permissions and choose the option Read and write permissions.
The Github Pages Environment can be set under Settings ► Pages, the GitHub Pages site is needs to be built from the gh-pages
branch.
The Swagger YML file is in the /docs
folder, but can be placed in any other location and even be converted in JSON format with just some little adjustments to src/index.js
.
A local environment can be started with the command:
npm start
Once you have deployed your Swagger UI documentation to GitHub Pages, you can access it by visiting the following URL:
https://your-github-username.github.io/your-repository-name/
Replace your-github-username
with your actual GitHub username and your-repository-name
with the name of your repository.
- Swagger UI: Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically render Swagger-compliant documentation from an OpenAPI Specification.
- GitHub Pages: GitHub Pages allows you to host static websites directly from your GitHub repository, making it a convenient choice for hosting Swagger UI documentation.
This project is licensed under the MIT License. See the LICENSE file for more information.
The MIT License is a permissive open-source license that allows you to freely use, modify, and distribute the code. Feel free to customize this template according to your needs.