OpenAPI: Remove not needed TODOs 58/110158/7
authorYaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Tue, 6 Feb 2024 12:05:25 +0000 (14:05 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Fri, 9 Feb 2024 15:06:13 +0000 (15:06 +0000)
Remove TODOs which were left from OpenAPI rewrite and which
we know they are already addressed, we cannot reproduce any issue
or were just no more valid comments.

JIRA: NETCONF-938
Change-Id: Id77f825d2eefe2ea6277bddeeccc6f2d8cb8909c
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/jaxrs/OpenApiBodyWriter.java
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/model/PostEntity.java

index f8e6657568e923f201b445790ed8bd67bdee8f37..d73956c203646687c7e3652b6a787f5f87c6e023 100644 (file)
@@ -40,7 +40,6 @@ public final class OpenApiBodyWriter implements MessageBodyWriter<OpenApiEntity>
         return OpenApiEntity.class.isAssignableFrom(type);
     }
 
-    // TODO IMO we can get rid of implementing MessageBodyWriter
     @Override
     public void writeTo(final OpenApiEntity entity, final Class<?> type, final Type genericType,
             final Annotation[] annotations, final MediaType mediaType, final MultivaluedMap<String, Object> httpHeaders,
index 54afe2325c4e1610b01be4a911290760210978a8..ac22978c6b3cb34d5acc465bc305741d3b44e43d 100644 (file)
@@ -70,7 +70,6 @@ public final class PostEntity extends OperationEntity {
             final var output = rpc.getOutput();
             final var operationName = rpc.getQName().getLocalName();
             if (!output.getChildNodes().isEmpty()) {
-                // TODO: add proper discriminator from DefinitionNames when schemas re-implementation is done
                 final var ref = processOperationsRef(rpc, operationName, "_output");
                 generator.writeObjectFieldStart(String.valueOf(OK.getStatusCode()));
                 generator.writeStringField(DESCRIPTION, String.format("RPC %s success", operationName));
@@ -105,7 +104,6 @@ public final class PostEntity extends OperationEntity {
             generator.writeStringField(DESCRIPTION, operationName + INPUT_SUFFIX);
             generator.writeObjectFieldStart(CONTENT);
             if (!input.getChildNodes().isEmpty()) {
-                // TODO: add proper discriminator from DefinitionNames when schemas re-implementation is done
                 final var ref = processOperationsRef(rpc, operationName, INPUT_SUFFIX);
                 generator.writeObjectFieldStart(MediaType.APPLICATION_JSON);
                 generator.writeObjectFieldStart(SCHEMA);
@@ -149,7 +147,6 @@ public final class PostEntity extends OperationEntity {
             generator.writeStringField(DESCRIPTION, nodeName());
             generator.writeObjectFieldStart(CONTENT);
             final var ref = COMPONENTS_PREFIX + moduleName() + "_" + refPath();
-            //TODO: Remove if and fix this weird logic of top level nodes
             var childConfig = true;
             if (schema() instanceof DataNodeContainer dataSchema) {
                 final var child = dataSchema.getChildNodes().stream()