OpenApi for TransportPCE with controller resources fix 81/111281/18
authorlubos-cicut <lubos.cicut@pantheon.tech>
Fri, 5 Apr 2024 11:54:13 +0000 (13:54 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 16 May 2024 13:56:20 +0000 (13:56 +0000)
commitd8fe8420427df7fda0e5d4033b0bb979388d1295
treee34728af4a852c358688a944e07fcd0567769fc0
parent56651b9dfbe7510c1cbe570bddd6bb8dd82037df
OpenApi for TransportPCE with controller resources fix

Openapi did not fully work for TransportPCE when we selected
"Controller resource - Restconf RFC 8040". This was due to multiple
generation of the API for models with a different revision, now it
is only generated for the latest version.

Added tests for this case which show that the models are loaded
correctly and targeting to a model with an old revision returns the
correct output.

JIRA: NETCONF-1279
Change-Id: I3042c51715eddfaabe0a1179f1fd0d6cabc9c976
Signed-off-by: lubos-cicut <lubos.cicut@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/mountpoints/MountPointOpenApi.java
restconf/restconf-openapi/src/test/java/org/opendaylight/restconf/openapi/impl/ToasterDocumentTest.java
restconf/restconf-openapi/src/test/resources/toaster-document/controller-toaster-old.json [new file with mode: 0644]
restconf/restconf-openapi/src/test/resources/toaster-document/device-toaster-old.json [new file with mode: 0644]
restconf/restconf-openapi/src/test/resources/toaster-document/toaster@2009-11-19.yang [new file with mode: 0644]
restconf/restconf-openapi/src/test/resources/toaster-document/toaster@2009-11-20.yang [moved from restconf/restconf-openapi/src/test/resources/toaster-document/toaster.yang with 100% similarity]