Skip to content

Commit

Permalink
feat: add nationality def in common fields and in customer fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cambio-deca committed Nov 27, 2023
1 parent b777310 commit 0815b5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions maas-schemas/schemas/core/components/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@
"type": "object",
"properties": {},
"additionalProperties": false
},
"nationality": {
"description": "ISO 3166-1 alpha-2 country code, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2",
"type": "string",
"pattern": "^[A-Z]{2,2}$",
"examples": ["FI", "GB"],
"invalid": {
"IiI=": "empty string",
"IvCfkqki": "emoji",
"ImZpIg==": "lower case alpha-2 country code",
"IkZJTiI=": "alpha-3 country code"
}
}
}
}
3 changes: 3 additions & 0 deletions maas-schemas/schemas/core/customer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
"zipCode": {
"$ref": "https://schemas.maas.global/core/components/address.json#/definitions/zipCode"
},
"nationality": {
"$ref": "https://schemas.maas.global/core/components/common.json#/definitions/nationality"
},
"locale": {
"$ref": "https://schemas.maas.global/core/components/i18n.json#/definitions/locale"
},
Expand Down

0 comments on commit 0815b5f

Please sign in to comment.