MCPcopy Create free account
hub / github.com/MITK/MITK / IsValidMxNWindowId

Function IsValidMxNWindowId

Modules/RESTAPI/src/mitkRenderingController.cpp:1523–1526  ·  view source on GitHub ↗

* \brief True if `id` matches the canonical MxN window-id pattern from the * OpenAPI spec (`^[A-Za-z][A-Za-z0-9.-]*__[A-Za-z0-9_.-]+$`). * * Mirrors the `MxNWindowName` parameter pattern in `openapi.json` so that * malformed ids are rejected at the controller boundary with 400 * INVALID_REQUEST, before any UI-thread dispatch. Well-formed but unknown * ids fall through and

Source from the content-addressed store, hash-verified

1521 * ids fall through and surface from the bridge as 404 RENDER_WINDOW_NOT_FOUND.
1522 */
1523 bool IsValidMxNWindowId(const std::string& id)
1524 {
1525 return std::regex_match(id, kMxNWindowIdPattern);
1526 }
1527
1528 nlohmann::json MxNWindowInfoToWindowsListJson(const std::vector<mitk::MxNWindowInfo>& windows)
1529 {

Calls

no outgoing calls

Tested by

no test coverage detected