From 74307f90f51c18660233b329d7f3971a4c11d730 Mon Sep 17 00:00:00 2001 From: Ivan Ribakov Date: Wed, 29 May 2024 08:51:03 +0200 Subject: [PATCH 1/2] Fix CapCondition schema based on the NENA-STA-010.3e-2021_i3_Stan.pdf definition --- i3-policy-store.yaml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/i3-policy-store.yaml b/i3-policy-store.yaml index 09084fb..fc242c9 100644 --- a/i3-policy-store.yaml +++ b/i3-policy-store.yaml @@ -793,18 +793,35 @@ components: - $ref: '#/components/schemas/Condition' - type: object required: - - tag + - elements properties: - tag: - type: string - enum: [Identifier, Sender, Address, InfoEventCode, InfoValueName] - operator: - type: string - enum: [EQ, SS, NE] - content: - type: string + elements: + type: object + minProperties: 1 + properties: + identifier: + $ref: '#/components/schemas/CapConditionChild' + sender: + $ref: '#/components/schemas/CapConditionChild' + address: + $ref: '#/components/schemas/CapConditionChild' + infoEventCode: + $ref: '#/components/schemas/CapConditionChild' + infoValueName: + $ref: '#/components/schemas/CapConditionChild' nonInteractive: type: boolean + CapConditionChild: + type: object + required: + - operator + - content + properties: + operator: + type: string + enum: [EQ, SS, NE] + content: + type: string CallingNumberVerificationStatusCondition: allOf: - $ref: '#/components/schemas/Condition' From 52d79e08aadbf5ec56c83f9b06dcd6876e9cad17 Mon Sep 17 00:00:00 2001 From: Ivan Ribakov Date: Mon, 12 Aug 2024 09:02:17 +0200 Subject: [PATCH 2/2] Apply PR feedback (@kejmyn) --- i3-policy-store.yaml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/i3-policy-store.yaml b/i3-policy-store.yaml index fc242c9..7167e48 100644 --- a/i3-policy-store.yaml +++ b/i3-policy-store.yaml @@ -793,30 +793,25 @@ components: - $ref: '#/components/schemas/Condition' - type: object required: - - elements + - tests properties: - elements: - type: object - minProperties: 1 - properties: - identifier: - $ref: '#/components/schemas/CapConditionChild' - sender: - $ref: '#/components/schemas/CapConditionChild' - address: - $ref: '#/components/schemas/CapConditionChild' - infoEventCode: - $ref: '#/components/schemas/CapConditionChild' - infoValueName: - $ref: '#/components/schemas/CapConditionChild' + tests: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/CapConditionTest' nonInteractive: type: boolean - CapConditionChild: + CapConditionTest: type: object required: + - tag - operator - content properties: + tag: + type: string + enum: [Identifier, Sender, Address, InfoEventCode, InfoValueName] operator: type: string enum: [EQ, SS, NE]