Internationalization of strings

Issue #10 closed
Nat Sakimura created an issue

OpenID Connect introduced a variable name scheme for international scripts. For example, a name in Katakana script in Japanese will be represented as

    name#ja-Kana-JP

where "ja-Kana-JP" part is described in ISO script format.

My question to the list is whether do we want to continue using this scheme even on Swagger. As swagger cannot have # in the variable name, it would become like

    name%23ja-Kana-JP

etc. This may be OK, but there could be better ways as well, I suppose.

Another obvious ways to deal with it is to use map where the key is going to be the script name and value is the actual value for the parameter.

In any case, I need to find out how to put a variable as the key/name in Swagger definition. Those who knows Swagger well, please help.

Another issue that I have in mind is that what happens if Kanji arrives as "Name" in DDA endpoint. Would the application be OK with it or blows up? Read only case would probably be ok, but if you wanted to send money, for example, and there are Kanji in the Transfer message, what would happen to the US banking system?

Do we need to mandate the current Name like string restricted to ASCII?

Comments (3)

  1. Edmund Jay

    Actually, Swagger does allow # in the variable name. You just need to double quote the variable name. The bigger problem is that Swagger does not support the patternProperties that is defined as part of the JSON schema. patternProperties will allow us to specify something like name(#..)* Without patternProperties support, we might end up having to write the property names for each language/script.

    As for using the map, it would be something like the following :

    ErrorMessage: properties: longMessage: type: string shortMessage: type: string

    MultilingualErrorMessage: additionalProperties: $ref: "#/definitions/ErrorMessage"

    Error: required: - code - message properties: code: type: string message: $ref: "#/definitions/MultilingualErrorMessage"

    Error is a multi-lingual error object like :

    { "code": "dberror", "message" : {

    "en" : {
        "longMessage" : "long error message",
        "shortMessage" : "short error message",
    },
    "fr" : {
        "longMessage" : "some long message in French",
        "shortMessage" : "some short message in French"
    }
    

    }

    The additionalProperties of MultilingualErrorMessage only state that it has additional properties that are ErrorMessage objects. It doesn't state what the property name is so it can be anything. But we would need to document that the property name must be language_script format or something like that.

    The Swagger editor doesn't show additonalProperties in an obvious way.

  2. Nat Sakimura reporter
    • edited description
    • changed status to closed

    FAPI is not working on user claims any more (at least for the time being). The issue pertains to OIDC Core or eKYC/IDA.

  3. Log in to comment