This repository contains a Flask application that generates documentation and serves as a microservice for the SALEM project.
The Flask Docs Generator Microservice is designed to generate documentation for various services and act as a microservice within the SALEM project. This application provides a streamlined way to generate and serve documentation, ensuring that all necessary information is readily accessible.
.
├── app.py
├── requirements.txt
├── dockerfile
├── credentials/
│   └── ...
├── examples/
│   └── ...
├── venv/
│   └── ...
├── example/
│   └── ...
├── static/
│   ├── assets
│   │   └── ...
│   ├── data-esp
│   │   └── ...
│   ├── data-esp
│   │   └── ...
│   ├── fonts
│   │   └── ...
│   └── signatures
│       └── ...
├── tests/
│   └── ...
└── templates/
    ├── base.html
    ├── deliveryReceipt-list.html
    ├── deliveryReceipt.html
    ├── contract.html
    ├── contract-list.html
    ├── invoice-list.html
    └── invoice.html
- Generate documentation for various services.
- Serve documentation through a simple API.
- Easy to integrate into the SALEM project.
- Built with Flask and supports both Python and HTML.
To install and run the Flask Docs Generator Microservice, follow these steps:
- 
Clone the repository: git clone https://github.com/fabiliria280802/docs-generate-flask.git cd docs-generate-flask
- 
Create a virtual environment: python3 -m venv venv # On windows use `python -m venv venv ` source venv/bin/activate # On Windows use `.\venv\Scripts\activate` 
- 
Install the dependencies: pip install -r requirements.txt # On Windows use ` python -m pip install -r requirements.txt`
If your are having any trouble with installing the dependencies for linux/Mac, try using:
```bash
python3 -m pip install -r requirements.txt
```
- 
Run the Flask application: flask run --port=5500 # On Windows use `python -m flask --app .\app.py run`
If your are having any trouble with running teh app on linux/Mac, try using the command for windows:
```bash
 python3 -m flask --app .\app.py run
```
The application will be available at http://127.0.0.1:5000.
Once the application is running, you can use the provided API endpoints to generate and retrieve documentation.
curl http://127.0.0.1:5000/generate-docs -d "service_name=example_service"- 
POST /generate-docs: Generate documentation for a specified service.- Request Body:
- service_name(string): The name of the service for which to generate documentation.
 
- Response: The generated documentation in HTML format.
 
- Request Body:
- 
GET /docs/<service_name>: Retrieve documentation for a specified service.- URL Parameters:
- service_name(string): The name of the service for which to retrieve documentation.
 
- Response: The documentation in HTML format.
 
- URL Parameters:
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -m 'Add some feature').- We recommend the use of key words at the begin of the commit like feat, fix, bug, ect.
 
- Push to the branch (git push origin feature-branch).
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.