---
title: "**OpenAPI Documentation Handler for `/anything/*path`**."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/anything_path_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# **OpenAPI Documentation Handler for `/anything/*path`**.

`HEAD` `/anything/{path:.*}`

Operation ID: `anything_path_handler`

This function exists *solely* to generate the correct OpenAPI documentation for requests to `/anything/{path:.*}` (e.g., `/anything/foo/bar`). The actual requests to these wildcard paths are handled by `anything_handler`. This separation is necessary due to current limitations in `utoipa` regarding the generation of OpenAPI specs for handlers that serve both a fixed path and a wildcard path. # Path Parameters: - `path`: The subpath captured by the wildcard (e.g., "foo/bar"). # Responses: - `200 OK`: Echoes request details for the subpath. - **Note**: This handler, if ever called directly, returns `501 Not Implemented`.

## Path parameters

- `path` (string, required) - Subpath for anything endpoint
- `path:.*` (string, required)

## Responses

- `200` - Echoes request details for subpath

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /anything/{path:.*}:
    head:
      tags:
        - crate::routes::core_routes
      summary: "**OpenAPI Documentation Handler for `/anything/*path`**."
      description: >-
        This function exists *solely* to generate the correct OpenAPI
        documentation

        for requests to `/anything/{path:.*}` (e.g., `/anything/foo/bar`).

        The actual requests to these wildcard paths are handled by
        `anything_handler`.


        This separation is necessary due to current limitations in `utoipa`
        regarding

        the generation of OpenAPI specs for handlers that serve both a fixed
        path and a wildcard path.


        # Path Parameters:

        - `path`: The subpath captured by the wildcard (e.g., "foo/bar").


        # Responses:

        - `200 OK`: Echoes request details for the subpath.

        - **Note**: This handler, if ever called directly, returns `501 Not
        Implemented`.
      operationId: anything_path_handler
      parameters:
        - name: path
          in: path
          description: Subpath for anything endpoint
          required: true
          schema:
            type: string
        - name: path:.*
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Echoes request details for subpath
          content:
            application/json:
              schema: {}
```
