From 0962ef98e073f15fdea04661996bf49b1a91b413 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 09:43:35 +0530 Subject: [PATCH 1/8] Adding reason_required flag to cancellation terms --- core/v0/api/components/schemas/CancellationTerm.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/v0/api/components/schemas/CancellationTerm.yaml b/core/v0/api/components/schemas/CancellationTerm.yaml index 99468cf9..14d358ee 100644 --- a/core/v0/api/components/schemas/CancellationTerm.yaml +++ b/core/v0/api/components/schemas/CancellationTerm.yaml @@ -1,6 +1,9 @@ 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 From cfcc13aa7ad31e5df158e385f8e787170ef798a9 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 09:44:11 +0530 Subject: [PATCH 2/8] Removing replacement_eligible flag from Cancellation Terms --- core/v0/api/components/schemas/CancellationTerm.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/v0/api/components/schemas/CancellationTerm.yaml b/core/v0/api/components/schemas/CancellationTerm.yaml index 14d358ee..cbbbadb3 100644 --- a/core/v0/api/components/schemas/CancellationTerm.yaml +++ b/core/v0/api/components/schemas/CancellationTerm.yaml @@ -10,9 +10,6 @@ properties: 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: From 13d1f02f86b344753ba1d3bbc79509a1d99e8640 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 09:45:10 +0530 Subject: [PATCH 3/8] Changed tags datatype from objects to arrays --- core/v0/api/components/schemas/Category.yaml | 4 +++- core/v0/api/components/schemas/Contact.yaml | 4 +++- core/v0/api/components/schemas/Fulfillment.yaml | 4 +++- core/v0/api/components/schemas/Intent.yaml | 4 +++- core/v0/api/components/schemas/Item.yaml | 4 +++- core/v0/api/components/schemas/Order.yaml | 4 ++++ core/v0/api/components/schemas/Person.yaml | 4 +++- core/v0/api/components/schemas/Provider.yaml | 4 +++- 8 files changed, 25 insertions(+), 7 deletions(-) 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/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..6528b4da 100644 --- a/core/v0/api/components/schemas/Order.yaml +++ b/core/v0/api/components/schemas/Order.yaml @@ -68,4 +68,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" From 4f8831a8bad13ca77bd73f54f73a7f225e0001fa Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 10:37:29 +0530 Subject: [PATCH 4/8] Updated description of error message --- core/v0/api/components/schemas/Error.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From b7e76e0830890941ba709d5924dfb24e7e65c29b Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 10:38:33 +0530 Subject: [PATCH 5/8] Added order type as an attribute --- core/v0/api/components/schemas/Order.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/v0/api/components/schemas/Order.yaml b/core/v0/api/components/schemas/Order.yaml index 6528b4da..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: From 21842c4e33c4144b93578c49047b36c154700c53 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 10:39:14 +0530 Subject: [PATCH 6/8] Updated description of RefundTerm.refund_within --- core/v0/api/components/schemas/RefundTerm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From c93b95e658b7e847e2826ae8bbe5510239011647 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 10:39:51 +0530 Subject: [PATCH 7/8] Updated Tags schema --- core/v0/api/components/schemas/Tags.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 core/v0/api/components/schemas/Tags.yaml 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 - From 50b0dd782b01fe960bde6578e1ef77760503a220 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 2 Sep 2022 10:40:50 +0530 Subject: [PATCH 8/8] Replaced Tags with Tag schema --- core/v0/api/components/schemas/Tag.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 core/v0/api/components/schemas/Tag.yaml 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 +