Skip to content

[Feature request]: Add OpenAPI/Swagger Documentation for the REST API #44

@Guts

Description

@Guts

Description

I would like to request the addition of OpenAPI (Swagger) documentation for the REST API of the QGIS web application. This would greatly enhance the usability of the API by providing clear and interactive documentation for developers who are integrating or consuming the API.

Why is this needed?

  • Improved Developer Experience: OpenAPI/Swagger docs offer a clear and interactive way for developers to explore and understand the API endpoints, request formats, and expected responses. This reduces the barrier for new users to consume the API.
  • Standardization: OpenAPI is a widely adopted standard for API documentation, making it easier for developers to interact with and understand the QGIS-Django API.
  • Ease of Integration: Swagger-generated docs also allow for testing API requests directly from the documentation, which can simplify integration and troubleshooting.

Proposed Solution

  1. Generate OpenAPI Specification: Use tools like Django REST framework's built-in support for generating OpenAPI specs.
  2. Swagger UI Integration: Host the Swagger UI within the project or as part of the API endpoint, allowing developers to visualize and interact with the API.
  3. Automation: Ensure that the OpenAPI schema is updated automatically with any changes to the API endpoints, possibly via CI/CD pipelines.

Additional Context

  • Django REST framework provides an integrated solution for generating OpenAPI 3.0 specifications. Here's the official guide on OpenAPI schema generation.
  • Implementing Swagger would help align with the broader developer ecosystem and improve API consumption, making the QGIS project more accessible to a wider audience.

Additional Information

Any relevant links or references can be included here, such as:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions