/*
 * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * Licensed 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 org.wso2.carbon.uuf.sample.api;

import org.wso2.carbon.uuf.api.RestApi;
import org.wso2.msf4j.Microservice;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

/**
 * A sample UI-specific REST API.
 *
 * @since 1.0.0
 */
public class HelloService implements Microservice, RestApi {

    @GET
    @Path("/name")
    public String getName() {
        return "Hey!, this is the /name resource of the Hello Service sample API.";
    }
}

@@ -797,16 +797,46 @@
 rs.Path;
+%0Aimport javax.ws.rs.PathParam;
 %0A%0A/**%0A *
@@ -865,16 +865,61 @@
 REST API
+ that produces simple hello greeting messages
 .%0A *%0A * 
@@ -997,16 +997,172 @@
 tApi %7B%0A%0A
+    /**%0A     * Returns a simple hello greeting for a given person name.%0A     *%0A     * @param name person name%0A     * @return hello greeting message%0A     */%0A
     @GET
@@ -1174,20 +1174,22 @@
 @Path(%22/
+%7B
 name
+%7D
 %22)%0A    p
@@ -1205,101 +1205,83 @@
 ing 
-getName() %7B%0A        return %22Hey!, this is the /name resource of the Hello Service sample API.
+hello(@PathParam(%22name%22) String name) %7B%0A        return %22Hello %22 + name + %22!
 %22;%0A 

fix HelloService to return a message