"/topic/{topicName}":
    parameters:
        - in: path
          name: topicName
          required: true
          schema: { type: string }
    get:
        tags: [Topics]
        operationId: getPublicTopic
        summary: One topic
        description: Returns the public-facing description of a `Topic`.
        responses:
            "200":
                description: Topic.
                content:
                    application/json:
                        schema: { $ref: "../components/schemas/Topic.yaml" }
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }
            "404": { $ref: "../public-api.yaml#/components/responses/NotFound" }

"/topic/{topicName}/subscribe":
    parameters:
        - in: path
          name: topicName
          required: true
          schema: { type: string }
    get:
        tags: [Topics]
        operationId: subscribeToTopic
        summary: Subscribe to a topic
        description: |
            Subscribes the calling account to the named topic. Idempotent.
            Uses GET because the VR app dispatches it from a magic-link
            redirect.
        responses:
            "200":
                description: Subscribed.
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }
            "404": { $ref: "../public-api.yaml#/components/responses/NotFound" }

"/topic/{topicName}/unsubscribe":
    parameters:
        - in: path
          name: topicName
          required: true
          schema: { type: string }
    get:
        tags: [Topics]
        operationId: unsubscribeFromTopic
        summary: Unsubscribe from a topic
        description: |
            Removes the calling account's subscription to the named topic.
            Idempotent — safe to retry.
        responses:
            "200":
                description: Unsubscribed.
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }
            "404": { $ref: "../public-api.yaml#/components/responses/NotFound" }
