Allow addition and removal of individual routes via REST.
ONOS-6919
Change-Id: I7c851c92d495b42a9e0948f739859f46eb2ded7a
diff --git a/apps/route-service/app/src/main/resources/definitions/RoutePost.json b/apps/route-service/app/src/main/resources/definitions/RoutePost.json
new file mode 100644
index 0000000..c55578a
--- /dev/null
+++ b/apps/route-service/app/src/main/resources/definitions/RoutePost.json
@@ -0,0 +1,20 @@
+{
+ "type": "object",
+ "title": "route",
+ "required": [
+ "prefix",
+ "nextHop"
+ ],
+ "properties": {
+ "prefix": {
+ "type": "string",
+ "example": "10.1.1.0/24",
+ "description": "Route prefix"
+ },
+ "nextHop": {
+ "type": "string",
+ "example": "1.1.1.1",
+ "description": "Next hop IP address"
+ }
+ }
+}
diff --git a/apps/route-service/app/src/main/resources/definitions/RoutesGet.json b/apps/route-service/app/src/main/resources/definitions/RoutesGet.json
new file mode 100644
index 0000000..0ddb67d
--- /dev/null
+++ b/apps/route-service/app/src/main/resources/definitions/RoutesGet.json
@@ -0,0 +1,76 @@
+{
+ "type": "object",
+ "title": "routes",
+ "required": [
+ "ipv4",
+ "ipv6"
+ ],
+ "properties": {
+ "ipv4": {
+ "type": "array",
+ "xml": {
+ "name": "ipv4",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "route",
+ "required": [
+ "source",
+ "prefix",
+ "nextHop"
+ ],
+ "properties": {
+ "source": {
+ "type": "string",
+ "example": "STATIC",
+ "description": "Route source"
+ },
+ "prefix": {
+ "type": "string",
+ "example": "10.1.1.0/24",
+ "description": "Route prefix"
+ },
+ "nextHop": {
+ "type": "string",
+ "example": "1.1.1.1",
+ "description": "Next hop IP address"
+ }
+ }
+ }
+ },
+ "ipv6": {
+ "type": "array",
+ "xml": {
+ "name": "ipv6",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "route",
+ "required": [
+ "source",
+ "prefix",
+ "nextHop"
+ ],
+ "properties": {
+ "source": {
+ "type": "string",
+ "example": "STATIC",
+ "description": "Route source"
+ },
+ "prefix": {
+ "type": "string",
+ "example": "1111::/64",
+ "description": "Route prefix"
+ },
+ "nextHop": {
+ "type": "string",
+ "example": "2222::1",
+ "description": "Next hop IP address"
+ }
+ }
+ }
+ }
+ }
+}