StPfeffer / rusty-roads

A simple route manager application written in Rust
MIT License
0 stars 0 forks source link

Feature Request: Add OpenAPI (Swagger) Documentation for API #98

Open StPfeffer opened 3 weeks ago

StPfeffer commented 3 weeks ago

Summary

We would like to request the addition of OpenAPI (Swagger) documentation for the API provided by this repository. OpenAPI documentation would greatly enhance the developer experience by providing a clear, interactive, and standardized way to understand and utilize the API.

Motivation

OpenAPI (formerly known as Swagger) is a specification for defining APIs. It allows both humans and computers to understand the capabilities of a service without accessing its source code, documentation, or through network traffic inspection. When OpenAPI documentation is implemented, it offers several benefits:

  1. Interactive Interface: Developers can interact with the API directly through the Swagger UI, which can help in exploring and testing endpoints.
  2. Standardization: OpenAPI is a widely adopted standard that ensures consistency and compatibility across different tools and services.
  3. Automation: OpenAPI documentation can be used to automatically generate client libraries, server stubs, and API tests, reducing development time and errors.
  4. Improved Onboarding: New developers can get up to speed more quickly with a comprehensive and interactive overview of the API endpoints and their usage.

Requirements

Implementation

  1. Define the API: Create an OpenAPI specification file (e.g., openapi.yaml or openapi.json) that describes all the endpoints, request parameters, responses, and authentication methods.
  2. Integrate Swagger UI: Set up Swagger UI to serve the OpenAPI documentation. This could be a static page in the repository or integrated into the existing web interface of the API.
  3. Automation: Consider using tools like Swagger Editor, Swagger Codegen, or similar to maintain and update the OpenAPI documentation as the API evolves.
github-actions[bot] commented 2 days ago

This issue has been marked as stale because it has been open for 14 days with no activity.