Do not create OpenApiObject twice 21/105821/10
authorPeter Suna <peter.suna@pantheon.tech>
Wed, 3 May 2023 14:29:30 +0000 (16:29 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Fri, 12 May 2023 10:43:32 +0000 (12:43 +0200)
commitf2d036b03196cdc2b3ff07224a4845b178ae8695
treee9afee5eac0b5e7d72090ce3dc39b88b852a2d8a
parente391a767fc1c41fa764614a469db9ccf63c0cc9a
Do not create OpenApiObject twice

Refactor the getMountPointApi method to prevent the creation
of two OpenApiObject instances. Currently,
this duplication occurs because the method is responsible for both
creating the required paths and generating the OpenApiObject.

To improve the code, separate these two functions and use only
the method that creates the data-store paths. This change will make
the code cleaner and more efficient, and help to avoid any potential
issues caused by duplicate objects.

JIRA: NETCONF-1007
Change-Id: I5ff38b706ce34c270f43fd4cf00a98efcbdaf888
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointOpenApi.java