openapi: 3.1.1
info:
  title: Commitment
  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:
    Commitment:
      x-iri: https://schema.nfh.global/Commitment/v2.0
      type: object
      required:
      - status
      - resources
      - offer
      properties:
        id:
          type: string
        status:
          type: object
          properties:
            descriptor:
              allOf:
              - $ref: https://schema.nfh.global/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor
              - properties:
                  code:
                    enum:
                    - DRAFT
                    - ACTIVE
                    - CLOSED
        resources:
          type: array
          items:
            required:
            - id
            - quantity
            $ref: https://schema.nfh.global/Resource/v2.0/attributes.yaml#/components/schemas/Resource
        offer:
          required:
          - id
          - resourceIds
          $ref: https://schema.nfh.global/Offer/v2.1/attributes.yaml#/components/schemas/Offer
        commitmentAttributes:
          description: Domain-specific extension attributes for this commitment.
          allOf:
          - $ref: https://schema.nfh.global/Attributes/v2.0/attributes.yaml#/components/schemas/Attributes
          - properties: {}
