Skip to content

Commit

Permalink
Run 'bin/jaxrs-resteasy-eap-petstore-server.sh'
Browse files Browse the repository at this point in the history
Update 'samples/server/petstore/jaxrs-resteasy/'
  • Loading branch information
jmini committed May 23, 2018
1 parent 27426f7 commit 2280270
Show file tree
Hide file tree
Showing 12 changed files with 398 additions and 145 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

public class Category {


private Long id = null;

private String name = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@

public class ModelApiResponse {


private Integer code = null;

private String type = null;

private String message = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@

public class Order {


private Long id = null;

private Long petId = null;

private Integer quantity = null;

private Date shipDate = null;

/**
Expand All @@ -41,7 +45,9 @@ public String toString() {
}
}


private StatusEnum status = null;

private Boolean complete = false;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@

public class Pet {


private Long id = null;

private Category category = null;

private String name = null;

private List<String> photoUrls = new ArrayList<String>();

private List<Tag> tags = new ArrayList<Tag>();

/**
Expand All @@ -44,6 +49,7 @@ public String toString() {
}
}


private StatusEnum status = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

public class Tag {


private Long id = null;

private String name = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@

public class User {


private Long id = null;

private String username = null;

private String firstName = null;

private String lastName = null;

private String email = null;

private String password = null;

private String phone = null;

private Integer userStatus = null;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
import java.util.Set;
import java.util.HashSet;

import org.openapitools.api.impl.PetApiServiceImpl;
import org.openapitools.api.impl.StoreApiServiceImpl;
import org.openapitools.api.impl.UserApiServiceImpl;
import org.openapitools.api.impl.DefaultApiServiceImpl;

@ApplicationPath("/")
public class RestApplication extends Application {


public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new HashSet<Class<?>>();
resources.add(PetApiServiceImpl.class);
resources.add(StoreApiServiceImpl.class);
resources.add(UserApiServiceImpl.class);
resources.add(DefaultApiServiceImpl.class);

return resources;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package org.openapitools.api.impl;

import org.openapitools.api.*;
import org.openapitools.model.*;
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;


import java.io.File;
import java.util.List;
import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Order;
import org.openapitools.model.Pet;
import org.openapitools.model.User;

import java.util.List;

import java.io.InputStream;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;


public class DefaultApiServiceImpl implements DefaultApi {
public Response addPet(Pet pet,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response createUser(User user,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response createUsersWithArrayInput(List<User> user,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response createUsersWithListInput(List<User> user,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response deleteOrder(String orderId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response deletePet(Long petId,String apiKey,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response deleteUser(String username,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response findPetsByStatus(List<String> status,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response findPetsByTags(List<String> tags,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response getInventory(SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response getOrderById(Long orderId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response getPetById(Long petId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response getUserByName(String username,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response loginUser(String username,String password,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response logoutUser(SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response placeOrder(Order order,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response updatePet(Pet pet,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response updateUser(String username,User user,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
public Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 2280270

Please # to comment.