Skip to content

Commit

Permalink
fix: Add static modifier to inner class
Browse files Browse the repository at this point in the history
  • Loading branch information
cchacin committed Feb 5, 2025
1 parent 68e7d49 commit 77952f4
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public interface {{classname}} {
{{#useSingleRequestParameter}}
{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<Void>{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException;
{{#hasNonBodyParams}}
public class {{operationIdCamelCase}}Request {
public static class {{operationIdCamelCase}}Request {
{{#queryParams}}
private {{>queryParams}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class {{classname}} {
}

{{#operation}}{{#useSingleRequestParameter}}{{#hasParams}}{{^hasSingleParam}}
public class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {
public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {
{{#allParams}}
private final {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.AbstractResource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}};
{{/allParams}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3259,7 +3259,7 @@ public void testDuplicatedOperationId() {

TestUtils.assertFileContains(
output.resolve("src/main/java/xyz/abcdef/api/PetApi.java"),
"public class DeletePetRequest {",
"public static class DeletePetRequest {",
"DeletePetRequest(Long petId, String apiKey)",
"Long petId()",
"String apiKey()",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public interface PetApi {
@DELETE
@Path("/{petId}")
void deletePet(@BeanParam DeletePetRequest request) throws ApiException, ProcessingException;
public class DeletePetRequest {
public static class DeletePetRequest {

private @HeaderParam("api_key") String apiKey;
private @PathParam("petId") Long petId;
Expand Down Expand Up @@ -105,7 +105,7 @@ public DeletePetRequest apiKey(String apiKey) {
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
List<Pet> findPetsByStatus(@BeanParam FindPetsByStatusRequest request) throws ApiException, ProcessingException;
public class FindPetsByStatusRequest {
public static class FindPetsByStatusRequest {

private @QueryParam("status") List<String> status;

Expand Down Expand Up @@ -139,7 +139,7 @@ public FindPetsByStatusRequest status(List<String> status) {
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
List<Pet> findPetsByTags(@BeanParam FindPetsByTagsRequest request) throws ApiException, ProcessingException;
public class FindPetsByTagsRequest {
public static class FindPetsByTagsRequest {

private @QueryParam("tags") List<String> tags;

Expand Down Expand Up @@ -171,7 +171,7 @@ public FindPetsByTagsRequest tags(List<String> tags) {
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
Pet getPetById(@BeanParam GetPetByIdRequest request) throws ApiException, ProcessingException;
public class GetPetByIdRequest {
public static class GetPetByIdRequest {

private @PathParam("petId") Long petId;

Expand Down Expand Up @@ -215,7 +215,7 @@ public GetPetByIdRequest petId(Long petId) {
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
void updatePetWithForm(@BeanParam UpdatePetWithFormRequest request) throws ApiException, ProcessingException;
public class UpdatePetWithFormRequest {
public static class UpdatePetWithFormRequest {

private @PathParam("petId") Long petId;
private @Multipart(value = "name", required = false) String name;
Expand Down Expand Up @@ -268,7 +268,7 @@ public UpdatePetWithFormRequest status(String status) {
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
ModelApiResponse uploadFile(@BeanParam UploadFileRequest request) throws ApiException, ProcessingException;
public class UploadFileRequest {
public static class UploadFileRequest {

private @PathParam("petId") Long petId;
private @Multipart(value = "additionalMetadata", required = false) String additionalMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface StoreApi {
@DELETE
@Path("/order/{orderId}")
void deleteOrder(@BeanParam DeleteOrderRequest request) throws ApiException, ProcessingException;
public class DeleteOrderRequest {
public static class DeleteOrderRequest {

private @PathParam("orderId") String orderId;

Expand Down Expand Up @@ -92,7 +92,7 @@ public DeleteOrderRequest orderId(String orderId) {
@Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" })
Order getOrderById(@BeanParam GetOrderByIdRequest request) throws ApiException, ProcessingException;
public class GetOrderByIdRequest {
public static class GetOrderByIdRequest {

private @PathParam("orderId") Long orderId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public interface UserApi {
@DELETE
@Path("/{username}")
void deleteUser(@BeanParam DeleteUserRequest request) throws ApiException, ProcessingException;
public class DeleteUserRequest {
public static class DeleteUserRequest {

private @PathParam("username") String username;

Expand Down Expand Up @@ -115,7 +115,7 @@ public DeleteUserRequest username(String username) {
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
User getUserByName(@BeanParam GetUserByNameRequest request) throws ApiException, ProcessingException;
public class GetUserByNameRequest {
public static class GetUserByNameRequest {

private @PathParam("username") String username;

Expand Down Expand Up @@ -147,7 +147,7 @@ public GetUserByNameRequest username(String username) {
@Path("/login")
@Produces({ "application/xml", "application/json" })
String loginUser(@BeanParam LoginUserRequest request) throws ApiException, ProcessingException;
public class LoginUserRequest {
public static class LoginUserRequest {

private @QueryParam("username") String username;
private @QueryParam("password") String password;
Expand Down Expand Up @@ -199,7 +199,7 @@ public LoginUserRequest password(String password) {
@Path("/{username}")
@Consumes({ "application/json" })
void updateUser(@BeanParam UpdateUserRequest request, User user) throws ApiException, ProcessingException;
public class UpdateUserRequest {
public static class UpdateUserRequest {

private @PathParam("username") String username;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public ResponseSpec fakeHealthGetWithResponseSpec() throws WebClientResponseExce
return fakeHealthGetRequestCreation();
}

public class FakeHttpSignatureTestRequest {
public static class FakeHttpSignatureTestRequest {
private final Pet pet;
private final String query1;
private final String header1;
Expand Down Expand Up @@ -900,7 +900,7 @@ public ResponseSpec testBodyWithFileSchemaWithResponseSpec(FileSchemaTestClass f
return testBodyWithFileSchemaRequestCreation(fileSchemaTestClass);
}

public class TestBodyWithQueryParamsRequest {
public static class TestBodyWithQueryParamsRequest {
private final String query;
private final User user;

Expand Down Expand Up @@ -1107,7 +1107,7 @@ public ResponseSpec testClientModelWithResponseSpec(Client client) throws WebCli
return testClientModelRequestCreation(client);
}

public class TestEndpointParametersRequest {
public static class TestEndpointParametersRequest {
private final BigDecimal number;
private final Double _double;
private final String patternWithoutDelimiter;
Expand Down Expand Up @@ -1389,7 +1389,7 @@ public ResponseSpec testEndpointParametersWithResponseSpec(BigDecimal number, Do
return testEndpointParametersRequestCreation(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
}

public class TestEnumParametersRequest {
public static class TestEnumParametersRequest {
private final List<String> enumHeaderStringArray;
private final String enumHeaderString;
private final List<String> enumQueryStringArray;
Expand Down Expand Up @@ -1597,7 +1597,7 @@ public ResponseSpec testEnumParametersWithResponseSpec(List<String> enumHeaderSt
return testEnumParametersRequestCreation(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
}

public class TestGroupParametersRequest {
public static class TestGroupParametersRequest {
private final Integer requiredStringGroup;
private final Boolean requiredBooleanGroup;
private final Long requiredInt64Group;
Expand Down Expand Up @@ -1915,7 +1915,7 @@ public ResponseSpec testInlineFreeformAdditionalPropertiesWithResponseSpec(TestI
return testInlineFreeformAdditionalPropertiesRequestCreation(testInlineFreeformAdditionalPropertiesRequest);
}

public class TestJsonFormDataRequest {
public static class TestJsonFormDataRequest {
private final String param;
private final String param2;

Expand Down Expand Up @@ -2120,7 +2120,7 @@ public ResponseSpec testNullableWithResponseSpec(ChildWithNullable childWithNull
return testNullableRequestCreation(childWithNullable);
}

public class TestQueryParameterCollectionFormatRequest {
public static class TestQueryParameterCollectionFormatRequest {
private final List<String> pipe;
private final List<String> ioutil;
private final List<String> http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public ResponseSpec addPetWithResponseSpec(Pet pet) throws WebClientResponseExce
return addPetRequestCreation(pet);
}

public class DeletePetRequest {
public static class DeletePetRequest {
private final Long petId;
private final String apiKey;

Expand Down Expand Up @@ -585,7 +585,7 @@ public ResponseSpec updatePetWithResponseSpec(Pet pet) throws WebClientResponseE
return updatePetRequestCreation(pet);
}

public class UpdatePetWithFormRequest {
public static class UpdatePetWithFormRequest {
private final Long petId;
private final String name;
private final String status;
Expand Down Expand Up @@ -734,7 +734,7 @@ public ResponseSpec updatePetWithFormWithResponseSpec(Long petId, String name, S
return updatePetWithFormRequestCreation(petId, name, status);
}

public class UploadFileRequest {
public static class UploadFileRequest {
private final Long petId;
private final String additionalMetadata;
private final File _file;
Expand Down Expand Up @@ -883,7 +883,7 @@ public ResponseSpec uploadFileWithResponseSpec(Long petId, String additionalMeta
return uploadFileRequestCreation(petId, additionalMetadata, _file);
}

public class UploadFileWithRequiredFileRequest {
public static class UploadFileWithRequiredFileRequest {
private final Long petId;
private final File requiredFile;
private final String additionalMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public ResponseSpec getUserByNameWithResponseSpec(String username) throws WebCli
return getUserByNameRequestCreation(username);
}

public class LoginUserRequest {
public static class LoginUserRequest {
private final String username;
private final String password;

Expand Down Expand Up @@ -620,7 +620,7 @@ public ResponseSpec logoutUserWithResponseSpec() throws WebClientResponseExcepti
return logoutUserRequestCreation();
}

public class UpdateUserRequest {
public static class UpdateUserRequest {
private final String username;
private final User user;

Expand Down

0 comments on commit 77952f4

Please sign in to comment.