Hi,
I would like to convert the following JSON body into swagger.
The metas keys are unknown at the time of creating the swagger file,
key-value pairs can be added without updating the spec.
Note we want the metas structure as flat as possible, therefore it contains
simple key-value pairs .. we want to keep it that way on purpose.
* {*
* "deviceId" : "device-0000345",*
* "deviceStatus" : "on",*
* "metas" : {*
* "manufacturerId" : "mf1",*
* "serialNumberId" : "4CE0460D0G"*
* }*
* }*
At the moment I have the swagger file contents as follows.
But this seems incomplete for the metas part. How to do it properly?
* 200: description: Successful response. The device details
for the specified deviceId. schema: $ref:
'#/definitions/DeviceDetails'*
*definitions:*
* DeviceDetails: type: object required: - deviceId
properties: deviceId: $ref: '#/definitions/DeviceId'
deviceStatus: $ref: '#/definitions/DeviceStatus' metas:
type: object description: List of key-value pairs where keys are
customizable Strings. The value can be anything (String, Array, Object, and
so on).*
thanks,
Rene Ummels
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.