Skip to content

Commit

Permalink
Update license and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TharmiganK committed Jun 12, 2024
1 parent aceee23 commit d5dcdbd
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@

/**
* Validates a ballerina http resource implemented via the service contract type.
*
* @since 2.12.0
*/
public final class HttpServiceContractResourceValidator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> supportedDiagnosticCodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> supportedDiagnosticCodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> supportedDiagnosticCodes() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit d5dcdbd

Please sign in to comment.