Skip to content
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

TIM Italy and TIM Brasil contributions proposal #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 145 additions & 2 deletions code/API_definitions/CAMARA_numberVerify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ info:
version: 1.0.0
servers:
- url: https://mobileconnect.telekom.de
- url: https://api.timbrasil.com.br
tags:
- name: Verified MSISDN
paths:
Expand Down Expand Up @@ -63,12 +64,42 @@ paths:
schema:
type: string
description: client_id provided by MNO for mc vm match api consumption
example: '{client_id}'
example: '+5511985231234'
### New parameters proposed by TIM ###
- name: X-Request-deviceIp
in: header
required: false
schema:
type: string
format: ip
example: 100.71.23.123
- name: X-Request-devicePort
in: header
required: false
schema:
type: integer
format: int32
example: 1234
###
responses:
'200':
description: Successful response
content:
application/json: {}
### New codes proposed by TIM ###
'404':
$ref: '#/components/responses/ResNotFound'
'500':
$ref: '#/components/responses/GenericError'
'504':
$ref: '#/components/responses/BackendConnTimeout'
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"503":
$ref: "#/components/responses/Generic503"
###
/token:
post:
tags:
Expand Down Expand Up @@ -156,7 +187,7 @@ paths:
correlation_id: vm_match
received_correlation_id: 'true'
mc_claims:
device_msisdn: '+4915164816329'
device_msisdn: '+5511985231234'
parameters:
- name: Content-Type
in: header
Expand All @@ -169,6 +200,7 @@ paths:
type: string
description: access_token
example: Bearer hIiC6ksKeD7olGcdW7-KcsKrX0kMEEm_NEtRdE2Le9k

responses:
'200':
description: OK
Expand Down Expand Up @@ -234,3 +266,114 @@ paths:
sub: c1be197e-4314-4dd9-bd3e-26002004b468b5a9dc43
correlation_id: vm_match
device_msisdn_verified: false

#######################################################
# RESOURCES
#######################################################
components:
schemas:
######################################################
# RESPONSES
#######################################################
ErrResponse:
type: object
properties:
status:
type: string
example: OK
message:
type: string
example: OK
ErrorInfo:
type: object
required:
- code
- message
properties:
code:
type: string
description: Code given to this error
message:
type: string
description: Detailed error description
responses:
ResNotFound:
description: The specified resource was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrResponse'
example:
status: ERROR
message: Resource not found
GenericError:
description: An unknow error has occurred
content:
application/json:
schema:
$ref: '#/components/schemas/ErrResponse'
example:
status: ERROR
message: Generic error
BackendConnTimeout:
description: Connection timeout towards backend service has occurred
content:
application/json:
schema:
$ref: '#/components/schemas/ErrResponse'
example:
status: ERROR
message: Backend connection timeout
OkDeleted:
description: The resource has been successfully deleted
content:
application/json:
example:
status: OK
message: Deleted
Generic400:
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
code: INVALID_INPUT
message: "Schema validation failed at ..."
Generic401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
code: UNAUTHORIZED
message: "Authorization failed: ..."
Generic403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
code: FORBIDDEN
message: "Operation not allowed: ..."
SessionNotFound404:
description: Session not found
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
code: NOT_FOUND
message: "Session Id does not exist"
Generic503:
description: Service unavailable
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
code: SERVICE_UNAVALIBLE
message: "Service unavailable"