OpenAPI validator plugin gives error when ballerina file has multiple service
**Description:**
Gives error for below example
```ballerina
import ballerina/http;
import ballerina/openapi;

listener http:Listener ep0 = new (80, config = {host: "petstore.openapi.io"});

service /v1 on ep0 {

    resource function get pets(http:Caller caller, http:Request req) returns error? {
    }
    resource function post pets(http:Caller caller, http:Request req) returns error? {
    }
    resource function get pets/[int petId](http:Caller caller, http:Request req) returns error? {
    }
}

@openapi:ServiceInfo {
    contract: "openapiwetherMap.yaml",
    tags: [ ],
    operations:[]
}
service /data/'2\\.5 on new http:Listener(9090) {
    resource function get weather(string? id, string? lat, string? lon, string? zip, string? units, string? lang, string? mode) returns string {
        return "hello";
    }
    resource function get onecall(string lat, string lon, string? exclude, string? units, string? lang) returns string {
        return "hello";
    }
}
```
error
```
error: compilation failed: The compiler extension in package 'ballerina:openapi:0.9.0-beta.4' failed to complete. No value present
```
**expected** : give the warring diagnostic for relevant service node
**Affected Versions:**
Swank lanke Beta4 rc2
**OS, DB, other environment details and versions:**

**Related Issues (optional):**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

**Suggested Labels (optional):**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees (optional):**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->

diff --git a/openapi-validator/src/main/java/io/ballerina/openapi/validator/ServiceValidator.java b/openapi-validator/src/main/java/io/ballerina/openapi/validator/ServiceValidator.java
index 8b162e86..12fb5754 100644
--- a/openapi-validator/src/main/java/io/ballerina/openapi/validator/ServiceValidator.java
+++ b/openapi-validator/src/main/java/io/ballerina/openapi/validator/ServiceValidator.java
@@ -100,10 +100,13 @@ public class ServiceValidator implements AnalysisTask<SyntaxNodeAnalysisContext>
             // Load a service declarations for the path part in the yaml spec
             if (syntaxKind.equals(SyntaxKind.SERVICE_DECLARATION)) {
                 ServiceDeclarationNode serviceDeclarationNode = (ServiceDeclarationNode) node;
-                location = serviceDeclarationNode.location();
-                // Check annotation is available
-                kind = getDiagnosticFromServiceNode(functions, kind, filters, semanticModel, syntaxTree,
-                        ballerinaFilePath, serviceDeclarationNode);
+                Optional<MetadataNode> metadata = serviceDeclarationNode.metadata();
+                if (metadata.isPresent()) {
+                    location = serviceDeclarationNode.location();
+                    // Check annotation is available
+                    kind = getDiagnosticFromServiceNode(functions, kind, filters, semanticModel, syntaxTree,
+                            ballerinaFilePath, serviceDeclarationNode);
+                }
             }
         }
         if (!validations.isEmpty()) {
['openapi-validator/src/main/java/io/ballerina/openapi/validator/ServiceValidator.java']