openapi: 3.1.1
info:
  title: CatalogSubscriptionResponse
  version: 2.0.0
  description: Container schemas fetched from beckn.yaml. This cannot be extended as it is a reserved
    schema in beckn protocol. Any additional properties added to this schema can only be made using its
    *Attributes property
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    CatalogSubscriptionResponse:
      x-iri: https://schema.nfh.global/CatalogSubscriptionResponse/v2.0
      description: 'The response envelope returned synchronously by the CS (Cataloging Service) for subscription
        management operations — create, update, list, and deactivate.


        This schema appears in the Catalog Subscription phase. The CS produces it as the synchronous response
        to POST /catalog/subscription (creation or update), GET /catalog/subscription (listing), and DELETE
        /catalog/subscription (deactivation). The DS consumes it to confirm subscription state.


        Fabric context: Produced synchronously by the CS; no async callback is delivered for subscription
        management operations. The context.action is always catalog/on_subscription.


        Relationship: Composes one or more CatalogSubscription records in the message.subscriptions array,
        and an optional Pagination object for list responses.'
      type: object
      required:
      - context
      - message
      properties:
        context:
          allOf:
          - $ref: https://schema.nfh.global/Context/v2.0/attributes.yaml#/components/schemas/Context
          - type: object
            properties:
              action:
                type: string
                const: catalog/on_subscription
        message:
          type: object
          required:
          - subscriptions
          properties:
            subscriptions:
              type: array
              items:
                $ref: https://schema.nfh.global/CatalogSubscription/v2.0/attributes.yaml#/components/schemas/CatalogSubscription
            pagination:
              $ref: https://schema.nfh.global/Pagination/v2.0/attributes.yaml#/components/schemas/Pagination
