Skip to content

Commit

Permalink
Fix compiler issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TharmiganK committed Jun 27, 2024
1 parent 27c6004 commit da75757
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package io.ballerina.openapi.service.mapper.metainfo;

import io.ballerina.compiler.syntax.tree.ServiceDeclarationNode;
import io.ballerina.openapi.service.mapper.model.ServiceNode;
import io.swagger.v3.oas.models.OpenAPI;

/**
Expand All @@ -27,5 +27,5 @@
* @since 2.0.1
*/
public interface MetaInfoMapper {
void setResourceMetaData(OpenAPI openAPI, ServiceDeclarationNode serviceNode);
void setResourceMetaData(OpenAPI openAPI, ServiceNode serviceNode);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
import io.ballerina.compiler.syntax.tree.NodeList;
import io.ballerina.compiler.syntax.tree.QualifiedNameReferenceNode;
import io.ballerina.compiler.syntax.tree.SeparatedNodeList;
import io.ballerina.compiler.syntax.tree.ServiceDeclarationNode;
import io.ballerina.compiler.syntax.tree.SpecificFieldNode;
import io.ballerina.compiler.syntax.tree.SyntaxKind;
import io.ballerina.compiler.syntax.tree.Token;
import io.ballerina.openapi.service.mapper.model.ResourceFunction;
import io.ballerina.openapi.service.mapper.model.ResourceFunctionDefinition;
import io.ballerina.openapi.service.mapper.model.ServiceNode;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.Paths;
Expand Down Expand Up @@ -69,7 +71,7 @@
*/
public class MetaInfoMapperImpl implements MetaInfoMapper {

public void setResourceMetaData(OpenAPI openAPI, ServiceDeclarationNode serviceNode) {
public void setResourceMetaData(OpenAPI openAPI, ServiceNode serviceNode) {
NodeList<Node> functions = serviceNode.members();
Map<String, ResourceMetaInfoAnnotation> resourceMetaData = new HashMap<>();
for (Node function : functions) {
Expand All @@ -80,7 +82,8 @@ public void setResourceMetaData(OpenAPI openAPI, ServiceDeclarationNode serviceN
if (optMetadata.isEmpty()) {
continue;
}
String operationId = getOperationId(resourceNode);
ResourceFunction resourceFunction = new ResourceFunctionDefinition(resourceNode);
String operationId = getOperationId(resourceFunction);
ResourceMetaInfoAnnotation.Builder resMetaInfoBuilder = new ResourceMetaInfoAnnotation.Builder();
MetadataNode metadataNode = optMetadata.get();
NodeList<AnnotationNode> annotations = metadataNode.annotations();
Expand Down

0 comments on commit da75757

Please sign in to comment.