How to implement OpenAPI Dictionary/Map defined with object as key
Hi Team,
3GPP 29.519 (Rel 16) specification has defined a data model which uses object as a map key (snippets below). SmPolicyData object has defined smPolicySnssaiData as a map with Snssai (object) as the key. As per OAS 3.0, key of a Dictionary/Map must be a string and Codegen is generating the map as Map<String, SmPolicyDnnData> as expected. How should the implementation convert the object value to a string when generating JSON? Does OpenAPI define any format to map object to string or is it implementation dependent?
Snippets from 29.519 API specification:
SmPolicyData:
description: Contains the SM policy data for a given subscriber.
type: object
properties:
smPolicySnssaiData:
type: object
additionalProperties:
$ref: '#/components/schemas/SmPolicySnssaiData'
minProperties: 1
umDataLimits:
type: object
additionalProperties:
$ref: '#/components/schemas/UsageMonDataLimit'
minProperties: 1
umData:
type: object
additionalProperties:
$ref: '#/components/schemas/UsageMonData'
minProperties: 1
suppFeat:
$ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
required:
- smPolicySnssaiData
SmPolicySnssaiData:
description: Contains the SM policy data for a given subscriber and S-NSSAI.
type: object
properties:
snssai:
$ref: 'TS29571_CommonData.yaml#/components/schemas/Snssai'
smPolicyDnnData:
type: object
additionalProperties:
$ref: '#/components/schemas/SmPolicyDnnData'
minProperties: 1
required:
- snssai
Snippet from 29.571 API specification:
Snssai:
type: object
properties:
sst:
type: integer
minimum: 0
maximum: 255
sd:
type: string
pattern: '^[A-Fa-f0-9]{6}$'
required:
- sst
Any help is highly appreciated.
Thanks
Carthic