OpenaApi: Use empty content for operational GET 47/106747/17
authorPeter Suna <peter.suna@pantheon.tech>
Wed, 28 Jun 2023 10:29:58 +0000 (12:29 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Mon, 14 Aug 2023 13:55:58 +0000 (15:55 +0200)
commitb2ee5f01a2fa4508477a03bf55b21e541a65fa16
tree6cddaae76a292624810fbb67134c582f812e6d0f
parentef785ddb72aebb12e6311a545319a6bcb2efc3da
OpenaApi: Use empty content for operational GET

Previously, operational data was included in schemas
to provide a GET example for operational containers and lists.
However, removing this operational data caused an error in
the OpenAPI UI since the expected data was not found.

To address this issue, the operational data can be replaced
with empty content instead. Creating a duplicate schema
specifically for this use case is both memory-intensive
and unnecessary.

This commit solves the problem by adding empty example
for the operational GET data.

JIRA: NETCONF-1061
Change-Id: I1444aad588c42417e5ff21dee46ff91ec0a1a07d
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/BaseYangOpenApiGenerator.java
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/builder/OperationBuilder.java
restconf/restconf-openapi/src/test/java/org/opendaylight/restconf/openapi/OperationalDataTest.java