camaraproject / KnowYourCustomer

Repository to describe, develop, document and test the KnowYourCustomer API family
Apache License 2.0
7 stars 5 forks source link

Country attribute variation #66

Open ToshiWakayama-KDDI opened 3 months ago

ToshiWakayama-KDDI commented 3 months ago

Problem description

KYC Match/Fill-in v0.1.0 APIs have Country attribute. Some other CAMARA APIs have countryCode and countryNama. Should KYC Match/Fill-in APIs be in line with these, or not?

Also, for countryCode, there are two types used commonly, i.e. alpha-2 and alpha-3. Which should we use, if we introduce the counctyCode attribute.

Best regards, Toshi KDDI

GillesInnov35 commented 3 months ago

Hi @ToshiWakayama-KDDI, as you mentioned Device-Status API has specified country with the 2 attributes below

CountryCode:
  description: The Mobile country code (MCC) as an geographic region identifier for the country and the dependent areas.
  type: integer

CountryName:
  description: The ISO 3166 ALPHA-2 country-codes of mapped to mobile country code(MCC). If there is mapping of one MCC to multiple countries, then we have list of countries. If there is no mapping of MCC to any country, then an empty array [] shall be returned..
  type: array
  items:
    type: string

ISO 3166 ALPHA-2 has been chosen. According to a previous discussion we had, decision might be made by Commonalities guidelines. We can note that TMF has also worked on this notion (see below) and next it has been specified for the Operate API defined for Telco API and presented at MWC.

TMF Definiton of the attribute in a schema:

        countryCode:
          $ref: '#/components/schemas/ISO31661Alpha2StandardIdentifier'

ISO31661Alpha2StandardIdentifier schema:

ISO31661Alpha2StandardIdentifier:
  allOf:
    - $ref: '#/components/schemas/Extensible'
    - type: object
      description: >-
        The corresponding identification of the resource in different standard, regulatory
        definitions. The standard specification identifier (e.g., ISO 3166-1 Alpha-2) and the
        corresponding value (e.g., BE) relevant to a particular resource.
      properties:
        value:
          type: string
          description: The value of the resource in the ISO 3166-1 Alpha 2 standard
          pattern: '[A-Z]{2}'
          example: GB
GillesInnov35 commented 3 months ago

specialization of generic schema TMF countryCode et StandardIdentifier :

            "countryCode": {
                "type": "array",
                "items": {
                    "$ref": "./StandardIdentifier.schema.json#/definitions/StandardIdentifier"
                },
                "description": "Country codes are short alphabetic or numeric geographical codes (geocodes) developed to represent countries and dependent areas, for use in data processing and communications. Several different systems have been developed to do this. The term country code frequently refers to ISO 3166-1 alpha-2 or international dialing codes, the E.164 country calling codes."
            },

definition of StandardIdentifier.schema.json

"$schema": [http://json-schema.org/draft-07/schema#](https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjson-schema.org%2Fdraft-07%2Fschema%23&data=05%7C02%7Cgilles.renoux%40orange.com%7C182d64fc7503497b318308dc28f25e56%7C90c7a20af34b40bfbc48b9253b6f5d20%7C0%7C0%7C638430268631843942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=4vhNlv%2BlheobT7UjBBKGBB%2BGHT6K13YiVl%2BDSouCx5M%3D&reserved=0),
"$id": "StandardIdentifier.schema.json",
"title": "StandardIdentifier",
"definitions": {
  "StandardIdentifier": {
    "$id": "#StandardIdentifier",
    "description": "The corresponding identification of the resource in different standard, regulatory definitions. The standard specification identifier (e.g., ISO 3166-1 Alpha-2) and the corresponding value (e.g., BE) relevant to a particular resource. It is anticipated that multiple standards can provide definitions for a single entity, e.g., a country identifier can be specified in various standards (e.g., \"ISO 3166-1 Alpha 2\",  \"ISO 3166-1 Alpha 3\", \"ISO 3166-1 Numeric\")",
    "type": "object",
    "properties": {
      "format": {
        "type": "string",
        "description": "Standard/Regulatory definition identifier. e.g., ISO 3166-1",
        "examples": [
          "ISO 3166-1",
          "ISO 3166-1 Alpha 2",
          "ISO 3166-1 Alpha 3",
          "ISO 3166-1 Numeric"
        ]
      },
      "value": {
        "type": "string",
        "description": "The value of the resource in the corresponding standard.e.g., a country code value",
        "examples": [
          "GB"
        ]
      }
    },
    "allOf": [
      {
        "$ref": "../Common/Entity.schema.json#/definitions/Entity"
      }
    ]
  }
}

BR Gilles

fernandopradocabrillo commented 3 months ago

From TEF perspective we also think we should align with alpha-2