diff --git a/core/v0/api/components/schemas/CancellationTerm.yaml b/core/v0/api/components/schemas/CancellationTerm.yaml index 99468cf9..cbbbadb3 100644 --- a/core/v0/api/components/schemas/CancellationTerm.yaml +++ b/core/v0/api/components/schemas/CancellationTerm.yaml @@ -1,15 +1,15 @@ description: Describes the cancellation policy of an item or an order. This can be referenced at an item or order level. type: object properties: + reason_required: + description: Indicates whether a reason is required to cancel the order + type: boolean refund_eligible: description: Indicates if cancellation will result in a refund type: boolean return_eligible: description: Indicates if cancellation will result in a return to origin type: boolean - replacement_eligible: - description: Indicates if cancellation will result in a replacement - type: boolean fulfillment_state: description: The state of fulfillment during which these terms are applicable. allOf: diff --git a/core/v0/api/components/schemas/Category.yaml b/core/v0/api/components/schemas/Category.yaml index afed8a79..0cbe5a36 100644 --- a/core/v0/api/components/schemas/Category.yaml +++ b/core/v0/api/components/schemas/Category.yaml @@ -13,5 +13,7 @@ properties: ttl: description: Time to live for an instance of this schema tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/Contact.yaml b/core/v0/api/components/schemas/Contact.yaml index 9d06b0fd..d6b0c31f 100644 --- a/core/v0/api/components/schemas/Contact.yaml +++ b/core/v0/api/components/schemas/Contact.yaml @@ -13,5 +13,7 @@ properties: type: object description: A Jcard object as per draft-ietf-jcardcal-jcard-03 specification tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/Error.yaml b/core/v0/api/components/schemas/Error.yaml index d3a10c49..ec0942d1 100644 --- a/core/v0/api/components/schemas/Error.yaml +++ b/core/v0/api/components/schemas/Error.yaml @@ -9,7 +9,7 @@ properties: description: Path to json schema generating the error. Used only during json schema validation errors message: type: string - description: Human readable message describing the error + description: Human readable message describing the error. Used mainly for logging. Not recommended to be shown to the user. required: - - type - code + - path diff --git a/core/v0/api/components/schemas/Fulfillment.yaml b/core/v0/api/components/schemas/Fulfillment.yaml index ffcc57e6..c0d58e9d 100644 --- a/core/v0/api/components/schemas/Fulfillment.yaml +++ b/core/v0/api/components/schemas/Fulfillment.yaml @@ -79,7 +79,9 @@ properties: time: $ref: "./Time.yaml" tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" domain_extns: type: object properties: diff --git a/core/v0/api/components/schemas/Intent.yaml b/core/v0/api/components/schemas/Intent.yaml index 78ad0ed3..2d7c8e95 100644 --- a/core/v0/api/components/schemas/Intent.yaml +++ b/core/v0/api/components/schemas/Intent.yaml @@ -16,5 +16,7 @@ properties: item: $ref: "./Item.yaml" tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/Item.yaml b/core/v0/api/components/schemas/Item.yaml index 9e9e6c73..9c8086ce 100644 --- a/core/v0/api/components/schemas/Item.yaml +++ b/core/v0/api/components/schemas/Item.yaml @@ -53,7 +53,9 @@ properties: ttl: description: Time to live for an instance of this schema tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" domain_extns: type: object properties: diff --git a/core/v0/api/components/schemas/Order.yaml b/core/v0/api/components/schemas/Order.yaml index d04896b5..a6144afb 100644 --- a/core/v0/api/components/schemas/Order.yaml +++ b/core/v0/api/components/schemas/Order.yaml @@ -10,6 +10,10 @@ properties: items: type: string description: ID of a previous order + type: + description: This is used to indicate the type of order being created to BPPs. Sometimes orders can be linked to previous orders, like a replacement order in a retail domain. A follow-up consultation in healthcare domain. A single order part of a subscription order. The list of order types can be standardized at the network level. Some recommendations for order types can be REPLACEMENT, FOLLOW-UP + type: string + default: DEFAULT provider: description: Details of the provider whose catalog items have been selected. allOf: @@ -68,4 +72,8 @@ properties: updated_at: type: string format: date-time + tags: + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/Person.yaml b/core/v0/api/components/schemas/Person.yaml index cb55347f..145be200 100644 --- a/core/v0/api/components/schemas/Person.yaml +++ b/core/v0/api/components/schemas/Person.yaml @@ -19,5 +19,7 @@ properties: items: $ref: "./Credential.yaml" tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/Provider.yaml b/core/v0/api/components/schemas/Provider.yaml index 1852a9d6..238b00c6 100644 --- a/core/v0/api/components/schemas/Provider.yaml +++ b/core/v0/api/components/schemas/Provider.yaml @@ -52,5 +52,7 @@ properties: description: Time to live in seconds for an instance of this schema type: integer tags: - $ref: "./Tags.yaml" + type: array + items: + $ref: "./Tag.yaml" diff --git a/core/v0/api/components/schemas/RefundTerm.yaml b/core/v0/api/components/schemas/RefundTerm.yaml index e837b999..e1117a2f 100644 --- a/core/v0/api/components/schemas/RefundTerm.yaml +++ b/core/v0/api/components/schemas/RefundTerm.yaml @@ -1,7 +1,7 @@ type: object properties: refund_within: - description: Time within which refund will be processed. + description: Time within which refund will be processed after successful cancellation. allOf: - $ref: "./Time.yaml" external_ref: diff --git a/core/v0/api/components/schemas/Tag.yaml b/core/v0/api/components/schemas/Tag.yaml new file mode 100644 index 00000000..ea781581 --- /dev/null +++ b/core/v0/api/components/schemas/Tag.yaml @@ -0,0 +1,21 @@ +description: A simple read-only key-value store which is used to contain extended metadata for search optimization, recommendations, and general information display purposes. Tags are read-only can cannot be changed once set. +type: object +properties: + namespace: + description: The namespace associated with the tag. + type: string + default: default + key: + description: The machine-readable name of the tag. Beckn protocol has reserved certain keywords from being re-defined in any namespaces. + type: string + label: + description: The human-readable name of the tag. This is usually for display purposes. + type: string + value: + description: The value of the tag key + type: string + hidden: + description: It indicates whether this tag is for display purposes or not. + type: boolean + default: false + diff --git a/core/v0/api/components/schemas/Tags.yaml b/core/v0/api/components/schemas/Tags.yaml deleted file mode 100644 index eab283a8..00000000 --- a/core/v0/api/components/schemas/Tags.yaml +++ /dev/null @@ -1,4 +0,0 @@ -description: Describes a tag. This is a simple key-value store which is used to contain extended metadata -additionalProperties: - type: string -