diff --git a/gen/generator.go b/gen/generator.go index e6e56108..3254a00f 100644 --- a/gen/generator.go +++ b/gen/generator.go @@ -710,7 +710,6 @@ func parseProfileParcelAttribute(attr *YamlConfigAttribute, model gjson.Result, if attr.ModelName == "" { return } - path := "" prefix := "properties." for i, e := range attr.DataPath { @@ -922,9 +921,12 @@ func augmentProfileParcelConfig(config *YamlConfig) { model := gjson.ParseBytes(modelBytes) for ia := range config.Attributes { - parseProfileParcelAttribute(&config.Attributes[ia], model.Get("request.properties.data"), false) + if model.Get("request.properties.data.oneOf").Exists() { + parseProfileParcelAttribute(&config.Attributes[ia], model.Get("request.properties.data.oneOf.0"), false) + } else { + parseProfileParcelAttribute(&config.Attributes[ia], model.Get("request.properties.data"), false) + } } - if config.DsDescription == "" { config.DsDescription = fmt.Sprintf("This data source can read the %s %s.", config.Name, CamelCase(config.ParcelType)) } diff --git a/gen/models/profile_parcels/transport_cellular_controller.json b/gen/models/profile_parcels/transport_cellular_controller.json index 29099a5f..a9de9e6a 100644 --- a/gen/models/profile_parcels/transport_cellular_controller.json +++ b/gen/models/profile_parcels/transport_cellular_controller.json @@ -1,332 +1,424 @@ { "request": { - "$schema": "http://json-schema.org/draft/2019-09/schema", - "$id": "https://cisco.com/schema/profileparcel/sdwan/transport/cellular-controller/post/request_schema.json", - "title": "CellularController", - "description": "CellularController profile parcel schema for POST request", - "type": "object", - "properties": { - "name": { - "description": "Set the parcel name", - "type": "string", - "pattern": "^[^&<>! \"]+$", - "minLength": 1, - "maxLength": 128 - }, - "description": { - "description": "Set the parcel description", - "type": "string" - }, - "data": { - "type": "object", - "description": "Regular Cellular controller (non-eSim) config", - "properties": { - "configType": { - "type": "object", - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - }, - "value": { - "type": "string", - "enum": ["non-eSim"] - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "$schema": "http://json-schema.org/draft/2019-09/schema", + "$id": "https://cisco.com/schema/profileparcel/sdwan/transport/cellular-controller/post/request_schema.json", + "title": "CellularController", + "description": "CellularController profile parcel schema for POST request", + "type": "object", + "properties": { + "name": { + "description": "Set the parcel name", + "type": "string", + "pattern": "^[^&<>! \"]+$", + "minLength": 1, + "maxLength": 128 }, - "controllerConfig": { - "type": "object", - "properties": { - "id": { - "description": "Cellular ID", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "minLength": 1, - "type": "string", - "maxLength": 5 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - } - ] - }, - "slot": { - "description": "Set primary SIM slot", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "minimum": 0, - "maximum": 1, - "type": "integer" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - } - }, - "required": ["optionType"], - "additionalProperties": false - } - ] - }, - "maxRetry": { - "description": "Set SIM failover retries", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "minimum": 0, - "maximum": 65535, - "type": "integer" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - } - }, - "required": ["optionType"], - "additionalProperties": false - } - ] - }, - "failovertimer": { - "description": "Set SIM failover timeout in minutes", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "minimum": 3, - "maximum": 7, - "type": "integer" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, + "description": { + "description": "Set the parcel description", + "type": "string" + }, + "data": { + "type": "object", + "oneOf": [ { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] + "type": "object", + "description": "Regular Cellular controller (non-eSim) config", + "properties": { + "configType": { + "type": "object", + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + }, + "value": { + "type": "string", + "enum": [ + "non-eSim" + ] + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + "controllerConfig": { + "type": "object", + "properties": { + "id": { + "description": "Cellular ID", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minLength": 1, + "type": "string", + "maxLength": 5 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + }, + "slot": { + "description": "Set primary SIM slot", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minimum": 0, + "maximum": 1, + "type": "integer" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "optionType" + ], + "additionalProperties": false + } + ] + }, + "maxRetry": { + "description": "Set SIM failover retries", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minimum": 0, + "maximum": 65535, + "type": "integer" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "optionType" + ], + "additionalProperties": false + } + ] + }, + "failovertimer": { + "description": "Set SIM failover timeout in minutes", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minimum": 3, + "maximum": 7, + "type": "integer" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "optionType" + ], + "additionalProperties": false + } + ] + }, + "autoSim": { + "description": "Enable/Disable Firmware Auto Sim", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "type": "boolean" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + }, + "value": { + "type": "boolean", + "enum": [ + true + ] + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "id" + ], + "additionalProperties": false + } }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - } - }, - "required": ["optionType"], - "additionalProperties": false + "required": [ + "configType", + "controllerConfig" + ], + "additionalProperties": false } - ] - }, - "autoSim": { - "description": "Enable/Disable Firmware Auto Sim", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "type": "boolean" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, + ] + }, + "metadata": { + "supportedDeviceTypes": [ + "c1100_lte", + "c8000be", + "ir8100", + "ir8340", + "isr", + "ISRv", + "ir1101" + ] + }, + "documentation": { + "description": "This is the documentation for POST request schema for Transport CellularController profile parcel", + "examples": [ { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] + "name": "Cedge_CG1_Transport_CellularController_parcel1", + "data": { + "configType": { + "optionType": "default", + "value": "non-eSim" + }, + "controllerConfig": { + "id": { + "optionType": "global", + "value": "1" + }, + "slot": { + "optionType": "global", + "value": 0 + }, + "maxRetry": { + "optionType": "global", + "value": 5 + }, + "failovertimer": { + "optionType": "global", + "value": 3 + }, + "autoSim": { + "optionType": "default", + "value": true + } + } }, - "value": { - "type": "boolean", - "enum": [true] - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "description": "Cedge Transport CellularController Parcel config" } - ] - } - }, - "required": ["id"], - "additionalProperties": false + ] } - }, - "required": ["configType", "controllerConfig"], - "additionalProperties": false }, - "metadata": { - "supportedDeviceTypes": [ - "c1100_lte", - "c8000be", - "ir8100", - "ir8340", - "isr", - "ISRv", - "ir1101" - ] + "required": [ + "name", + "data" + ], + "not": { + "required": [ + "metadata", + "documentation" + ] }, - "documentation": { - "description": "This is the documentation for POST request schema for Transport CellularController profile parcel", - "examples": [ - { - "name": "Cedge_CG1_Transport_CellularController_parcel1", - "data": { - "configType": { - "optionType": "default", - "value": "non-eSim" - }, - "controllerConfig": { - "id": { - "optionType": "global", - "value": "1" - }, - "slot": { - "optionType": "global", - "value": 0 - }, - "maxRetry": { - "optionType": "global", - "value": 5 - }, - "failovertimer": { - "optionType": "global", - "value": 3 - }, - "autoSim": { - "optionType": "default", - "value": true - } - } - }, - "description": "Cedge Transport CellularController Parcel config" - } - ] - } - }, - "required": ["name", "data"], - "not": { - "required": ["metadata", "documentation"] - }, - "additionalProperties": false + "additionalProperties": false } -} +} \ No newline at end of file diff --git a/gen/models/profile_parcels/transport_cellular_profile.json b/gen/models/profile_parcels/transport_cellular_profile.json index 978cb800..8a7ea2f2 100644 --- a/gen/models/profile_parcels/transport_cellular_profile.json +++ b/gen/models/profile_parcels/transport_cellular_profile.json @@ -1,431 +1,561 @@ { "request": { - "$schema": "http://json-schema.org/draft/2019-09/schema", - "$id": "https://cisco.com/schema/profileparcel/sdwan/transport/cellular-profile/post/request_schema.json", - "title": "WAN VPN Schema", - "description": "CellularProfile profile parcel schema for POST request", - "type": "object", - "properties": { - "name": { - "description": "Set the parcel name", - "type": "string", - "pattern": "^[^&<>! \"]+$", - "minLength": 1, - "maxLength": 128 - }, - "description": { - "description": "Set the parcel description", - "type": "string" - }, - "data": { - "type": "object", - "description": "Regular Cellular profile (non-eSim) config", - "properties": { - "configType": { - "type": "object", - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - }, - "value": { - "type": "string", - "enum": ["non-eSim"] - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "$schema": "http://json-schema.org/draft/2019-09/schema", + "$id": "https://cisco.com/schema/profileparcel/sdwan/transport/cellular-profile/post/request_schema.json", + "title": "WAN VPN Schema", + "description": "CellularProfile profile parcel schema for POST request", + "type": "object", + "properties": { + "name": { + "description": "Set the parcel name", + "type": "string", + "pattern": "^[^&<>! \"]+$", + "minLength": 1, + "maxLength": 128 }, - "profileConfig": { - "type": "object", - "properties": { - "id": { - "description": "Set Profile ID", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "minimum": 1, - "maximum": 16, - "type": "integer" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, + "description": { + "description": "Set the parcel description", + "type": "string" + }, + "data": { + "type": "object", + "oneOf": [ { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - } - ] - }, - "profileInfo": { - "type": "object", - "properties": { - "apn": { - "description": "Set access point name", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "type": "string" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - } - ] - }, - "authentication": { - "oneOf": [ - { - "type": "object", - "properties": { - "noAuthentication": { - "type": "object", - "description": "No Authentication", - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - }, - "value": { - "type": "string", - "enum": ["none"] - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - } - }, - "required": ["noAuthentication"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "needAuthentication": { - "type": "object", - "properties": { - "type": { - "description": "Set authentication type", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "enum": ["pap", "chap", "pap_chap"], - "type": "string" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "type": "object", + "description": "Regular Cellular profile (non-eSim) config", + "properties": { + "configType": { + "type": "object", + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "value": { + "type": "string", + "enum": [ + "non-eSim" + ] } - ] }, - "username": { - "description": "Set the profile username", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "type": "string" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + "profileConfig": { + "type": "object", + "properties": { + "id": { + "description": "Set Profile ID", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "minimum": 1, + "maximum": 16, + "type": "integer" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] + "profileInfo": { + "type": "object", + "properties": { + "apn": { + "description": "Set access point name", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + }, + "authentication": { + "oneOf": [ + { + "type": "object", + "properties": { + "noAuthentication": { + "type": "object", + "description": "No Authentication", + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + }, + "value": { + "type": "string", + "enum": [ + "none" + ] + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + }, + "required": [ + "noAuthentication" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "needAuthentication": { + "type": "object", + "properties": { + "type": { + "description": "Set authentication type", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "enum": [ + "pap", + "chap", + "pap_chap" + ], + "type": "string" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + }, + "username": { + "description": "Set the profile username", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + }, + "password": { + "description": "Set the profile password", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + } + }, + "required": [ + "type", + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "needAuthentication" + ], + "additionalProperties": false + } + ] + }, + "pdnType": { + "description": "Set packet data network type", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "default": "ipv4", + "enum": [ + "ipv4", + "ipv4v6", + "ipv6" + ], + "type": "string" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + }, + "value": { + "type": "string", + "enum": [ + "ipv4" + ] + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + } + ] + }, + "noOverwrite": { + "description": "No Overwrite", + "type": "object", + "oneOf": [ + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "global" + ] + }, + "value": { + "type": "boolean" + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "variable" + ] + }, + "value": { + "type": "string", + "pattern": "^\\{\\{[.\/\\[\\]a-zA-Z0-9_-]+\\}\\}$", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "optionType", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "optionType": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "optionType" + ], + "additionalProperties": false + } + ] + } }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "required": [ + "apn" + ], + "additionalProperties": false } - ] }, - "password": { - "description": "Set the profile password", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "type": "string" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false + "required": [ + "id", + "profileInfo" + ], + "additionalProperties": false + } + }, + "required": [ + "configType", + "profileConfig" + ], + "additionalProperties": false + } + ] + }, + "metadata": { + "supportedDeviceTypes": [ + "c1100_lte", + "c8000be", + "ir8100", + "ir8340", + "isr", + "ISRv", + "ir1101" + ] + }, + "documentation": { + "description": "This is the documentation for POST request schema for Transport WAN VPN profile parcel", + "examples": [ + { + "data": { + "configType": { + "optionType": "default", + "value": "non-eSim" + }, + "profileConfig": { + "id": { + "optionType": "global", + "value": 1 + }, + "profileInfo": { + "apn": { + "optionType": "global", + "value": "apn1" }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 + "authentication": { + "noAuthentication": { + "optionType": "default", + "value": "none" } - }, - "required": ["optionType", "value"], - "additionalProperties": false + }, + "pdnType": { + "optionType": "default", + "value": "ipv4" + }, + "noOverwrite": { + "optionType": "global", + "value": false } - ] } - }, - "required": ["type", "username", "password"], - "additionalProperties": false - } - }, - "required": ["needAuthentication"], - "additionalProperties": false - } - ] - }, - "pdnType": { - "description": "Set packet data network type", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "default": "ipv4", - "enum": ["ipv4", "ipv4v6", "ipv6"], - "type": "string" - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - }, - "value": { - "type": "string", - "enum": ["ipv4"] - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - } - ] - }, - "noOverwrite": { - "description": "No Overwrite", - "type": "object", - "oneOf": [ - { - "properties": { - "optionType": { - "type": "string", - "enum": ["global"] - }, - "value": { - "type": "boolean" } - }, - "required": ["optionType", "value"], - "additionalProperties": false }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["variable"] - }, - "value": { - "type": "string", - "pattern": "^\\{\\{[./\\[\\]a-zA-Z0-9_-]+\\}\\}$", - "minLength": 1, - "maxLength": 64 - } - }, - "required": ["optionType", "value"], - "additionalProperties": false - }, - { - "properties": { - "optionType": { - "type": "string", - "enum": ["default"] - } - }, - "required": ["optionType"], - "additionalProperties": false - } - ] + "description": "Cedge Transport CellularProfile Parcel config", + "name": "Cedge_CG1_Transport_CellularProfile_parcel1" } - }, - "required": ["apn"], - "additionalProperties": false - } - }, - "required": ["id", "profileInfo"], - "additionalProperties": false + ] } - }, - "required": ["configType", "profileConfig"], - "additionalProperties": false }, - "metadata": { - "supportedDeviceTypes": [ - "c1100_lte", - "c8000be", - "ir8100", - "ir8340", - "isr", - "ISRv", - "ir1101" - ] + "required": [ + "name", + "data" + ], + "not": { + "required": [ + "metadata", + "documentation" + ] }, - "documentation": { - "description": "This is the documentation for POST request schema for Transport WAN VPN profile parcel", - "examples": [ - { - "data": { - "configType": { - "optionType": "default", - "value": "non-eSim" - }, - "profileConfig": { - "id": { - "optionType": "global", - "value": 1 - }, - "profileInfo": { - "apn": { - "optionType": "global", - "value": "apn1" - }, - "authentication": { - "noAuthentication": { - "optionType": "default", - "value": "none" - } - }, - "pdnType": { - "optionType": "default", - "value": "ipv4" - }, - "noOverwrite": { - "optionType": "global", - "value": false - } - } - } - }, - "description": "Cedge Transport CellularProfile Parcel config", - "name": "Cedge_CG1_Transport_CellularProfile_parcel1" - } - ] - } - }, - "required": ["name", "data"], - "not": { - "required": ["metadata", "documentation"] - }, - "additionalProperties": false + "additionalProperties": false } -} +} \ No newline at end of file