Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8681bb0
Refactor MatchRequestBody to enforce property schema checking
eric-murray Aug 27, 2026
16dd23f
Update Imei schema
eric-murray Aug 27, 2026
527741a
Update examples for refactored MatchRequestBody schema
eric-murray Aug 27, 2026
235af21
Update example descriptions
eric-murray Aug 27, 2026
d1d2b32
Update device identifier matching scenarios
eric-murray Aug 27, 2026
a3f3810
Fix indentation and remove excess spaces
eric-murray Aug 27, 2026
b82b6a2
Remove additionalProperties: false from RequestBody schema
eric-murray Aug 27, 2026
2081269
Add additionalProperties: false to MatchRequestBody schema
eric-murray Aug 27, 2026
3b4d8f9
Refactor MatchRequestBody schema
eric-murray Aug 27, 2026
4c84709
Move additionalProperties: false to requestBody definition
eric-murray Aug 27, 2026
65f9811
Remove additionalProperties: false completely
eric-murray Aug 27, 2026
ea54bf4
Merge branch 'main' into eric-murray-patch-1
eric-murray Aug 27, 2026
8ce64c6
Update schema compliance references to OAS
eric-murray Aug 27, 2026
52d761e
Update compliance references to OAS schema
eric-murray Aug 27, 2026
5d7bb06
Update compliance references to OAS schemas
eric-murray Aug 27, 2026
44aa45a
Update compliance references to OAS schema
eric-murray Aug 27, 2026
2a42fcb
Update schema reference for x-correlator header
eric-murray Aug 27, 2026
eb016cb
Update schema reference for x-correlator header
eric-murray Aug 27, 2026
4613ef4
Update schema references in device identifier tests
eric-murray Aug 27, 2026
f3f483b
Update request body schema reference in feature file
eric-murray Aug 27, 2026
3ff11fc
Update request body property compliance description
eric-murray Aug 27, 2026
637080b
Clarify request body property in device identifier scenario
eric-murray Aug 27, 2026
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: 72 additions & 75 deletions code/API_definitions/device-identifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ paths:
schema:
$ref: "#/components/schemas/MatchRequestBody"
examples:
Match Device By 3-Legged Access Token:
Match Device IMEISV By 3-Legged Access Token:
$ref: '#/components/examples/MatchDeviceBy3LeggedToken'
Match Device By Phone Number:
Match Device IMEI By Phone Number:
$ref: '#/components/examples/MatchDeviceByPhoneNumber'
Match Device By IP Address:
Match Device TAC By IP Address:
$ref: '#/components/examples/MatchDeviceByIPAddress'
Match Device By Multiple Identifiers:
Match Device IMEISV By Multiple Identifiers:
$ref: '#/components/examples/MatchDeviceByMultipleIdentifiers'

responses:
Expand Down Expand Up @@ -636,6 +636,62 @@ components:
message: The provided identifier cannot be matched to a device.

schemas:
Imei:
description: Schema for the International Mobile Equipment Identity (IMEI) of a physical mobile device
type: string
minLength: 15
maxLength: 15
pattern: ^[0-9]{15}$
example: "490154203237518"

ImeiSv:
description: Schema for the International Mobile Equipment Identity - Software Version (IMEISV) of a physical mobile device
type: string
minLength: 16
maxLength: 16
pattern: ^[0-9]{16}$
example: "4901542032375180"

Tac:
description: Schema for the IMEI Type Allocation Code (TAC) of a physical mobile device
type: string
minLength: 8
maxLength: 8
pattern: ^[0-9]{8}$
example: "49015420"

Ppid:
description: Schema for the Pairwise Pseudonymous Identifier (PPID) of a physical mobile device
type: string
minLength: 64
maxLength: 128
pattern: ^[a-fA-F0-9]{64,128}$
example: "b083f65ccdad365d7489fff24b6d5074b30c12b6d81db3404d25964ffd908813"

RequestBody:
description: Common request body to allow optional Device object to be passed
type: object
properties:
device:
$ref: "../common/CAMARA_common.yaml#/components/schemas/Device"

MatchRequestBody:
description: Request body for match-identifier operation, containing an optional mobile device subscription identifier, and the physical device identifier to match against
allOf:
- $ref: "#/components/schemas/RequestBody"
- type: object
oneOf:
- required: [imeisv]
- required: [imei]
- required: [tac]
properties:
imeisv:
$ref: "#/components/schemas/ImeiSv"
imei:
$ref: "#/components/schemas/Imei"
tac:
$ref: "#/components/schemas/Tac"

CommonResponseBody:
description: |
Common parameters to be included in all responses
Expand All @@ -661,17 +717,9 @@ components:
type: object
properties:
imeisv:
type: string
maxLength: 16
pattern: ^[0-9]{16}$
description: IMEISV of the device
example: "4901542032375180"
$ref: "#/components/schemas/ImeiSv"
imei:
type: string
maxLength: 15
pattern: ^[0-9]{15}$
description: IMEI of the device
example: "490154203237518"
$ref: "#/components/schemas/Imei"

RetrieveIdentifierResponse:
description: Response body definition for retrieveIdentifier operation
Expand All @@ -696,11 +744,7 @@ components:
type: object
properties:
tac:
type: string
maxLength: 8
pattern: ^[0-9]{8}$
description: IMEI Type Allocation Code of the device
example: "49015420"
$ref: "#/components/schemas/Tac"
model:
description: Model of the device
allOf:
Expand All @@ -727,12 +771,7 @@ components:
type: object
properties:
ppid:
type: string
minLength: 64
maxLength: 128
pattern: ^[a-fA-F0-9]{64,128}$
description: A PPID for the identified physical device
example: "b083f65ccdad365d7489fff24b6d5074b30c12b6d81db3404d25964ffd908813"
$ref: "#/components/schemas/Ppid"

RetrievePpidResponse:
description: Response body definition for retrievePpid operation
Expand All @@ -743,44 +782,6 @@ components:
- $ref: "#/components/schemas/CommonResponseBody"
- $ref: "#/components/schemas/DevicePpid"

RequestBody:
description: Common request body to allow optional Device object to be passed
type: object
properties:
device:
$ref: "../common/CAMARA_common.yaml#/components/schemas/Device"

MatchRequestBody:
description: Request body for match-identifier operation, containing an optional mobile device subscription identifier, and the physical device identifier to match against
allOf:
- $ref: "#/components/schemas/RequestBody"
- type: object
required:
- providedIdentifierType
- providedIdentifier
properties:
providedIdentifierType:
$ref: "#/components/schemas/ProvidedIdentifierType"
providedIdentifier:
type: string
minLength: 8
maxLength: 16
pattern: ^[0-9]{8,16}$
description: The device identifier value to match against. Must match the format constraints for the specified identifier type.
example: "490154203237518"

ProvidedIdentifierType:
type: string
enum:
- IMEI
- IMEISV
- TAC
description: |
Type of the provided device identifier. Format requirements:
- IMEI: 15 digits (pattern: ^[0-9]{15}$)
- IMEISV: 16 digits (pattern: ^[0-9]{16}$)
- TAC: 8 digits (pattern: ^[0-9]{8}$)

MatchResult:
description: |
The result of matching the provided device identifier against the network's identifier for the subscription
Expand Down Expand Up @@ -831,36 +832,32 @@ components:
networkAccessIdentifier: "123456789@example.com"

MatchDeviceBy3LeggedToken:
description: Match identifier when device is identified by access token
description: Match IMEISV when device is identified using a 3-legged access token
value:
providedIdentifierType: "IMEISV"
providedIdentifier: "4901542032375181"
imeisv: "4901542032375181"

MatchDeviceByPhoneNumber:
description: Matching device identifier by phone number and provided IMEI using a 2-legged access token
description: Matching IMEI when identifying device by phone number and using a 2-legged access token
value:
device:
phoneNumber: "+123456789"
providedIdentifierType: "IMEI"
providedIdentifier: "490154203237518"
imei: "490154203237518"

MatchDeviceByIPAddress:
description: Matching device identifier by IP address and provided TAC
description: Matching TAC when identifying device by IP address and using a 2-legged access token
value:
device:
ipv4Address:
publicAddress: "84.125.93.10"
publicPort: 59765
providedIdentifierType: "TAC"
providedIdentifier: "49015420"
tac: "49015420"

MatchDeviceByMultipleIdentifiers:
description: Matching device identifier by multiple subscription identifiers and provided IMEISV
description: Matching IMEISV when identifying device by multiple identifiers and using a 2-legged access token
value:
device:
phoneNumber: "+123456789"
ipv4Address:
publicAddress: "84.125.93.10"
publicPort: 59765
providedIdentifierType: "IMEISV"
providedIdentifier: "4901542032375180"
imeisv: "4901542032375180"
Loading