camaraproject / SimSwap

Repository to describe, develop, document and test the Sim Swap API family
https://wiki.camaraproject.org/x/DgSeAQ
Apache License 2.0
22 stars 21 forks source link

PhoneNumber pattern - clarification on optional "+" prefix #85

Closed trehman-gsma closed 5 months ago

trehman-gsma commented 8 months ago

I am seeking clarification on the phone number pattern in the current spec. This is the schema:

    PhoneNumber:
      type: string
      pattern: '^\+?[0-9]{5,15}$'
      example: '+346661113334'
      description: Subscriber number in E.164 format (starting with country code). Optionally prefixed with '+'.

Regarding the "+" prefix:

To elaborate, please see this table that represents the options of supporting a prefix. Are all options valid?

Operator supports number with a "+" prefix Operator supports number without a "+" prefix
Option 1 Y Y
Option 2 Y N
Option 3 N Y
RubenBG7 commented 8 months ago

From TEF we apply E.164 ISO to all variables relative to phone numbers, making sure that of course the content of the variable belongs to a phone number and to validate that the phone number belongs to the OB that is receiving the request.

Then reading the other issues in SIM SWAP API and NUMBER VERIFY, this is not hte first time that this discussion is oppened.

https://github.com/camaraproject/Commonalities/issues/87 https://github.com/camaraproject/NumberVerification/issues/65#issuecomment-1794690676

eric-murray commented 8 months ago

@trehman-gsma It is up to each API to decide which features are "mandatory" to support and which are "optional". This would normally be done by specifying appropriate cucumber tests.

In this case, it makes sense for all CAMARA APIs that accept phoneNumber as an input to adopt the same requirements. That is probably a topic for the Release Management WG to discuss. I also agree that the argument for keeping the '+` optional is weak. That is a discussion for Commonalities.

hdamker commented 6 months ago

See https://github.com/camaraproject/Commonalities/pull/148 ... ready to be merged - and will make the '+' mandatory, no longer optional.