generated from camaraproject/Template_API_Repository
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial contribution of Age_Verification.yaml #50
Open
ToshiWakayama-KDDI
wants to merge
44
commits into
camaraproject:main
Choose a base branch
from
ToshiWakayama-KDDI:Toshi_AgeVeri_Init
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
2c40283
Initial contribution of Age_Verification.yaml
ToshiWakayama-KDDI ed7003f
Update age-verification.yaml
GillesInnov35 0335b85
Update age-vefification.yaml
GillesInnov35 ea5d63a
Update age-vefification.yaml
GillesInnov35 da5d59c
Update age-vefification.yaml
GillesInnov35 6673fe5
Update age-vefification.yaml
GillesInnov35 ae2c024
Update age-vefification.yaml
GillesInnov35 d35564d
Update age-vefification.yaml
GillesInnov35 52f2ca6
Update age-vefification.yaml
GillesInnov35 754c2e0
Update age-vefification.yaml
GillesInnov35 82647d1
Update age-vefification.yaml
GillesInnov35 830e390
Update age-vefification.yaml
GillesInnov35 4bd8a34
Update age-vefification.yaml
GillesInnov35 c4863dd
Update age-vefification.yaml
GillesInnov35 007c6c0
Update age-vefification.yaml
GillesInnov35 abc4093
Update age-vefification.yaml
GillesInnov35 b4a2009
Update age-vefification.yaml
GillesInnov35 dd5d701
Update age-vefification.yaml
GillesInnov35 1f55416
Update age-vefification.yaml
GillesInnov35 6b6bdb0
Update age-vefification.yaml
GillesInnov35 e6a6acf
Update age-vefification.yaml
GillesInnov35 9cac56f
Update age-vefification.yaml
GillesInnov35 54ec998
Update age-vefification.yaml
GillesInnov35 35eeb39
Update age-vefification.yaml
GillesInnov35 a9ad64d
Update age-vefification.yaml
GillesInnov35 a7526d1
Update code/API_definitions/age-vefification.yaml
GillesInnov35 6b505d2
Update code/API_definitions/age-vefification.yaml
GillesInnov35 d645e58
Update code/API_definitions/age-vefification.yaml
GillesInnov35 81ff0fc
Update code/API_definitions/age-vefification.yaml
GillesInnov35 e9029f2
Update code/API_definitions/age-vefification.yaml
GillesInnov35 0f344ce
Update code/API_definitions/age-vefification.yaml
GillesInnov35 ee4538f
Update code/API_definitions/age-vefification.yaml
GillesInnov35 5d4be80
Update code/API_definitions/age-vefification.yaml
GillesInnov35 71fe78d
Update code/API_definitions/age-vefification.yaml
GillesInnov35 a38da87
Update code/API_definitions/age-vefification.yaml
GillesInnov35 bb7e933
Update age-vefification.yaml
GillesInnov35 b382392
Update age-vefification.yaml
GillesInnov35 cb50467
Update and rename age-vefification.yaml to age-verification.yaml
GillesInnov35 42b9298
Update age-verification.yaml
GillesInnov35 f9ed877
Update code/API_definitions/age-verification.yaml
GillesInnov35 a9a9787
Update code/API_definitions/age-verification.yaml
GillesInnov35 e60ddc3
Update code/API_definitions/age-verification.yaml
GillesInnov35 a0dd209
Update code/API_definitions/age-verification.yaml
GillesInnov35 22359e3
Update code/API_definitions/age-verification.yaml
GillesInnov35 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Know Your Customer Age Verification | ||
|
||
termsOfService: http://swagger.io/terms/ | ||
contact: | ||
email: [email protected] | ||
license: | ||
name: Apache 2.0 | ||
url: https://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
version: 0.1.0-wip | ||
|
||
|
||
servers: | ||
- url: '{apiRoot}/{basePath}' | ||
variables: | ||
apiRoot: | ||
default: http://localhost:9091 | ||
description: API root | ||
basePath: | ||
default: kyc-ageverify/v0 | ||
description: Base path for the KYC-AgeVerify API | ||
|
||
tags: | ||
- name: Ageverify | ||
|
||
description: Operations to verify the age of a user. | ||
|
||
paths: | ||
/ageverify: | ||
post: | ||
tags: | ||
- Ageverify | ||
summary: Verify if the age of a user is under the provided age value submitted in order to automatically denied access to gaming, alcohol, or other age-restricted sites. There are restrictions applied to the service. User phone number must be the contact's phone number declared in the contract. | ||
|
||
operationId: KYC_AgeVerify | ||
|
||
security: | ||
- openId: | ||
- know-your-customer:AgeVerify | ||
|
||
|
||
parameters: | ||
- $ref: '#/components/parameters/x-correlator' | ||
|
||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/KYC_RequestBody' | ||
examples: | ||
RequestExample: | ||
value: | ||
phoneNumber: '+34629255833' | ||
givenName: 'Federica' | ||
middleNames: 'Sanchez' | ||
familyName: 'Arjona' | ||
email: "[email protected]" | ||
age: 18 | ||
|
||
responses: | ||
'200': | ||
description: OK | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
|
||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/KYC_ResponseBody' | ||
examples: | ||
KYC_200Example: | ||
value: | ||
phoneNumber: '+34629255833' | ||
age: 18 | ||
isVerified: true | ||
assuranceLeve: 95 | ||
|
||
'400': | ||
$ref: '#/components/responses/Generic400' | ||
|
||
'401': | ||
$ref: '#/components/responses/Generic401' | ||
|
||
'403': | ||
$ref: '#/components/responses/Generic403' | ||
|
||
'404': | ||
$ref: '#/components/responses/Generic404' | ||
|
||
'500': | ||
$ref: '#/components/responses/Generic500' | ||
|
||
'503': | ||
$ref: '#/components/responses/Generic503' | ||
|
||
'504': | ||
$ref: '#/components/responses/Generic504' | ||
|
||
components: | ||
securitySchemes: | ||
openId: | ||
type: openIdConnect | ||
openIdConnectUrl: https://example.com/.well-known/openid-configuration | ||
|
||
|
||
headers: | ||
x-correlator: | ||
description: Correlation id for the different services | ||
schema: | ||
type: "string" | ||
|
||
parameters: | ||
x-correlator: | ||
name: x-correlator | ||
in: header | ||
description: Correlation id for the different services | ||
schema: | ||
type: "string" | ||
|
||
schemas: | ||
KYC_RequestBody: | ||
description: "Requested information to be compare with customer personal information" | ||
required: | ||
- "givenName" | ||
- "familyName" | ||
- "age" | ||
type: "object" | ||
|
||
properties: | ||
phoneNumber: | ||
type: "string" | ||
description: A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, optionally prefixed with '+'. | ||
GillesInnov35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
givenName: | ||
type: "string" | ||
description: First name/given name of the customer. It may include a compound first name or a second/middle name. | ||
|
||
middleNames: | ||
type: string | ||
description: Middle name/s of the customer. | ||
|
||
familyName: | ||
type: "string" | ||
description: Surname/family name of the customer. It may include a compound last name or an additional last name. | ||
|
||
email: | ||
type: string | ||
description: Email address of the customer in the RFC specified format (local-part@domain), stored on the OB systems. | ||
|
||
age: | ||
type: "integer" | ||
description: age to be verified. | ||
|
||
KYC_ResponseBody: | ||
type: "object" | ||
properties: | ||
|
||
phoneNumber: | ||
type: "string" | ||
description: A public identifier addressing a telephone subscription. | ||
|
||
age: | ||
type: "integer" | ||
description: age which has been verified. | ||
|
||
isVerified: | ||
type: "boolean" | ||
default: True | ||
description: Indicates if the age has been verified (True) or if it has not been possible (False). | ||
|
||
assuranceLevel: | ||
type: "integer" | ||
description: Assurance level the MNO has to provide a result of the age verification. | ||
|
||
ErrorInfo: | ||
type: "object" | ||
required: | ||
- status | ||
- code | ||
- message | ||
properties: | ||
status: | ||
type: "integer" | ||
description: HTTP response status code | ||
code: | ||
type: "string" | ||
description: Code given to this error | ||
message: | ||
type: "string" | ||
description: Detailed error description | ||
|
||
responses: | ||
Generic400: | ||
description: |- | ||
Problem with the client request. | ||
In addition to regular scenario of `INVALID_ARGUMENT`, another scenario may exist. | ||
|
||
- Indicated param combination is invalid (`"code": "KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION","message": "Indicated parameter combination is invalid"`) | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
|
||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
InvalidArgument: | ||
value: | ||
status: 400 | ||
code: INVALID_ARGUMENT | ||
message: Client specified an invalid argument, request body or query param | ||
GillesInnov35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
InvalidParamCombination: | ||
value: | ||
status: 400 | ||
code: KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION | ||
message: Indicated parameter combination is invalid | ||
|
||
Generic401: | ||
description: Authentication problem with the client request. Unauthorized error. Access Token related errors. | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
Unauthenticated: | ||
value: | ||
status: 401 | ||
code: UNAUTHENTICATED | ||
message: Request not authenticated due to missing, invalid, or expired credentials | ||
GillesInnov35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Generic403: | ||
description: | | ||
Client does not have sufficient permission. | ||
In addition to regular scenario of `PERMISSION_DENIED`, another scenarios may exist: | ||
|
||
- Phone number cannot be deducted from access token context.(`{"code": "KNOW_YOUR_CUSTOMER.INVALID_TOKEN_CONTEXT","message": "Phone number mismatch with access token context"}`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align according to the decision on what errors to include |
||
|
||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
|
||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
PermissionDenied: | ||
value: | ||
status: 403 | ||
code: PERMISSION_DENIED | ||
message: Client does not have sufficient permissions to perform this action | ||
InvalidTokenContext: | ||
value: | ||
status: 403 | ||
code: KNOW_YOUR_CUSTOMER.INVALID_TOKEN_CONTEXT | ||
message: Phone number mismatch with access token context | ||
GillesInnov35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Generic404: | ||
description: | | ||
Not Found error. Error if URL is wrong / user is not found. | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
NotFound: | ||
value: | ||
status: 404 | ||
|
||
code: NOT_FOUND | ||
message: not_found_contractor/not_found | ||
GillesInnov35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Generic500: | ||
description: Server error. Problem with MNO's server side. Some processing error within MNO's servers. | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
ServerError: | ||
value: | ||
status: 500 | ||
code: INTERNAL | ||
message: Server error | ||
|
||
Generic503: | ||
description: Service unavailable. Typically the server is down. Problem with MNO's server side. Any unexpected error within MNO's servers. | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
examples: | ||
ServiceUnavailable: | ||
value: | ||
status: 503 | ||
code: UNAVAILABLE | ||
message: Service unavailable | ||
|
||
Generic504: | ||
description: Request time exceeded. If it happens repeatedly, consider reducing the request complexity | ||
headers: | ||
x-correlator: | ||
$ref: '#/components/headers/x-correlator' | ||
content: | ||
application/json: | ||
|
||
schema: | ||
$ref: '#/components/schemas/ErrorInfo' | ||
example: | ||
status: 504 | ||
code: TIMEOUT | ||
message: Request timeout exceeded. Try later. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't the endpoint be just /verify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but no, we can't. This path name was agreed by Sub Project in the early stage and it has not been changed since then. Technically, maybe yes, but we KDDI would not agree to change it.
Thanks,
Toshi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @fernandopradocabrillo , @ToshiWakayama-KDDI , /verify is already used for number-verification API.
For Tenure API /check-tenure has been choosen. May be verify-age could be proposed if the previous one is not approved by all.
Gilles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really a big deal, just a comment to simplify, I hadn't noticed it before. For me /verify or /verify-age is more align with the rest of CAMARA APIs, but I'm late to this conversation so I will live with whatever you decide 😶
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fernandopradocabrillo , Thanks, @GillesInnov35 ,
I would like to stick to the existing 'ageverify', if it can be accepted by all. I think 'ageverify' is not prohibited by Commonalities, and alignment with other CAMARA APIs may be a subjective matter. But if you have problem with 'ageverify', please let me/us know. Otherwise, let's keep it.
Best regards,
Toshi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me then!