dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/onomondo-eim/+/43208?usp=email )


Change subject: rest_api_ressource/response_schema: fix regex for hexstring 
fields
......................................................................

rest_api_ressource/response_schema: fix regex for hexstring fields

Fields which expect a hexstring use a regex to check if the string
is hexadecimal. Some fields also require a hexstring of a certain
length. Unfortunately some of those fields still have wrong regex.

- Remove the superflous ',' in [0-9,A-F]
- Correct the length requirements

Related: SYS#8100
Change-Id: I00e1870bca6ca661897f55ecab6771e0c72935ea
---
M priv/rest_api_resource_schema.json
M priv/rest_api_response_schema.json
2 files changed, 25 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/08/43208/1

diff --git a/priv/rest_api_resource_schema.json 
b/priv/rest_api_resource_schema.json
index c66bbaa..4ddbb8e 100644
--- a/priv/rest_api_resource_schema.json
+++ b/priv/rest_api_resource_schema.json
@@ -7,7 +7,7 @@
     "eidValue": {
       "description": "EID value of the eUICC to be addressed",
       "type": "string",
-      "pattern": "^[0-9,A-F]{2,32}$"
+      "pattern": "^[0-9A-F]{32}$"
     },
     "order": {
       "description": "Order to be executed",
@@ -45,7 +45,7 @@
                         "iccid": {
                           "description": "ICCID of the profile. (ICCID in 
nibble-swapped raw format, see also ETSI TS 102 221, section 13.2)",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{18,20}$"
                         },
                         "rollback": {
                           "description": "see also GSMA SGP.32, section 3.4.1, 
subsection 'Profile Rollback Procedure'",
@@ -66,7 +66,7 @@
                         "iccid": {
                           "description": "ICCID of the profile. (ICCID in 
nibble-swapped raw format, see also ETSI TS 102 221, section 13.2)",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{18,20}$"
                         }
                       },
                       "required": [
@@ -83,7 +83,7 @@
                         "iccid": {
                           "description": "ICCID of the profile. (ICCID in 
nibble-swapped raw format)",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{18,20}$"
                         }
                       },
                       "required": [
@@ -103,14 +103,14 @@
                               "isdpAid": {
                                 "description": "AID of the ISDP (identifies a 
profile)",
                                 "type": "string",
-                                "pattern": "^[0-9,A-F]{2,32}$"
+                                "pattern": "^[0-9A-F]{2,32}$"
                               }
                             },
                             {
                               "iccid": {
                                 "description": "ICCID of the profile. (ICCID 
in nibble-swapped raw format, see also ETSI TS 102 221, section 13.2)",
                                 "type": "string",
-                                "pattern": "^[0-9,A-F]{2,32}$"
+                                "pattern": "^[0-9A-F]{18,20}$"
                               }
                             },
                             {
@@ -124,7 +124,7 @@
                         "taglist": {
                           "description": "concatonation of the BER-TLV tags 
that shall be included in the response",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         }
                       },
                       "required": [
@@ -227,7 +227,7 @@
                         "eimConfigurationData": {
                           "description": "ASN.1 encoded EimConfigurationData",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         }
                       },
                       "required": [
@@ -260,7 +260,7 @@
                         "eimConfigurationData": {
                           "description": "ASN.1 encoded EimConfigurationData",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         }
                       },
                       "required": [
@@ -290,7 +290,7 @@
               "tagList": {
                 "description": "see GSMA SGP.32, section 2.11.1.2",
                 "type": "string",
-                "pattern": "^[0-9,A-F]{2,32}$"
+                "pattern": "^[0-9A-F].*$"
               }
             },
             "required": [
diff --git a/priv/rest_api_response_schema.json 
b/priv/rest_api_response_schema.json
index 0f532d3..04ae8ce 100644
--- a/priv/rest_api_response_schema.json
+++ b/priv/rest_api_response_schema.json
@@ -95,12 +95,12 @@
                         "iccid": {
                           "description": "ICCID of the profile. (ICCID in 
nibble-swapped raw format, see also ETSI TS 102 221, section 13.2)",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{18,20}$"
                         },
                         "isdpAid": {
                           "description": "AID of the ISDP (identifies a 
profile)",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{2,32}$"
                         },
                         "profileState": {
                           "description": "usage state of the prifle",
@@ -129,7 +129,7 @@
                         "icon": {
                           "description": "icon graphic",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         },
                         "profileClass": {
                           "description": "0=test, 1=provisioning, 
2=operational",
@@ -171,17 +171,17 @@
                         "mccMnc": {
                           "description": "MCC and MNC coded as defined in 3GPP 
TS 24.008",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F]{3}$"
                         },
                         "gid1": {
                           "description": "referring to content of EF GID1 
(file identifier '6F3E') as defined in 3GPP TS 31.102",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         },
                         "gid2": {
                           "description": "referring to content of EF GID2 
(file identifier '6F3F') as defined in 3GPP TS 31.102",
                           "type": "string",
-                          "pattern": "^[0-9,A-F]{2,32}$"
+                          "pattern": "^[0-9A-F].*$"
                         }
                       },
                       "required": [
@@ -409,7 +409,7 @@
                   "iccid": {
                     "description": "ICCID of the profile. (ICCID in 
nibble-swapped raw format, see also ETSI TS 102 221, section 13.2)",
                     "type": "string",
-                    "pattern": "^[0-9,A-F]{2,32}$"
+                    "pattern": "^[0-9A-F]{18,20}$"
                   }
                 },
                 "required": [
@@ -477,12 +477,12 @@
                       "euiccInfo1": {
                         "description": "ASN.1 encoded, see GSMA SGP.22",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "euiccInfo2": {
                         "description": "ASN.1 encoded, see GSMA SGP.22 and 
GSMA SGP.32",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "rootSmdsAddress": {
                         "description": "see GSMA SGP.32",
@@ -495,27 +495,27 @@
                       "eumCertificate": {
                         "description": "ASN.1 encoded, see GSMA SGP.22",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "euiccCertificate": {
                         "description": "ASN.1 encoded, see GSMA SGP.22",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "ipaCapabilities": {
                         "description": "ASN.1 encoded, see GSMA SGP.32",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "deviceInfo": {
                         "description": "ASN.1 encoded, see GSMA SGP.32",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       },
                       "notificationsList": {
                         "description": "ASN.1 encoded, see GSMA SGP.32",
                         "type": "string",
-                        "pattern": "^[0-9,A-F]{2,32}$"
+                        "pattern": "^[0-9A-F].*$"
                       }
                     },
                     "additionalProperties": false
@@ -559,7 +559,7 @@
     "debuginfo": {
       "description": "Erlang ETS encoded debug information string, for 
debugging/diagnosis only",
       "type": "string",
-      "pattern": "^[0-9,A-F].*$"
+      "pattern": "^[0-9A-F].*$"
     }
   },
   "required": [

--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43208?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I00e1870bca6ca661897f55ecab6771e0c72935ea
Gerrit-Change-Number: 43208
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>

Reply via email to