From b682728e201f69a770edf9ada69d761261e77cee Mon Sep 17 00:00:00 2001 From: lubos-cicut Date: Thu, 29 Feb 2024 15:32:28 +0100 Subject: [PATCH] OpenAPI: netopeer2 wrong schemas for actions Schemas for actions weren't generated correctly. There were missing parent node name. In path ref if action was nested in more containers were missing all parent nodes. Edit of expected documents was necessary due to changes. JIRA: NETCONF-1259 Change-Id: I0cf4769122ab00e62687ec01399d5de1b3bb3baf Signed-off-by: lubos-cicut Signed-off-by: Ivan Hrasko --- .../restconf/openapi/impl/PathsStream.java | 31 +++++++++++------- .../restconf/openapi/impl/SchemasStream.java | 2 +- .../restconf/openapi/model/PostEntity.java | 17 ++++++---- .../controller-action-types.json | 32 +++++++++---------- .../operational-document/controller-all.json | 32 +++++++++---------- .../device-action-types.json | 32 +++++++++---------- .../operational-document/device-all.json | 32 +++++++++---------- .../controller-action-types.json | 32 +++++++++---------- .../yang-document/controller-all.json | 32 +++++++++---------- .../yang-document/device-action-types.json | 32 +++++++++---------- .../resources/yang-document/device-all.json | 32 +++++++++---------- 11 files changed, 159 insertions(+), 147 deletions(-) diff --git a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/PathsStream.java b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/PathsStream.java index 8382614ad5..21e45bd851 100644 --- a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/PathsStream.java +++ b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/PathsStream.java @@ -169,7 +169,8 @@ public final class PathsStream extends InputStream { // RPC operations (via post) - RPCs have their own path for (final var rpc : module.getRpcs()) { final var localName = rpc.getQName().getLocalName(); - final var post = new PostEntity(rpc, deviceName, module.getName(), new ArrayList<>(), localName, null); + final var post = new PostEntity(rpc, deviceName, module.getName(), List.of(), localName, null, + List.of()); final var resolvedPath = basePath + OPERATIONS + urlPrefix + "/" + module.getName() + ":" + localName; final var entity = new PathEntity(resolvedPath, post); result.add(entity); @@ -183,7 +184,7 @@ public final class PathsStream extends InputStream { if (isConfig && !hasRootPostLink && isForSingleModule) { final var resolvedPath = basePath + DATA + urlPrefix; result.add(new PathEntity(resolvedPath, - new PostEntity(node, deviceName, moduleName, new ArrayList<>(), nodeLocalName, module))); + new PostEntity(node, deviceName, moduleName, List.of(), nodeLocalName, module, List.of()))); hasRootPostLink = true; } //process first node @@ -191,7 +192,7 @@ public final class PathsStream extends InputStream { final var localName = moduleName + ":" + nodeLocalName; final var path = urlPrefix + "/" + processPath(node, pathParams, localName); processChildNode(node, pathParams, moduleName, result, path, nodeLocalName, isConfig, schemaContext, - deviceName, basePath, null); + deviceName, basePath, null, List.of()); } } return result; @@ -200,7 +201,7 @@ public final class PathsStream extends InputStream { private static void processChildNode(final DataSchemaNode node, final List pathParams, final String moduleName, final Deque result, final String path, final String refPath, final boolean isConfig, final EffectiveModelContext schemaContext, final String deviceName, - final String basePath, final SchemaNode parentNode) { + final String basePath, final SchemaNode parentNode, final List parentNodes) { final var resourcePath = basePath + DATA + path; final var fullName = resolveFullNameFromNode(node.getQName(), schemaContext); final var firstChild = getListOrContainerChildNode((DataNodeContainer) node); @@ -212,25 +213,31 @@ public final class PathsStream extends InputStream { isConfig, fullName, deviceName)); } final var childNodes = ((DataNodeContainer) node).getChildNodes(); + final var listOfParents = new ArrayList<>(parentNodes); + if (parentNode != null) { + listOfParents.add(parentNode); + } if (node instanceof ActionNodeContainer actionContainer) { + final var listOfParentsForActions = new ArrayList<>(listOfParents); + listOfParentsForActions.add(node); final var actionParams = new ArrayList<>(pathParams); actionContainer.getActions().forEach(actionDef -> { final var resourceActionPath = path + "/" + resolvePathArgumentsName(actionDef.getQName(), node.getQName(), schemaContext); final var childPath = basePath + OPERATIONS + resourceActionPath; result.add(processActionPathEntity(actionDef, childPath, actionParams, moduleName, - refPath, deviceName, parentNode)); + refPath, deviceName, parentNode, listOfParentsForActions)); }); } for (final var childNode : childNodes) { - final var childParams = new ArrayList<>(pathParams); - final var newRefPath = refPath + "_" + childNode.getQName().getLocalName(); if (childNode instanceof ListSchemaNode || childNode instanceof ContainerSchemaNode) { + final var childParams = new ArrayList<>(pathParams); + final var newRefPath = refPath + "_" + childNode.getQName().getLocalName(); final var localName = resolvePathArgumentsName(childNode.getQName(), node.getQName(), schemaContext); final var resourceDataPath = path + "/" + processPath(childNode, childParams, localName); final var newConfig = isConfig && childNode.isConfiguration(); processChildNode(childNode, childParams, moduleName, result, resourceDataPath, newRefPath, newConfig, - schemaContext, deviceName, basePath, node); + schemaContext, deviceName, basePath, node, listOfParents); } } } @@ -261,9 +268,9 @@ public final class PathsStream extends InputStream { final boolean isConfig, final String fullName, final SchemaNode childNode, final String deviceName) { if (isConfig) { final var childNodeRefPath = refPath + "_" + childNode.getQName().getLocalName(); - var post = new PostEntity(childNode, deviceName, moduleName, pathParams, childNodeRefPath, node); + var post = new PostEntity(childNode, deviceName, moduleName, pathParams, childNodeRefPath, node, List.of()); if (!((DataSchemaNode) childNode).isConfiguration()) { - post = new PostEntity(node, deviceName, moduleName, pathParams, refPath, null); + post = new PostEntity(node, deviceName, moduleName, pathParams, refPath, null, List.of()); } return new PathEntity(resourcePath, post, new PatchEntity(node, deviceName, moduleName, pathParams, refPath, fullName), @@ -278,9 +285,9 @@ public final class PathsStream extends InputStream { private static PathEntity processActionPathEntity(final SchemaNode node, final String resourcePath, final List pathParams, final String moduleName, final String refPath, - final String deviceName, final SchemaNode parentNode) { + final String deviceName, final SchemaNode parentNode, final List parentNodes) { return new PathEntity(resourcePath, - new PostEntity(node, deviceName, moduleName, pathParams, refPath, parentNode)); + new PostEntity(node, deviceName, moduleName, pathParams, refPath, parentNode, parentNodes)); } private static String processPath(final DataSchemaNode node, final List pathParams, diff --git a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/SchemasStream.java b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/SchemasStream.java index e3de701dcf..c1efb8da64 100644 --- a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/SchemasStream.java +++ b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/SchemasStream.java @@ -192,7 +192,7 @@ public final class SchemasStream extends InputStream { final var isConfig = node.isConfiguration() && isParentConfig; result.add(child); stack.enterSchemaTree(node.getQName()); - processActions(node, title, stack, definitionNames, result, parentName); + processActions(node, newTitle, stack, definitionNames, result, parentName); for (final var childNode : ((DataNodeContainer) node).getChildNodes()) { processDataAndActionNodes(childNode, newTitle, stack, definitionNames, result, newTitle, isConfig); } diff --git a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/PostEntity.java b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/PostEntity.java index ac22978c6b..186b938317 100644 --- a/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/PostEntity.java +++ b/restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/PostEntity.java @@ -40,12 +40,15 @@ public final class PostEntity extends OperationEntity { """; private final @Nullable DocumentedNode parentNode; + private final @NonNull List parentNodes; public PostEntity(final @NonNull SchemaNode schema, final @NonNull String deviceName, final @NonNull String moduleName, final @NonNull List parameters, - final @NonNull String refPath, final @Nullable DocumentedNode parentNode) { + final @NonNull String refPath, final @Nullable DocumentedNode parentNode, + final @NonNull List parentNodes) { super(requireNonNull(schema), deviceName, moduleName, requireNonNull(parameters), requireNonNull(refPath)); this.parentNode = parentNode; + this.parentNodes = requireNonNull(parentNodes); } protected @NonNull String operation() { @@ -206,14 +209,16 @@ public final class PostEntity extends OperationEntity { } private String processOperationsRef(final OperationDefinition def, final String operationName, final String suf) { - if (def instanceof ActionDefinition && parentNode != null) { - final var parentName = ((DataSchemaNode) parentNode).getQName().getLocalName(); + final var ref = new StringBuilder(COMPONENTS_PREFIX + moduleName() + "_"); + if (def instanceof ActionDefinition) { final boolean hasChildNodes = suf.equals(INPUT_SUFFIX) ? !def.getInput().getChildNodes().isEmpty() - : !def.getOutput().getChildNodes().isEmpty(); + : !def.getOutput().getChildNodes().isEmpty(); if (hasChildNodes) { - return COMPONENTS_PREFIX + moduleName() + "_" + parentName + "_" + operationName + suf; + for (final SchemaNode node : parentNodes) { + ref.append(node.getQName().getLocalName()).append("_"); + } } } - return COMPONENTS_PREFIX + moduleName() + "_" + operationName + suf; + return ref.append(operationName).append(suf).toString(); } } diff --git a/restconf/restconf-openapi/src/test/resources/operational-document/controller-action-types.json b/restconf/restconf-openapi/src/test/resources/operational-document/controller-action-types.json index 84d8b0bb20..c2125da571 100644 --- a/restconf/restconf-openapi/src/test/resources/operational-document/controller-action-types.json +++ b/restconf/restconf-openapi/src/test/resources/operational-document/controller-action-types.json @@ -153,14 +153,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -174,12 +174,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -586,14 +586,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -607,12 +607,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -795,7 +795,7 @@ }, "components": { "schemas": { - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -810,7 +810,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -835,7 +835,7 @@ "title": "action-types_multi-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -850,10 +850,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -868,7 +868,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "action-types_multi-container_inner-container": { @@ -895,7 +895,7 @@ "title": "action-types_list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -910,7 +910,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" } }, diff --git a/restconf/restconf-openapi/src/test/resources/operational-document/controller-all.json b/restconf/restconf-openapi/src/test/resources/operational-document/controller-all.json index 371eaba4db..a9cd56a792 100644 --- a/restconf/restconf-openapi/src/test/resources/operational-document/controller-all.json +++ b/restconf/restconf-openapi/src/test/resources/operational-document/controller-all.json @@ -153,14 +153,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -174,12 +174,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -748,14 +748,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -769,12 +769,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -1332,7 +1332,7 @@ "title": "operational_root", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -1347,7 +1347,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "operational_root_oper-container_config-container": { @@ -1438,7 +1438,7 @@ "title": "operational_root_config-container_config-container-oper-list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -1453,10 +1453,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" }, - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -1471,7 +1471,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -1483,7 +1483,7 @@ "title": "action-types_container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -1498,7 +1498,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, "operational_root_oper-container_oper-container-list": { diff --git a/restconf/restconf-openapi/src/test/resources/operational-document/device-action-types.json b/restconf/restconf-openapi/src/test/resources/operational-document/device-action-types.json index e6c557679b..886d706c34 100644 --- a/restconf/restconf-openapi/src/test/resources/operational-document/device-action-types.json +++ b/restconf/restconf-openapi/src/test/resources/operational-document/device-action-types.json @@ -31,14 +31,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -52,12 +52,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -78,14 +78,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -99,12 +99,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -795,7 +795,7 @@ }, "components": { "schemas": { - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -810,7 +810,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -835,7 +835,7 @@ "title": "action-types_multi-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -850,10 +850,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -868,7 +868,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "action-types_multi-container_inner-container": { @@ -895,7 +895,7 @@ "title": "action-types_list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -910,7 +910,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" } }, diff --git a/restconf/restconf-openapi/src/test/resources/operational-document/device-all.json b/restconf/restconf-openapi/src/test/resources/operational-document/device-all.json index 425eeb0907..f180b3a5a4 100644 --- a/restconf/restconf-openapi/src/test/resources/operational-document/device-all.json +++ b/restconf/restconf-openapi/src/test/resources/operational-document/device-all.json @@ -31,14 +31,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -52,12 +52,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -78,14 +78,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -99,12 +99,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -1360,7 +1360,7 @@ "title": "operational_root", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -1375,7 +1375,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "operational_root_oper-container_config-container": { @@ -1466,7 +1466,7 @@ "title": "operational_root_config-container_config-container-oper-list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -1481,10 +1481,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" }, - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -1499,7 +1499,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -1511,7 +1511,7 @@ "title": "action-types_container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -1526,7 +1526,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, "operational_root_oper-container_oper-container-list": { diff --git a/restconf/restconf-openapi/src/test/resources/yang-document/controller-action-types.json b/restconf/restconf-openapi/src/test/resources/yang-document/controller-action-types.json index ae785c2689..cc34adf04a 100644 --- a/restconf/restconf-openapi/src/test/resources/yang-document/controller-action-types.json +++ b/restconf/restconf-openapi/src/test/resources/yang-document/controller-action-types.json @@ -153,14 +153,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -174,12 +174,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -586,14 +586,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -607,12 +607,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -795,7 +795,7 @@ }, "components": { "schemas": { - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -810,7 +810,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -835,7 +835,7 @@ "title": "action-types_multi-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -850,10 +850,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -868,7 +868,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "action-types_multi-container_inner-container": { @@ -895,7 +895,7 @@ "title": "action-types_list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -910,7 +910,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" } }, diff --git a/restconf/restconf-openapi/src/test/resources/yang-document/controller-all.json b/restconf/restconf-openapi/src/test/resources/yang-document/controller-all.json index 2b24cee46f..abe2ec6489 100644 --- a/restconf/restconf-openapi/src/test/resources/yang-document/controller-all.json +++ b/restconf/restconf-openapi/src/test/resources/yang-document/controller-all.json @@ -540,14 +540,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -561,12 +561,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -8912,14 +8912,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -8933,12 +8933,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -12131,7 +12131,7 @@ "title": "typed-params_typed", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -12146,7 +12146,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" }, "typed-params_typed_uint32": { @@ -13350,7 +13350,7 @@ "title": "typed-params_typed_uint8", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -13365,7 +13365,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "toaster2_lst_lst1": { @@ -13499,7 +13499,7 @@ "title": "typed-params_typed_int8", "type": "object" }, - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -13514,7 +13514,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "recursive_container-root_root-list": { @@ -13568,7 +13568,7 @@ "title": "choice-test_first-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -13583,7 +13583,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, "definition-test_network-container": { diff --git a/restconf/restconf-openapi/src/test/resources/yang-document/device-action-types.json b/restconf/restconf-openapi/src/test/resources/yang-document/device-action-types.json index f15b08a38f..2f8676185c 100644 --- a/restconf/restconf-openapi/src/test/resources/yang-document/device-action-types.json +++ b/restconf/restconf-openapi/src/test/resources/yang-document/device-action-types.json @@ -31,14 +31,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -52,12 +52,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -78,14 +78,14 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } }, "application/json": { "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -99,12 +99,12 @@ "content": { "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -795,7 +795,7 @@ }, "components": { "schemas": { - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -810,7 +810,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "action-types_container": { @@ -835,7 +835,7 @@ "title": "action-types_multi-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -850,10 +850,10 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -868,7 +868,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "action-types_multi-container_inner-container": { @@ -895,7 +895,7 @@ "title": "action-types_list", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -910,7 +910,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" } }, diff --git a/restconf/restconf-openapi/src/test/resources/yang-document/device-all.json b/restconf/restconf-openapi/src/test/resources/yang-document/device-all.json index ab1fa05cd2..d12cf1cd74 100644 --- a/restconf/restconf-openapi/src/test/resources/yang-document/device-all.json +++ b/restconf/restconf-openapi/src/test/resources/yang-document/device-all.json @@ -2877,7 +2877,7 @@ "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_container-action_input", + "$ref": "#/components/schemas/action-types_container_container-action_input", "type": "object" } } @@ -2885,7 +2885,7 @@ }, "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_input" + "$ref": "#/components/schemas/action-types_container_container-action_input" } } } @@ -2896,12 +2896,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } }, "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_container-action_output" + "$ref": "#/components/schemas/action-types_container_container-action_output" } } } @@ -9627,7 +9627,7 @@ "schema": { "properties": { "input": { - "$ref": "#/components/schemas/action-types_list-action_input", + "$ref": "#/components/schemas/action-types_list_list-action_input", "type": "object" } } @@ -9635,7 +9635,7 @@ }, "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_input" + "$ref": "#/components/schemas/action-types_list_list-action_input" } } } @@ -9646,12 +9646,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } }, "application/xml": { "schema": { - "$ref": "#/components/schemas/action-types_list-action_output" + "$ref": "#/components/schemas/action-types_list_list-action_output" } } } @@ -12159,7 +12159,7 @@ "title": "typed-params_typed", "type": "object" }, - "action-types_container-action_output": { + "action-types_container_container-action_output": { "required": [ "ca-output" ], @@ -12174,7 +12174,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_output", + "title": "action-types_container_container-action_output", "type": "object" }, "typed-params_typed_uint32": { @@ -13378,7 +13378,7 @@ "title": "typed-params_typed_uint8", "type": "object" }, - "action-types_container-action_input": { + "action-types_container_container-action_input": { "required": [ "ca-input" ], @@ -13393,7 +13393,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_container-action_input", + "title": "action-types_container_container-action_input", "type": "object" }, "toaster2_lst_lst1": { @@ -13527,7 +13527,7 @@ "title": "typed-params_typed_int8", "type": "object" }, - "action-types_list-action_input": { + "action-types_list_list-action_input": { "required": [ "la-input" ], @@ -13542,7 +13542,7 @@ "name": "input", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_input", + "title": "action-types_list_list-action_input", "type": "object" }, "recursive_container-root_root-list": { @@ -13596,7 +13596,7 @@ "title": "choice-test_first-container", "type": "object" }, - "action-types_list-action_output": { + "action-types_list_list-action_output": { "required": [ "la-output" ], @@ -13611,7 +13611,7 @@ "name": "output", "namespace": "urn:ietf:params:xml:ns:yang:test:action:types" }, - "title": "action-types_list-action_output", + "title": "action-types_list_list-action_output", "type": "object" }, "definition-test_network-container": { -- 2.36.6