Fix: resolve 400 HTTP error caused by incorrect example JSON string
Change-Id: Id07a4aa4553ba44d88ffc553d2a03d911f14a2f0
diff --git a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronPort.json b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronPort.json
index 5a833bf..0b0a9be 100644
--- a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronPort.json
+++ b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronPort.json
@@ -181,6 +181,7 @@
"type": "object",
"additionalProperties": {
"type": "string",
+ "example": "",
"description": "A dictionary that enables the application running on the specific host to pass and receive vif port information specific to the networking back-end."
}
}
diff --git a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronRouter.json b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronRouter.json
index 47d0f41..27d637a 100644
--- a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronRouter.json
+++ b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronRouter.json
@@ -76,10 +76,12 @@
"properties": {
"destination": {
"type": "string",
+ "example": "",
"description": "The destination CIDR."
},
"nexthop": {
"type": "string",
+ "example": "",
"description": "The IP address of the next hop for the corresponding destination."
}
}
diff --git a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronSubnet.json b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronSubnet.json
index 3a44ff4..e3a82e5 100644
--- a/apps/openstacknetworking/app/src/main/resources/definitions/NeutronSubnet.json
+++ b/apps/openstacknetworking/app/src/main/resources/definitions/NeutronSubnet.json
@@ -2,15 +2,17 @@
"type": "object",
"description": "A subnet object.",
"required": [
- "subnets"
+ "subnet"
],
"properties": {
- "subnets": {
+ "subnet": {
"type": "object",
"required": [
+ "id",
"enable_dhcp",
"network_id",
"tenant_id",
+ "cidr",
"dns_nameservers",
"allocation_pools",
"host_routes",
@@ -20,6 +22,11 @@
"ipv6_ra_mode"
],
"properties": {
+ "id": {
+ "type": "string",
+ "example": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
+ "description": "The ID of the subnet."
+ },
"enable_dhcp": {
"type": "boolean",
"example": true,
@@ -35,6 +42,11 @@
"example": "4fd44f30292945e481c7b8a0c8908869",
"description": "The ID of the project."
},
+ "cidr": {
+ "type": "string",
+ "example": "192.168.199.0/24",
+ "description": "The CIDR of the subnet."
+ },
"dns_nameservers": {
"type": "array",
"description": "List of dns name servers associated with the subnet.",
@@ -80,10 +92,12 @@
"properties": {
"destination": {
"type": "string",
+ "example": "",
"description": "The destination CIDR."
},
"nexthop": {
"type": "string",
+ "example": "",
"description": "The IP address of the next hop for the corresponding destination."
}
}
@@ -102,10 +116,12 @@
},
"ipv6_address_mode": {
"type": "string",
+ "example": "",
"description": "The IPv6 address modes specifies mechanisms for assigning IP addresses."
},
"ipv6_ra_mode": {
"type": "string",
+ "example": "",
"description": "The IPv6 router advertisement specifies whether the networking service should transmit ICMPv6 packets, for a subnet."
}
}
diff --git a/apps/openstacknode/app/src/main/resources/definitions/OpenstackNode.json b/apps/openstacknode/app/src/main/resources/definitions/OpenstackNode.json
index 8ac64e3..e931e2b 100644
--- a/apps/openstacknode/app/src/main/resources/definitions/OpenstackNode.json
+++ b/apps/openstacknode/app/src/main/resources/definitions/OpenstackNode.json
@@ -1,44 +1,52 @@
{
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "hostname",
- "type",
- "managementIp",
- "dataIp",
- "uplinkPort",
- "integrationBridge",
- "vlanPort"
- ],
- "properties": {
- "hostname": {
- "type": "string",
- "example": "host1"
- },
- "type": {
- "type": "string",
- "example": "GATEWAY"
- },
- "managementIp": {
- "type": "string",
- "example": "10.10.10.1"
- },
- "dataIp": {
- "type": "string",
- "example": "20.20.20.2"
- },
- "uplinkPort": {
- "type": "string",
- "example": "2"
- },
- "integrationBridge": {
- "type": "string",
- "example": "of:0000000000000001"
- },
- "vlanPort": {
- "type": "string",
- "example": "1"
+ "type": "object",
+ "required": [
+ "nodes"
+ ],
+ "properties": {
+ "nodes": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "hostname",
+ "type",
+ "managementIp",
+ "dataIp",
+ "uplinkPort",
+ "integrationBridge",
+ "vlanPort"
+ ],
+ "properties": {
+ "hostname": {
+ "type": "string",
+ "example": "host1"
+ },
+ "type": {
+ "type": "string",
+ "example": "GATEWAY"
+ },
+ "managementIp": {
+ "type": "string",
+ "example": "10.10.10.1"
+ },
+ "dataIp": {
+ "type": "string",
+ "example": "20.20.20.2"
+ },
+ "uplinkPort": {
+ "type": "string",
+ "example": "2"
+ },
+ "integrationBridge": {
+ "type": "string",
+ "example": "of:0000000000000001"
+ },
+ "vlanPort": {
+ "type": "string",
+ "example": "1"
+ }
+ }
}
}
}