Summary
Get JSON schemas of service models.
Description
Get JSON schemas of service models depending on service paths passed in.
Route
POST /nso_manager/serviceModel/schemas
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | object | yes | a list of options, e.g. models and adapter ID |
{ "options": { "options": { "models": [ "/ncs:services/interface_description:interface_description", "/ncs:services/asr1kModularService:customer-dns" ] } } }
{ "type": "object", "properties": { "options": { "type": "object", "properties": { "models": { "type": "array", "description": "a list of service paths", "items": { "type": "string", "examples": [ "/ncs:services/interface_description:interface_description" ] } } }, "examples": [ { "options": { "models": [ "/ncs:services/interface_description:interface_description", "/ncs:services/asr1kModularService:customer-dns" ] } } ] } }, "required": [ "options" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
result | array | Converted JSON schemas mapped to their service paths. |
{ "modelName": "esse et Ut", "origin": "nostrud aliquip culpa", "examples": [ [ { "modelName": "/ncs:services/interface_description:interface_description", "schema": "{\"name\":\"interface_description\",\"type\":\"object\",\"properties\":{\"interface_description\":{\"type\":\"array\",\"name\":\"interface_description\",\"items\":{\"type\":\"object\",\"required\":[\"device\"],\"properties\":{\"device\":{\"description\":\"Device\",\"options\":{\"leafRef\":{\"expression\":\"/ncs:devices/ncs:device/ncs:name\"}},\"name\":\"device\",\"id\":\"#/interface_description/device\",\"type\":\"string\"},\"interface\":{\"type\":\"string\",\"items\":{},\"description\":\"Interface\",\"options\":{},\"name\":\"interface\",\"id\":\"#/interface_description/interface\"},\"description\":{\"description\":\"description\",\"options\":{},\"name\":\"description\",\"id\":\"#/interface_description/description\",\"type\":\"string\",\"minLength\":\"3..8\",\"maxLength\":\"3..8\"},\"leafWithMust\":{\"description\":\"leafWithMust\",\"options\":{\"must\":{\"expression\":\"string-length(../description) = '4'\"}},\"name\":\"leafWithMust\",\"id\":\"#/interface_description/leafWithMust\",\"type\":\"string\"},\"leafWithWhen\":{\"description\":\"leafWithWhen\",\"options\":{\"when\":{\"expression\":\"string-length(../description) = '5'\"}},\"name\":\"leafWithWhen\",\"id\":\"#/interface_description/leafWithWhen\",\"type\":\"string\"},\"someLeaf\":{\"description\":\"someLeaf\",\"options\":{\"leafRef\":{\"expression\":\"../interface\"}},\"name\":\"someLeaf\",\"id\":\"#/interface_description/someLeaf\",\"type\":\"string\"},\"check\":{\"type\":\"array\",\"name\":\"check\",\"items\":{\"type\":\"object\",\"required\":[\"iAmKey\"],\"properties\":{\"iAmKey\":{\"description\":\"iAmKey\",\"options\":{},\"name\":\"iAmKey\",\"id\":\"#/interface_description/check/iAmKey\",\"type\":\"string\"},\"iAmNotKey\":{\"description\":\"iAmNotKey\",\"options\":{\"leafRef\":{\"expression\":\"../../interface\"}},\"name\":\"iAmNotKey\",\"id\":\"#/interface_description/check/iAmNotKey\",\"type\":\"string\"},\"moreList\":{\"type\":\"array\",\"name\":\"moreList\",\"items\":{\"type\":\"object\",\"required\":[\"iAmKey\"],\"properties\":{\"iAmKey\":{\"description\":\"iAmKey\",\"options\":{},\"name\":\"iAmKey\",\"id\":\"#/interface_description/check/moreList/iAmKey\",\"type\":\"string\"},\"iAmNotKey\":{\"description\":\"iAmNotKey\",\"options\":{\"leafRef\":{\"expression\":\"../../../interface\"}},\"name\":\"iAmNotKey\",\"id\":\"#/interface_description/check/moreList/iAmNotKey\",\"type\":\"string\"}}},\"description\":\"moreList\",\"options\":{\"keys\":[\"iAmKey\"]},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description/check/moreList\"}}},\"description\":\"check\",\"options\":{\"keys\":[\"iAmKey\"]},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description/check\"}}},\"description\":\"This is an RFS skeleton service\",\"options\":{\"keys\":[\"device\"],\"type\":\"service\",\"servicepoint\":\"interface_description\"},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description\"}},\"description\":\"JSON schema for interface_description\",\"definitions\":{\"groupings\":{},\"typeDefs\":{},\"identities\":{},\"features\":{}},\"options\":{},\"required\":[],\"id\":\"http://com/example/interfacedescription\",\"prefix\":\"interface_description\"}", "origin": "LocalNSO" }, { "modelName": "/ncs:services/asr1kModularService:customer-dns", "origin": "LocalNSO" } ] ] }
{ "type": "object", "properties": { "modelName": { "type": "string", "description": "indicates the service path" }, "schema": { "type": "object", "description": "indicates the JSON schema for that particular service path" }, "origin": { "type": "string", "description": "if there are same service paths across different NSO instances, then return the default schema or first schema that is configured" }, "examples": [ [ { "modelName": "/ncs:services/interface_description:interface_description", "schema": "{\"name\":\"interface_description\",\"type\":\"object\",\"properties\":{\"interface_description\":{\"type\":\"array\",\"name\":\"interface_description\",\"items\":{\"type\":\"object\",\"required\":[\"device\"],\"properties\":{\"device\":{\"description\":\"Device\",\"options\":{\"leafRef\":{\"expression\":\"/ncs:devices/ncs:device/ncs:name\"}},\"name\":\"device\",\"id\":\"#/interface_description/device\",\"type\":\"string\"},\"interface\":{\"type\":\"string\",\"items\":{},\"description\":\"Interface\",\"options\":{},\"name\":\"interface\",\"id\":\"#/interface_description/interface\"},\"description\":{\"description\":\"description\",\"options\":{},\"name\":\"description\",\"id\":\"#/interface_description/description\",\"type\":\"string\",\"minLength\":\"3..8\",\"maxLength\":\"3..8\"},\"leafWithMust\":{\"description\":\"leafWithMust\",\"options\":{\"must\":{\"expression\":\"string-length(../description) = '4'\"}},\"name\":\"leafWithMust\",\"id\":\"#/interface_description/leafWithMust\",\"type\":\"string\"},\"leafWithWhen\":{\"description\":\"leafWithWhen\",\"options\":{\"when\":{\"expression\":\"string-length(../description) = '5'\"}},\"name\":\"leafWithWhen\",\"id\":\"#/interface_description/leafWithWhen\",\"type\":\"string\"},\"someLeaf\":{\"description\":\"someLeaf\",\"options\":{\"leafRef\":{\"expression\":\"../interface\"}},\"name\":\"someLeaf\",\"id\":\"#/interface_description/someLeaf\",\"type\":\"string\"},\"check\":{\"type\":\"array\",\"name\":\"check\",\"items\":{\"type\":\"object\",\"required\":[\"iAmKey\"],\"properties\":{\"iAmKey\":{\"description\":\"iAmKey\",\"options\":{},\"name\":\"iAmKey\",\"id\":\"#/interface_description/check/iAmKey\",\"type\":\"string\"},\"iAmNotKey\":{\"description\":\"iAmNotKey\",\"options\":{\"leafRef\":{\"expression\":\"../../interface\"}},\"name\":\"iAmNotKey\",\"id\":\"#/interface_description/check/iAmNotKey\",\"type\":\"string\"},\"moreList\":{\"type\":\"array\",\"name\":\"moreList\",\"items\":{\"type\":\"object\",\"required\":[\"iAmKey\"],\"properties\":{\"iAmKey\":{\"description\":\"iAmKey\",\"options\":{},\"name\":\"iAmKey\",\"id\":\"#/interface_description/check/moreList/iAmKey\",\"type\":\"string\"},\"iAmNotKey\":{\"description\":\"iAmNotKey\",\"options\":{\"leafRef\":{\"expression\":\"../../../interface\"}},\"name\":\"iAmNotKey\",\"id\":\"#/interface_description/check/moreList/iAmNotKey\",\"type\":\"string\"}}},\"description\":\"moreList\",\"options\":{\"keys\":[\"iAmKey\"]},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description/check/moreList\"}}},\"description\":\"check\",\"options\":{\"keys\":[\"iAmKey\"]},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description/check\"}}},\"description\":\"This is an RFS skeleton service\",\"options\":{\"keys\":[\"device\"],\"type\":\"service\",\"servicepoint\":\"interface_description\"},\"definitions\":{\"groupings\":{},\"typeDefs\":{}},\"id\":\"#/interface_description\"}},\"description\":\"JSON schema for interface_description\",\"definitions\":{\"groupings\":{},\"typeDefs\":{},\"identities\":{},\"features\":{}},\"options\":{},\"required\":[],\"id\":\"http://com/example/interfacedescription\",\"prefix\":\"interface_description\"}", "origin": "LocalNSO" }, { "modelName": "/ncs:services/asr1kModularService:customer-dns", "schema": {}, "origin": "LocalNSO" } ] ] } }