diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceFunctionNode.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceFunctionNode.java index d7c2dc99e9..4387318fb4 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceFunctionNode.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpResourceFunctionNode.java @@ -31,6 +31,11 @@ import java.util.Objects; import java.util.Optional; +/** + * Represents an HTTP resource function node which abstracts the function definition node and method declaration node. + * + * @since 2.12.0 + */ public class HttpResourceFunctionNode { Node functionNode; diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceContractResourceValidator.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceContractResourceValidator.java index e4d01e80ba..e47e0ea935 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceContractResourceValidator.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceContractResourceValidator.java @@ -56,6 +56,8 @@ /** * Validates a ballerina http resource implemented via the service contract type. + * + * @since 2.12.0 */ public final class HttpServiceContractResourceValidator { diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceObjTypeAnalyzer.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceObjTypeAnalyzer.java index e4cdea7fa5..b34236dde3 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceObjTypeAnalyzer.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/HttpServiceObjTypeAnalyzer.java @@ -39,6 +39,11 @@ import static io.ballerina.stdlib.http.compiler.Constants.HTTP_SERVICE_TYPE; import static io.ballerina.stdlib.http.compiler.Constants.SERVICE_CONTRACT_TYPE; +/** + * Validates the HTTP service object type. + * + * @since 2.12.0 + */ public class HttpServiceObjTypeAnalyzer extends HttpServiceValidator { @Override diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/AddBasePathCodeAction.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/AddBasePathCodeAction.java index 0138b085bb..08b23ef231 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/AddBasePathCodeAction.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/AddBasePathCodeAction.java @@ -42,6 +42,12 @@ import static io.ballerina.stdlib.http.compiler.codeaction.Constants.EXPECTED_BASE_PATH; import static io.ballerina.stdlib.http.compiler.codeaction.Constants.NODE_LOCATION_KEY; +/** + * Represents a code action to add the expected base path to the service declaration + * from the service contract type. + * + * @since 2.12.0 + */ public class AddBasePathCodeAction implements CodeAction { @Override public List supportedDiagnosticCodes() { diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ChangeBasePathCodeAction.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ChangeBasePathCodeAction.java index d81fc995d4..c994c7cf0b 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ChangeBasePathCodeAction.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ChangeBasePathCodeAction.java @@ -42,6 +42,12 @@ import static io.ballerina.stdlib.http.compiler.codeaction.Constants.EXPECTED_BASE_PATH; import static io.ballerina.stdlib.http.compiler.codeaction.Constants.NODE_LOCATION_KEY; +/** + * Represents a code action to replace the existing base path of the service declaration + * with the expected base path from the service contract type. + * + * @since 2.12.0 + */ public class ChangeBasePathCodeAction implements CodeAction { @Override public List supportedDiagnosticCodes() { diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ImplementServiceContract.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ImplementServiceContract.java index a8a0abb3a8..42c0a4f768 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ImplementServiceContract.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codeaction/ImplementServiceContract.java @@ -58,6 +58,11 @@ import static io.ballerina.stdlib.http.compiler.codeaction.Constants.LS; import static io.ballerina.stdlib.http.compiler.codeaction.Constants.NODE_LOCATION_KEY; +/** + * Represents a code action to implement all the resource methods from the service contract type. + * + * @since 2.12.0 + */ public class ImplementServiceContract implements CodeAction { @Override public List supportedDiagnosticCodes() { diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/HttpServiceFromContract.java b/native/src/main/java/io/ballerina/stdlib/http/api/HttpServiceFromContract.java index 98c6874039..5bc2c3374b 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/HttpServiceFromContract.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/HttpServiceFromContract.java @@ -1,3 +1,20 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package io.ballerina.stdlib.http.api; import io.ballerina.runtime.api.types.AnnotatableType; @@ -14,6 +31,11 @@ import static io.ballerina.runtime.api.utils.StringUtils.fromString; import static io.ballerina.stdlib.http.api.HttpUtil.checkConfigAnnotationAvailability; +/** + * Represents an HTTP service built from a service contract type. + * + * @since 2.0.0 + */ public class HttpServiceFromContract extends HttpService { private ReferenceType serviceContractType;