{ "openapi": "3.0.3", "info": { "version": "1.0.0", "title": "definition-test", "description": "We are providing full API for configurational data which can be edited (by POST, PUT, PATCH and DELETE).\nFor operational data we only provide GET API.\n\nFor majority of request you can see only config data in examples. That's because we can show only one example\nper request. The exception when you can see operational data in example is when data are representing\noperational (config false) container with no config data in it." }, "servers": [ { "url": "http://localhost:8181/" } ], "paths": { "/rests/data": { "post": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "binary-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_binary-container" } }, "application/json": { "schema": { "properties": { "binary-container": { "$ref": "#/components/schemas/definition-test_binary-container", "type": "object" } } } } } }, "responses": { "201": { "description": "Created" } }, "description": "\n\nNote:\nIn example payload, you can see only the first data node child of the resource to be created, following the\nguidelines of RFC 8040, which allows us to create only one resource in POST request.\n", "summary": "POST - Controller - definition-test - definition-test" } }, "/rests/data/definition-test:binary-container": { "get": { "tags": [ "Controller definition-test" ], "parameters": [ { "name": "content", "in": "query", "required": false, "schema": { "enum": [ "config", "nonconfig", "all" ], "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_binary-container" } }, "application/json": { "schema": { "properties": { "binary-container": { "$ref": "#/components/schemas/definition-test_binary-container", "type": "object" } } } } } } }, "description": "", "summary": "GET - Controller - definition-test - binary-container" }, "put": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "binary-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_binary-container" } }, "application/json": { "schema": { "properties": { "definition-test:binary-container": { "$ref": "#/components/schemas/definition-test_binary-container", "type": "object" } } } } } }, "responses": { "204": { "description": "Updated" }, "201": { "description": "Created" } }, "description": "", "summary": "PUT - definition-test - Controller - binary-container" }, "delete": { "tags": [ "Controller definition-test" ], "parameters": [], "responses": { "204": { "description": "Deleted" } }, "description": "", "summary": "DELETE - Controller - definition-test - binary-container" }, "patch": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "binary-container", "content": { "application/yang-data+json": { "schema": { "properties": { "definition-test:binary-container": { "$ref": "#/components/schemas/definition-test_binary-container", "type": "object" } } } }, "application/yang-data+xml": { "schema": { "$ref": "#/components/schemas/definition-test_binary-container" } } } }, "responses": { "200": { "description": "OK" }, "204": { "description": "Updated" } }, "description": "", "summary": "PATCH - definition-test - Controller - binary-container" } }, "/rests/data/definition-test:enum-container": { "get": { "tags": [ "Controller definition-test" ], "parameters": [ { "name": "content", "in": "query", "required": false, "schema": { "enum": [ "config", "nonconfig", "all" ], "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_enum-container" } }, "application/json": { "schema": { "properties": { "enum-container": { "$ref": "#/components/schemas/definition-test_enum-container", "type": "object" } } } } } } }, "description": "", "summary": "GET - Controller - definition-test - enum-container" }, "put": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "enum-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_enum-container" } }, "application/json": { "schema": { "properties": { "definition-test:enum-container": { "$ref": "#/components/schemas/definition-test_enum-container", "type": "object" } } } } } }, "responses": { "204": { "description": "Updated" }, "201": { "description": "Created" } }, "description": "", "summary": "PUT - definition-test - Controller - enum-container" }, "delete": { "tags": [ "Controller definition-test" ], "parameters": [], "responses": { "204": { "description": "Deleted" } }, "description": "", "summary": "DELETE - Controller - definition-test - enum-container" }, "patch": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "enum-container", "content": { "application/yang-data+json": { "schema": { "properties": { "definition-test:enum-container": { "$ref": "#/components/schemas/definition-test_enum-container", "type": "object" } } } }, "application/yang-data+xml": { "schema": { "$ref": "#/components/schemas/definition-test_enum-container" } } } }, "responses": { "200": { "description": "OK" }, "204": { "description": "Updated" } }, "description": "", "summary": "PATCH - definition-test - Controller - enum-container" } }, "/rests/data/definition-test:number-container": { "get": { "tags": [ "Controller definition-test" ], "parameters": [ { "name": "content", "in": "query", "required": false, "schema": { "enum": [ "config", "nonconfig", "all" ], "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_number-container" } }, "application/json": { "schema": { "properties": { "number-container": { "$ref": "#/components/schemas/definition-test_number-container", "type": "object" } } } } } } }, "description": "", "summary": "GET - Controller - definition-test - number-container" }, "put": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "number-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_number-container" } }, "application/json": { "schema": { "properties": { "definition-test:number-container": { "$ref": "#/components/schemas/definition-test_number-container", "type": "object" } } } } } }, "responses": { "204": { "description": "Updated" }, "201": { "description": "Created" } }, "description": "", "summary": "PUT - definition-test - Controller - number-container" }, "delete": { "tags": [ "Controller definition-test" ], "parameters": [], "responses": { "204": { "description": "Deleted" } }, "description": "", "summary": "DELETE - Controller - definition-test - number-container" }, "patch": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "number-container", "content": { "application/yang-data+json": { "schema": { "properties": { "definition-test:number-container": { "$ref": "#/components/schemas/definition-test_number-container", "type": "object" } } } }, "application/yang-data+xml": { "schema": { "$ref": "#/components/schemas/definition-test_number-container" } } } }, "responses": { "200": { "description": "OK" }, "204": { "description": "Updated" } }, "description": "", "summary": "PATCH - definition-test - Controller - number-container" } }, "/rests/data/definition-test:union-container": { "get": { "tags": [ "Controller definition-test" ], "parameters": [ { "name": "content", "in": "query", "required": false, "schema": { "enum": [ "config", "nonconfig", "all" ], "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_union-container" } }, "application/json": { "schema": { "properties": { "union-container": { "$ref": "#/components/schemas/definition-test_union-container", "type": "object" } } } } } } }, "description": "", "summary": "GET - Controller - definition-test - union-container" }, "put": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "union-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_union-container" } }, "application/json": { "schema": { "properties": { "definition-test:union-container": { "$ref": "#/components/schemas/definition-test_union-container", "type": "object" } } } } } }, "responses": { "204": { "description": "Updated" }, "201": { "description": "Created" } }, "description": "", "summary": "PUT - definition-test - Controller - union-container" }, "delete": { "tags": [ "Controller definition-test" ], "parameters": [], "responses": { "204": { "description": "Deleted" } }, "description": "", "summary": "DELETE - Controller - definition-test - union-container" }, "patch": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "union-container", "content": { "application/yang-data+json": { "schema": { "properties": { "definition-test:union-container": { "$ref": "#/components/schemas/definition-test_union-container", "type": "object" } } } }, "application/yang-data+xml": { "schema": { "$ref": "#/components/schemas/definition-test_union-container" } } } }, "responses": { "200": { "description": "OK" }, "204": { "description": "Updated" } }, "description": "", "summary": "PATCH - definition-test - Controller - union-container" } }, "/rests/data/definition-test:network-container": { "get": { "tags": [ "Controller definition-test" ], "parameters": [ { "name": "content", "in": "query", "required": false, "schema": { "enum": [ "config", "nonconfig", "all" ], "type": "string" } } ], "responses": { "200": { "description": "200", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_network-container" } }, "application/json": { "schema": { "properties": { "network-container": { "$ref": "#/components/schemas/definition-test_network-container", "type": "object" } } } } } } }, "description": "", "summary": "GET - Controller - definition-test - network-container" }, "put": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "network-container", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/definition-test_network-container" } }, "application/json": { "schema": { "properties": { "definition-test:network-container": { "$ref": "#/components/schemas/definition-test_network-container", "type": "object" } } } } } }, "responses": { "204": { "description": "Updated" }, "201": { "description": "Created" } }, "description": "", "summary": "PUT - definition-test - Controller - network-container" }, "delete": { "tags": [ "Controller definition-test" ], "parameters": [], "responses": { "204": { "description": "Deleted" } }, "description": "", "summary": "DELETE - Controller - definition-test - network-container" }, "patch": { "tags": [ "Controller definition-test" ], "parameters": [], "requestBody": { "description": "network-container", "content": { "application/yang-data+json": { "schema": { "properties": { "definition-test:network-container": { "$ref": "#/components/schemas/definition-test_network-container", "type": "object" } } } }, "application/yang-data+xml": { "schema": { "$ref": "#/components/schemas/definition-test_network-container" } } } }, "responses": { "200": { "description": "OK" }, "204": { "description": "Updated" } }, "description": "", "summary": "PATCH - definition-test - Controller - network-container" } } }, "components": { "schemas": { "definition-test_union-container": { "properties": { "testUnion3": { "default": "false", "description": "", "type": "integer", "example": -2147483648, "format": "int32" }, "testUnion1": { "default": "5", "description": "", "type": "integer", "example": -2147483648, "format": "int32" }, "testUnion2": { "default": "false", "description": "", "type": "string", "example": "Some testUnion2" }, "testBoolean": { "default": true, "description": "", "type": "boolean", "example": true } }, "xml": { "name": "union-container", "namespace": "urn:definition-test" }, "title": "definition-test_union-container", "type": "object" }, "definition-test_number-container": { "properties": { "testInteger": { "default": 42, "description": "", "type": "integer", "example": -2147483648, "format": "int32" }, "testDecimal": { "default": 3.14, "description": "", "type": "number", "example": -92233720368547758.08 }, "testInt64": { "default": 42, "description": "", "type": "integer", "example": -9223372036854775808, "format": "int64" }, "testDouble": { "default": 3.14159265359, "description": "", "type": "number", "example": -92233720.36854775808 }, "testUint64": { "default": 42, "description": "", "type": "integer", "example": 0 }, "testUnsignedInteger": { "default": 100, "description": "", "type": "integer", "example": 0, "format": "int32" } }, "xml": { "name": "number-container", "namespace": "urn:definition-test" }, "title": "definition-test_number-container", "type": "object" }, "definition-test_network-container": { "properties": { "network-ref": { "default": "/network/nodes[node-id='node1']", "description": "", "type": "string", "example": "/sample:binary-container" } }, "xml": { "name": "network-container", "namespace": "urn:definition-test" }, "title": "definition-test_network-container", "type": "object" }, "definition-test_enum-container": { "properties": { "status": { "default": "up", "enum": [ "up", "down" ], "description": "", "type": "string", "example": "up" } }, "xml": { "name": "enum-container", "namespace": "urn:definition-test" }, "title": "definition-test_enum-container", "type": "object" }, "definition-test_binary-container": { "properties": { "binary-data": { "default": "SGVsbG8gdGVzdCE=", "description": "", "type": "string", "format": "byte" } }, "xml": { "name": "binary-container", "namespace": "urn:definition-test" }, "title": "definition-test_binary-container", "type": "object" } }, "securitySchemes": { "basicAuth": { "scheme": "basic", "type": "http" } } }, "security": [ { "basicAuth": [] } ] }