"/channel_groups":
    get:
        tags: [Channels]
        operationId: getPublicChannelGroups
        summary: All public channel groups
        description: Returns every publicly-visible `ChannelGroup`.
        responses:
            "200":
                description: Channel groups.
                content:
                    application/json:
                        schema:
                            type: array
                            items: { $ref: "../components/schemas/ChannelGroup.yaml" }
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }

"/channel_group/{name}":
    parameters:
        - in: path
          name: name
          required: true
          schema: { type: string }
    get:
        tags: [Channels]
        operationId: getPublicChannelGroup
        summary: One channel group
        description: Returns a `ChannelGroup` by name, including its public channels.
        responses:
            "200":
                description: Channel group.
                content:
                    application/json:
                        schema: { $ref: "../components/schemas/ChannelGroup.yaml" }
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }
            "404": { $ref: "../public-api.yaml#/components/responses/NotFound" }

"/channel/{channelId}":
    parameters:
        - in: path
          name: channelId
          required: true
          schema: { type: string }
    get:
        tags: [Channels]
        operationId: getPublicChannel
        summary: One channel (auth optional)
        description: |
            Returns a `Channel` by id. Access token is **optional** — when
            present, the response may include personalised fields
            (subscription state, entitlement gating).
        security:
            - apiKey: []
        responses:
            "200":
                description: Channel.
                content:
                    application/json:
                        schema: { $ref: "../components/schemas/Channel.yaml" }
            "401": { $ref: "../public-api.yaml#/components/responses/Unauthorized" }
            "404": { $ref: "../public-api.yaml#/components/responses/NotFound" }
