Push up-to-date generated samples

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
This commit is contained in:
tim.quinn@oracle.com 2022-10-14 10:16:27 -05:00
parent 5b3a7b0cff
commit 715bbfab56
11 changed files with 110 additions and 89 deletions

View File

@ -1,3 +1,4 @@
README.md
docs/AdditionalPropertiesClass.md
docs/AllOfWithSingleRef.md
docs/Animal.md
@ -53,6 +54,7 @@ docs/StoreApi.md
docs/Tag.md
docs/User.md
docs/UserApi.md
pom.xml
src/main/java/org/openapitools/client/JavaTimeFormatter.java
src/main/java/org/openapitools/client/RFC3339DateFormat.java
src/main/java/org/openapitools/client/api/AnotherFakeApi.java

View File

@ -1,3 +1,4 @@
README.md
docs/AdditionalPropertiesClass.md
docs/AllOfWithSingleRef.md
docs/Animal.md
@ -53,6 +54,7 @@ docs/StoreApi.md
docs/Tag.md
docs/User.md
docs/UserApi.md
pom.xml
src/main/java/org/openapitools/client/ApiClient.java
src/main/java/org/openapitools/client/ApiResponse.java
src/main/java/org/openapitools/client/ApiResponseBase.java

View File

@ -1,13 +1,22 @@
README.md
pom.xml
src/main/java/org/openapitools/server/JavaTimeFormatter.java
src/main/java/org/openapitools/server/RFC3339DateFormat.java
src/main/java/org/openapitools/server/RestApplication.java
src/main/java/org/openapitools/server/api/AnotherFakeService.java
src/main/java/org/openapitools/server/api/AnotherFakeServiceImpl.java
src/main/java/org/openapitools/server/api/DefaultService.java
src/main/java/org/openapitools/server/api/DefaultServiceImpl.java
src/main/java/org/openapitools/server/api/FakeClassnameTags123Service.java
src/main/java/org/openapitools/server/api/FakeClassnameTags123ServiceImpl.java
src/main/java/org/openapitools/server/api/FakeService.java
src/main/java/org/openapitools/server/api/FakeServiceImpl.java
src/main/java/org/openapitools/server/api/PetService.java
src/main/java/org/openapitools/server/api/PetServiceImpl.java
src/main/java/org/openapitools/server/api/StoreService.java
src/main/java/org/openapitools/server/api/StoreServiceImpl.java
src/main/java/org/openapitools/server/api/UserService.java
src/main/java/org/openapitools/server/api/UserServiceImpl.java
src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java
src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java
src/main/java/org/openapitools/server/model/Animal.java
@ -56,6 +65,8 @@ src/main/java/org/openapitools/server/model/SingleRefType.java
src/main/java/org/openapitools/server/model/SpecialModelName.java
src/main/java/org/openapitools/server/model/Tag.java
src/main/java/org/openapitools/server/model/User.java
src/main/java/org/openapitools/server/package-info.java
src/main/resources/META-INF/beans.xml
src/main/resources/META-INF/microprofile-config.properties
src/main/resources/META-INF/openapi.yml
src/main/resources/logging.properties

View File

@ -15,7 +15,6 @@ package org.openapitools.server.api;
import org.openapitools.server.model.Client;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -31,7 +30,8 @@ public class AnotherFakeServiceImpl implements AnotherFakeService {
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
public Response call123testSpecialTags(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
public Client call123testSpecialTags(@Valid @NotNull Client client) {
Client result = null; // Replace with correct business logic.
return result;
}
}

View File

@ -15,7 +15,6 @@ package org.openapitools.server.api;
import org.openapitools.server.model.FooGetDefaultResponse;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -30,7 +29,8 @@ public class DefaultServiceImpl implements DefaultService {
@GET
@Produces({ "application/json" })
public Response fooGet() {
return Response.ok().entity("magic!").build();
public FooGetDefaultResponse fooGet() {
FooGetDefaultResponse result = null; // Replace with correct business logic.
return result;
}
}

View File

@ -15,7 +15,6 @@ package org.openapitools.server.api;
import org.openapitools.server.model.Client;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -31,7 +30,8 @@ public class FakeClassnameTags123ServiceImpl implements FakeClassnameTags123Serv
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
public Response testClassname(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
public Client testClassname(@Valid @NotNull Client client) {
Client result = null; // Replace with correct business logic.
return result;
}
}

View File

@ -27,7 +27,6 @@ import org.openapitools.server.model.Pet;
import org.openapitools.server.model.User;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -43,119 +42,116 @@ public class FakeServiceImpl implements FakeService {
@GET
@Path("/health")
@Produces({ "application/json" })
public Response fakeHealthGet() {
return Response.ok().entity("magic!").build();
public HealthCheckResult fakeHealthGet() {
HealthCheckResult result = null; // Replace with correct business logic.
return result;
}
@GET
@Path("/http-signature-test")
@Consumes({ "application/json", "application/xml" })
public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") String query1,@HeaderParam("header_1") String header1) {
return Response.ok().entity("magic!").build();
public void fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") String query1,@HeaderParam("header_1") String header1) {
}
@POST
@Path("/outer/boolean")
@Consumes({ "application/json" })
@Produces({ "*/*" })
public Response fakeOuterBooleanSerialize(@Valid Boolean body) {
return Response.ok().entity("magic!").build();
public Boolean fakeOuterBooleanSerialize(@Valid Boolean body) {
Boolean result = new Boolean(false); // Replace with correct business logic.
return result;
}
@POST
@Path("/outer/composite")
@Consumes({ "application/json" })
@Produces({ "*/*" })
public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) {
return Response.ok().entity("magic!").build();
public OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) {
OuterComposite result = null; // Replace with correct business logic.
return result;
}
@POST
@Path("/outer/number")
@Consumes({ "application/json" })
@Produces({ "*/*" })
public Response fakeOuterNumberSerialize(@Valid BigDecimal body) {
return Response.ok().entity("magic!").build();
public BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body) {
BigDecimal result = null; // Replace with correct business logic.
return result;
}
@POST
@Path("/outer/string")
@Consumes({ "application/json" })
@Produces({ "*/*" })
public Response fakeOuterStringSerialize(@Valid String body) {
return Response.ok().entity("magic!").build();
public String fakeOuterStringSerialize(@Valid String body) {
String result = ""; // Replace with correct business logic.
return result;
}
@POST
@Path("/property/enum-int")
@Consumes({ "application/json" })
@Produces({ "*/*" })
public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) {
return Response.ok().entity("magic!").build();
public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) {
OuterObjectWithEnumProperty result = null; // Replace with correct business logic.
return result;
}
@PUT
@Path("/body-with-binary")
@Consumes({ "image/png" })
public Response testBodyWithBinary(@Valid File body) {
return Response.ok().entity("magic!").build();
public void testBodyWithBinary(@Valid File body) {
}
@PUT
@Path("/body-with-file-schema")
@Consumes({ "application/json" })
public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass fileSchemaTestClass) {
return Response.ok().entity("magic!").build();
public void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass fileSchemaTestClass) {
}
@PUT
@Path("/body-with-query-params")
@Consumes({ "application/json" })
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
public void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User user) {
}
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
public Response testClientModel(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
public Client testClientModel(@Valid @NotNull Client client) {
Client result = null; // Replace with correct business logic.
return result;
}
@POST
@Consumes({ "application/x-www-form-urlencoded" })
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") OffsetDateTime dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) {
return Response.ok().entity("magic!").build();
public void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") OffsetDateTime dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) {
}
@GET
@Consumes({ "application/x-www-form-urlencoded" })
public Response testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
return Response.ok().entity("magic!").build();
public void testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@QueryParam("enum_query_double") Double enumQueryDouble,@QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
}
@DELETE
public Response testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@QueryParam("string_group") Integer stringGroup,@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group) {
return Response.ok().entity("magic!").build();
public void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@QueryParam("string_group") Integer stringGroup,@HeaderParam("boolean_group") Boolean booleanGroup,@QueryParam("int64_group") Long int64Group) {
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, String> requestBody) {
return Response.ok().entity("magic!").build();
public void testInlineAdditionalProperties(@Valid @NotNull Map<String, String> requestBody) {
}
@GET
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
return Response.ok().entity("magic!").build();
public void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
}
@PUT
@Path("/test-query-parameters")
public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map<String, String> language) {
return Response.ok().entity("magic!").build();
public void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map<String, String> language) {
}
}

View File

@ -18,7 +18,6 @@ import org.openapitools.server.model.Pet;
import java.util.Set;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -34,64 +33,65 @@ public class PetServiceImpl implements PetService {
@POST
@Path("/pet")
@Consumes({ "application/json", "application/xml" })
public Response addPet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
public void addPet(@Valid @NotNull Pet pet) {
}
@DELETE
@Path("/pet/{petId}")
public Response deletePet(@PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey) {
return Response.ok().entity("magic!").build();
public void deletePet(@PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey) {
}
@GET
@Path("/pet/findByStatus")
@Produces({ "application/xml", "application/json" })
public Response findPetsByStatus(@QueryParam("status") @NotNull List<String> status) {
return Response.ok().entity("magic!").build();
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status) {
List<Pet> result = java.util.Collections.emptyList(); // Replace with correct business logic.
return result;
}
@GET
@Path("/pet/findByTags")
@Produces({ "application/xml", "application/json" })
public Response findPetsByTags(@QueryParam("tags") @NotNull Set<String> tags) {
return Response.ok().entity("magic!").build();
public Set<Pet> findPetsByTags(@QueryParam("tags") @NotNull Set<String> tags) {
Set<Pet> result = java.util.Collections.emptySet(); // Replace with correct business logic.
return result;
}
@GET
@Path("/pet/{petId}")
@Produces({ "application/xml", "application/json" })
public Response getPetById(@PathParam("petId") Long petId) {
return Response.ok().entity("magic!").build();
public Pet getPetById(@PathParam("petId") Long petId) {
Pet result = null; // Replace with correct business logic.
return result;
}
@PUT
@Path("/pet")
@Consumes({ "application/json", "application/xml" })
public Response updatePet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
public void updatePet(@Valid @NotNull Pet pet) {
}
@POST
@Path("/pet/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
public Response updatePetWithForm(@PathParam("petId") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
return Response.ok().entity("magic!").build();
public void updatePetWithForm(@PathParam("petId") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
}
@POST
@Path("/pet/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
public Response uploadFile(@PathParam("petId") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) {
return Response.ok().entity("magic!").build();
public ModelApiResponse uploadFile(@PathParam("petId") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) {
ModelApiResponse result = null; // Replace with correct business logic.
return result;
}
@POST
@Path("/fake/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
public Response uploadFileWithRequiredFile(@PathParam("petId") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) {
return Response.ok().entity("magic!").build();
public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) {
ModelApiResponse result = null; // Replace with correct business logic.
return result;
}
}

View File

@ -16,7 +16,6 @@ import java.util.Map;
import org.openapitools.server.model.Order;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -31,29 +30,31 @@ public class StoreServiceImpl implements StoreService {
@DELETE
@Path("/order/{order_id}")
public Response deleteOrder(@PathParam("order_id") String orderId) {
return Response.ok().entity("magic!").build();
public void deleteOrder(@PathParam("order_id") String orderId) {
}
@GET
@Path("/inventory")
@Produces({ "application/json" })
public Response getInventory() {
return Response.ok().entity("magic!").build();
public Map<String, Integer> getInventory() {
Map<String, Integer> result = java.util.Collections.emptyMap(); // Replace with correct business logic.
return result;
}
@GET
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" })
public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long orderId) {
return Response.ok().entity("magic!").build();
public Order getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) Long orderId) {
Order result = null; // Replace with correct business logic.
return result;
}
@POST
@Path("/order")
@Consumes({ "application/json" })
@Produces({ "application/xml", "application/json" })
public Response placeOrder(@Valid @NotNull Order order) {
return Response.ok().entity("magic!").build();
public Order placeOrder(@Valid @NotNull Order order) {
Order result = null; // Replace with correct business logic.
return result;
}
}

View File

@ -17,7 +17,6 @@ import java.time.OffsetDateTime;
import org.openapitools.server.model.User;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Response;
import java.io.InputStream;
@ -32,54 +31,50 @@ public class UserServiceImpl implements UserService {
@POST
@Consumes({ "application/json" })
public Response createUser(@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
public void createUser(@Valid @NotNull User user) {
}
@POST
@Path("/createWithArray")
@Consumes({ "application/json" })
public Response createUsersWithArrayInput(@Valid @NotNull List<User> user) {
return Response.ok().entity("magic!").build();
public void createUsersWithArrayInput(@Valid @NotNull List<User> user) {
}
@POST
@Path("/createWithList")
@Consumes({ "application/json" })
public Response createUsersWithListInput(@Valid @NotNull List<User> user) {
return Response.ok().entity("magic!").build();
public void createUsersWithListInput(@Valid @NotNull List<User> user) {
}
@DELETE
@Path("/{username}")
public Response deleteUser(@PathParam("username") String username) {
return Response.ok().entity("magic!").build();
public void deleteUser(@PathParam("username") String username) {
}
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
public Response getUserByName(@PathParam("username") String username) {
return Response.ok().entity("magic!").build();
public User getUserByName(@PathParam("username") String username) {
User result = null; // Replace with correct business logic.
return result;
}
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) {
return Response.ok().entity("magic!").build();
public String loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) {
String result = ""; // Replace with correct business logic.
return result;
}
@GET
@Path("/logout")
public Response logoutUser() {
return Response.ok().entity("magic!").build();
public void logoutUser() {
}
@PUT
@Path("/{username}")
@Consumes({ "application/json" })
public Response updateUser(@PathParam("username") String username,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
public void updateUser(@PathParam("username") String username,@Valid @NotNull User user) {
}
}

View File

@ -1,12 +1,22 @@
README.md
pom.xml
src/main/java/org/openapitools/server/Main.java
src/main/java/org/openapitools/server/RFC3339DateFormat.java
src/main/java/org/openapitools/server/api/AnotherFakeService.java
src/main/java/org/openapitools/server/api/AnotherFakeServiceImpl.java
src/main/java/org/openapitools/server/api/DefaultService.java
src/main/java/org/openapitools/server/api/DefaultServiceImpl.java
src/main/java/org/openapitools/server/api/FakeClassnameTags123Service.java
src/main/java/org/openapitools/server/api/FakeClassnameTags123ServiceImpl.java
src/main/java/org/openapitools/server/api/FakeService.java
src/main/java/org/openapitools/server/api/FakeServiceImpl.java
src/main/java/org/openapitools/server/api/JsonProvider.java
src/main/java/org/openapitools/server/api/PetService.java
src/main/java/org/openapitools/server/api/PetServiceImpl.java
src/main/java/org/openapitools/server/api/StoreService.java
src/main/java/org/openapitools/server/api/StoreServiceImpl.java
src/main/java/org/openapitools/server/api/UserService.java
src/main/java/org/openapitools/server/api/UserServiceImpl.java
src/main/java/org/openapitools/server/api/ValidatorUtils.java
src/main/java/org/openapitools/server/model/AdditionalPropertiesClass.java
src/main/java/org/openapitools/server/model/AllOfWithSingleRef.java
@ -56,4 +66,8 @@ src/main/java/org/openapitools/server/model/SingleRefType.java
src/main/java/org/openapitools/server/model/SpecialModelName.java
src/main/java/org/openapitools/server/model/Tag.java
src/main/java/org/openapitools/server/model/User.java
src/main/java/org/openapitools/server/package-info.java
src/main/resources/META-INF/openapi.yml
src/main/resources/application.yaml
src/main/resources/logging.properties
src/test/java/org/openapitools/server/MainTest.java