Skip to content

Commit 6771de2

Browse files
committed
fix imports
1 parent 67839a2 commit 6771de2

11 files changed

Lines changed: 19 additions & 606 deletions

File tree

modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import org.springframework.http.ResponseEntity;
1616
import org.springframework.web.bind.annotation.*;
1717
import org.springframework.web.service.annotation.*;
1818
import org.springframework.web.multipart.MultipartFile;
19-
{{#reactive}}
2019
{{#useBeanValidation}}
2120
import {{javaxPackage}}.validation.Valid;
2221
import {{javaxPackage}}.validation.constraints.*;
2322
{{^useSpringBuiltInValidation}}import org.springframework.validation.annotation.Validated;{{/useSpringBuiltInValidation}}
2423
{{/useBeanValidation}}
24+
{{#reactive}}
2525

2626
import org.springframework.http.codec.multipart.Part;
2727
import reactor.core.publisher.Flux;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/AnotherFakeApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
import org.springframework.web.bind.annotation.*;
1111
import org.springframework.web.service.annotation.*;
1212
import org.springframework.web.multipart.MultipartFile;
13+
import jakarta.validation.Valid;
14+
import jakarta.validation.constraints.*;
15+
import org.springframework.validation.annotation.Validated;
1316

1417
import java.util.List;
1518
import java.util.Map;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import org.springframework.web.bind.annotation.*;
2222
import org.springframework.web.service.annotation.*;
2323
import org.springframework.web.multipart.MultipartFile;
24+
import jakarta.validation.Valid;
25+
import jakarta.validation.constraints.*;
26+
import org.springframework.validation.annotation.Validated;
2427

2528
import java.util.List;
2629
import java.util.Map;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
import org.springframework.web.bind.annotation.*;
1111
import org.springframework.web.service.annotation.*;
1212
import org.springframework.web.multipart.MultipartFile;
13+
import jakarta.validation.Valid;
14+
import jakarta.validation.constraints.*;
15+
import org.springframework.validation.annotation.Validated;
1316

1417
import java.util.List;
1518
import java.util.Map;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/PetApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import org.springframework.web.bind.annotation.*;
1515
import org.springframework.web.service.annotation.*;
1616
import org.springframework.web.multipart.MultipartFile;
17+
import jakarta.validation.Valid;
18+
import jakarta.validation.constraints.*;
19+
import org.springframework.validation.annotation.Validated;
1720

1821
import java.util.List;
1922
import java.util.Map;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/StoreApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
import org.springframework.web.bind.annotation.*;
1212
import org.springframework.web.service.annotation.*;
1313
import org.springframework.web.multipart.MultipartFile;
14+
import jakarta.validation.Valid;
15+
import jakarta.validation.constraints.*;
16+
import org.springframework.validation.annotation.Validated;
1417

1518
import java.util.List;
1619
import java.util.Map;

samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/api/UserApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
import org.springframework.web.bind.annotation.*;
1212
import org.springframework.web.service.annotation.*;
1313
import org.springframework.web.multipart.MultipartFile;
14+
import jakarta.validation.Valid;
15+
import jakarta.validation.constraints.*;
16+
import org.springframework.validation.annotation.Validated;
1417

1518
import java.util.List;
1619
import java.util.Map;
Lines changed: 0 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,180 +0,0 @@
1-
/*
2-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.20.0-SNAPSHOT).
3-
* https://openapi-generator.tech
4-
* Do not edit the class manually.
5-
*/
6-
package org.openapitools.api;
7-
8-
import java.time.OffsetDateTime;
9-
import org.openapitools.model.UserDto;
10-
import org.springframework.http.HttpStatus;
11-
import org.springframework.web.bind.annotation.*;
12-
import org.springframework.web.service.annotation.*;
13-
import org.springframework.web.multipart.MultipartFile;
14-
15-
import java.util.List;
16-
import java.util.Map;
17-
import java.util.Optional;
18-
import jakarta.annotation.Generated;
19-
20-
21-
22-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.20.0-SNAPSHOT")
23-
public interface UserApi {
24-
25-
/**
26-
* POST /user : Create user
27-
* This can only be done by the logged in user.
28-
*
29-
* @param userDto Created user object (required)
30-
* @return successful operation (status code 200)
31-
*/
32-
@ResponseStatus(HttpStatus.OK)
33-
@HttpExchange(
34-
method = "POST",
35-
value = "/user",
36-
accept = { "application/json" },
37-
contentType = "application/json"
38-
)
39-
void createUser(
40-
@RequestBody UserDto userDto
41-
);
42-
43-
44-
/**
45-
* POST /user/createWithArray : Creates list of users with given input array
46-
*
47-
*
48-
* @param userDto List of user object (required)
49-
* @return successful operation (status code 200)
50-
*/
51-
@ResponseStatus(HttpStatus.OK)
52-
@HttpExchange(
53-
method = "POST",
54-
value = "/user/createWithArray",
55-
accept = { "application/json" },
56-
contentType = "application/json"
57-
)
58-
void createUsersWithArrayInput(
59-
@RequestBody List<UserDto> userDto
60-
);
61-
62-
63-
/**
64-
* POST /user/createWithList : Creates list of users with given input array
65-
*
66-
*
67-
* @param userDto List of user object (required)
68-
* @return successful operation (status code 200)
69-
*/
70-
@ResponseStatus(HttpStatus.OK)
71-
@HttpExchange(
72-
method = "POST",
73-
value = "/user/createWithList",
74-
accept = { "application/json" },
75-
contentType = "application/json"
76-
)
77-
void createUsersWithListInput(
78-
@RequestBody List<UserDto> userDto
79-
);
80-
81-
82-
/**
83-
* DELETE /user/{username} : Delete user
84-
* This can only be done by the logged in user.
85-
*
86-
* @param username The name that needs to be deleted (required)
87-
* @return Invalid username supplied (status code 400)
88-
* or User not found (status code 404)
89-
*/
90-
@ResponseStatus(HttpStatus.BAD_REQUEST)
91-
@HttpExchange(
92-
method = "DELETE",
93-
value = "/user/{username}",
94-
accept = { "application/json" }
95-
)
96-
void deleteUser(
97-
@PathVariable("username") String username
98-
);
99-
100-
101-
/**
102-
* GET /user/{username} : Get user by user name
103-
*
104-
*
105-
* @param username The name that needs to be fetched. Use user1 for testing. (required)
106-
* @return successful operation (status code 200)
107-
* or Invalid username supplied (status code 400)
108-
* or User not found (status code 404)
109-
*/
110-
@ResponseStatus(HttpStatus.OK)
111-
@HttpExchange(
112-
method = "GET",
113-
value = "/user/{username}",
114-
accept = { "application/json", "application/xml" }
115-
)
116-
UserDto getUserByName(
117-
@PathVariable("username") String username
118-
);
119-
120-
121-
/**
122-
* GET /user/login : Logs user into the system
123-
*
124-
*
125-
* @param username The user name for login (required)
126-
* @param password The password for login in clear text (required)
127-
* @return successful operation (status code 200)
128-
* or Invalid username/password supplied (status code 400)
129-
*/
130-
@ResponseStatus(HttpStatus.OK)
131-
@HttpExchange(
132-
method = "GET",
133-
value = "/user/login",
134-
accept = { "application/json", "application/xml" }
135-
)
136-
String loginUser(
137-
@RequestParam(value = "username", required = true) String username,
138-
@RequestParam(value = "password", required = true) String password
139-
);
140-
141-
142-
/**
143-
* GET /user/logout : Logs out current logged in user session
144-
*
145-
*
146-
* @return successful operation (status code 200)
147-
*/
148-
@ResponseStatus(HttpStatus.OK)
149-
@HttpExchange(
150-
method = "GET",
151-
value = "/user/logout",
152-
accept = { "application/json" }
153-
)
154-
void logoutUser(
155-
156-
);
157-
158-
159-
/**
160-
* PUT /user/{username} : Updated user
161-
* This can only be done by the logged in user.
162-
*
163-
* @param username name that need to be deleted (required)
164-
* @param userDto Updated user object (required)
165-
* @return Invalid user supplied (status code 400)
166-
* or User not found (status code 404)
167-
*/
168-
@ResponseStatus(HttpStatus.BAD_REQUEST)
169-
@HttpExchange(
170-
method = "PUT",
171-
value = "/user/{username}",
172-
accept = { "application/json" },
173-
contentType = "application/json"
174-
)
175-
void updateUser(
176-
@PathVariable("username") String username,
177-
@RequestBody UserDto userDto
178-
);
179-
180-
}

0 commit comments

Comments
 (0)