Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::SwaggerController Class Reference

Serves Swagger UI and OpenAPI specification for API documentation. More...

#include <mitkSwaggerController.h>

Public Member Functions

 SwaggerController ()
 
void HandleGET_docs (const httplib::Request &req, httplib::Response &res)
 Handle GET /docs - serves Swagger UI HTML page. More...
 
void HandleGET_docs_css (const httplib::Request &req, httplib::Response &res)
 Handle GET /docs/swagger-ui.css - serves Swagger UI stylesheet. More...
 
void HandleGET_docs_js (const httplib::Request &req, httplib::Response &res)
 Handle GET /docs/swagger-ui-bundle.js - serves Swagger UI JavaScript. More...
 
void HandleGET_openapi (const httplib::Request &req, httplib::Response &res)
 Handle GET /openapi.json - serves the OpenAPI specification. More...
 

Detailed Description

Serves Swagger UI and OpenAPI specification for API documentation.

Endpoints:

  • GET /api/v1/docs -> Swagger UI HTML page
  • GET /api/v1/docs/swagger-ui.css -> Swagger UI stylesheet
  • GET /api/v1/docs/swagger-ui-bundle.js -> Swagger UI JavaScript bundle
  • GET /api/v1/openapi.json -> OpenAPI 3.0 specification

All assets are loaded from CppMicroServices bundled resources and cached in memory after first access.

Definition at line 37 of file mitkSwaggerController.h.

Constructor & Destructor Documentation

◆ SwaggerController()

mitk::SwaggerController::SwaggerController ( )

Member Function Documentation

◆ HandleGET_docs()

void mitk::SwaggerController::HandleGET_docs ( const httplib::Request &  req,
httplib::Response &  res 
)

Handle GET /docs - serves Swagger UI HTML page.

◆ HandleGET_docs_css()

void mitk::SwaggerController::HandleGET_docs_css ( const httplib::Request &  req,
httplib::Response &  res 
)

Handle GET /docs/swagger-ui.css - serves Swagger UI stylesheet.

◆ HandleGET_docs_js()

void mitk::SwaggerController::HandleGET_docs_js ( const httplib::Request &  req,
httplib::Response &  res 
)

Handle GET /docs/swagger-ui-bundle.js - serves Swagger UI JavaScript.

◆ HandleGET_openapi()

void mitk::SwaggerController::HandleGET_openapi ( const httplib::Request &  req,
httplib::Response &  res 
)

Handle GET /openapi.json - serves the OpenAPI specification.


The documentation for this class was generated from the following file: