Package models

Examples of models.Pet


    @ApiOperation(value = "Add a new pet to the store", httpMethod = "POST")
    @ApiResponses(value = {@ApiResponse(code = 405, message = "Invalid input")})
    public static Result addPet() {
        Object o = request().body().asJson();
        try {
            Pet pet = (Pet) BaseApiController.mapper.readValue(o.toString(), Pet.class);
            petData.addPet(pet);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return JsonResponse("SUCCESS");
View Full Code Here


            @ApiResponse(code = 405, message = "Validation exception")})
    @ApiImplicitParams({@ApiImplicitParam(value = "Pet object that needs to be updated in the store", required = true, dataType = "Pet", paramType = "body")})
    public static Result updatePet() {
        Object o = request().body().asJson();
        try {
            Pet pet = (Pet) BaseApiController.mapper.readValue(o.toString(), Pet.class);
            petData.addPet(pet);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return JsonResponse("SUCCESS");
View Full Code Here

TOP

Related Classes of models.Pet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.