import org.eclipse.jdt.annotation.NonNull;
public final class GetRootEntity extends GetEntity {
+ private static final String OPERATIONS = "operations";
private static final String DATA = "data";
private static final String CONTROLLER = "Controller";
private static final String NETCONF_STATE = "#/components/schemas/ietf-netconf-monitoring_netconf-state";
supported by the server, some session-specific data and statistical data.""");
}
} else {
- generator.writeStringField(DESCRIPTION,
- "Queries the available operations (RPC calls) on the mounted hosted.");
+ generator.writeStringField(DESCRIPTION, """
+ The example demonstrates only top-level container "ietf-restconf:operations".
+ The request returns a list of all available operations on the mounted
+ host, showcasing the structure of RPCs that can be executed.""");
}
generator.writeObjectFieldStart(RESPONSES);
generator.writeObjectFieldStart(String.valueOf(OK.getStatusCode()));
}
generator.writeEndObject(); // end of state
}
+ if (type.equals(OPERATIONS)) {
+ generator.writeObjectFieldStart("ietf-restconf:operations");
+ generator.writeStringField(TYPE, OBJECT);
+ generator.writeEndObject(); // end of ietf-restconf:operations
+ }
generator.writeEndObject(); // end of properties
generator.writeEndObject(); // end of json schema
generator.writeEndObject(); //end of json
generator.writeStringField(REF, NETCONF_STATE);
}
}
+ if (type.equals(OPERATIONS)) {
+ generator.writeStringField(TYPE, OBJECT);
+ // Define the root XML element and namespace
+ generator.writeObjectFieldStart("xml");
+ generator.writeStringField(NAME, OPERATIONS);
+ generator.writeStringField("namespace", "urn:ietf:params:xml:ns:yang:ietf-restconf");
+ generator.writeEndObject(); // end of xml for root
+ }
generator.writeEndObject(); // end of xml schema
generator.writeEndObject(); // end of xml
generator.writeEndObject(); //end of content
generator.writeArrayFieldStart("tags");
generator.writeString(deviceName() + " root");
generator.writeEndArray(); //end of tags
- if (!type.equals("operations")) {
+ if (!type.equals(OPERATIONS)) {
generateParams(generator);
}
generator.writeEndObject(); //end of get
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations/nodes/node=123/yang-ext:mount": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
}
},
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"summary": "GET - 123 - datastore - operations"
}
},
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {}
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
+ }
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations/nodes/node=123/yang-ext:mount": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations/nodes/node=123/yang-ext:mount": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
},
"/rests/operations/nodes/node=123/yang-ext:mount": {
"get": {
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
"responses": {
"200": {
"description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "properties": {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "properties" : {
+ "ietf-restconf:operations" : {
+ "type" : "object"
+ }
}
}
},
- "application/xml": {
- "schema": {
+ "application/xml" : {
+ "schema" : {
+ "type" : "object",
+ "xml" : {
+ "name" : "operations",
+ "namespace" : "urn:ietf:params:xml:ns:yang:ietf-restconf"
+ }
}
}
}
}
},
- "description": "Queries the available operations (RPC calls) on the mounted hosted.",
+ "description": "The example demonstrates only top-level container \"ietf-restconf:operations\".\nThe request returns a list of all available operations on the mounted\nhost, showcasing the structure of RPCs that can be executed.",
"summary": "GET - 123 - datastore - operations"
}
},