Skip to content

Commit f3ab7a3

Browse files
committed
fix #22492 [BUG][JAVA][MAVEN] Lombok @Getter disables validation and #19743 #18794 #17793 #17606
1 parent b4045da commit f3ab7a3

3 files changed

Lines changed: 142 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package org.openapitools.api;
2+
3+
import org.openapitools.model.ModelApiResponse;
4+
import org.springframework.lang.Nullable;
5+
import org.openapitools.model.Pet;
6+
7+
8+
import org.springframework.beans.factory.annotation.Autowired;
9+
import org.springframework.http.HttpStatus;
10+
import org.springframework.http.MediaType;
11+
import org.springframework.http.ResponseEntity;
12+
import org.springframework.stereotype.Controller;
13+
import org.springframework.web.bind.annotation.PathVariable;
14+
import org.springframework.web.bind.annotation.RequestBody;
15+
import org.springframework.web.bind.annotation.RequestHeader;
16+
import org.springframework.web.bind.annotation.RequestMapping;
17+
import org.springframework.web.bind.annotation.CookieValue;
18+
import org.springframework.web.bind.annotation.RequestParam;
19+
import org.springframework.web.bind.annotation.RequestPart;
20+
import org.springframework.web.multipart.MultipartFile;
21+
import org.springframework.web.context.request.NativeWebRequest;
22+
23+
import javax.validation.constraints.*;
24+
import javax.validation.Valid;
25+
26+
import java.util.List;
27+
import java.util.Map;
28+
import java.util.Optional;
29+
import javax.annotation.Generated;
30+
31+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
32+
@Controller
33+
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
34+
public class PetApiController implements PetApi {
35+
36+
private final NativeWebRequest request;
37+
38+
@Autowired
39+
public PetApiController(NativeWebRequest request) {
40+
this.request = request;
41+
}
42+
43+
@Override
44+
public Optional<NativeWebRequest> getRequest() {
45+
return Optional.ofNullable(request);
46+
}
47+
48+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package org.openapitools.api;
2+
3+
import java.util.Map;
4+
import org.openapitools.model.Order;
5+
6+
7+
import org.springframework.beans.factory.annotation.Autowired;
8+
import org.springframework.http.HttpStatus;
9+
import org.springframework.http.MediaType;
10+
import org.springframework.http.ResponseEntity;
11+
import org.springframework.stereotype.Controller;
12+
import org.springframework.web.bind.annotation.PathVariable;
13+
import org.springframework.web.bind.annotation.RequestBody;
14+
import org.springframework.web.bind.annotation.RequestHeader;
15+
import org.springframework.web.bind.annotation.RequestMapping;
16+
import org.springframework.web.bind.annotation.CookieValue;
17+
import org.springframework.web.bind.annotation.RequestParam;
18+
import org.springframework.web.bind.annotation.RequestPart;
19+
import org.springframework.web.multipart.MultipartFile;
20+
import org.springframework.web.context.request.NativeWebRequest;
21+
22+
import javax.validation.constraints.*;
23+
import javax.validation.Valid;
24+
25+
import java.util.List;
26+
import java.util.Map;
27+
import java.util.Optional;
28+
import javax.annotation.Generated;
29+
30+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
31+
@Controller
32+
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
33+
public class StoreApiController implements StoreApi {
34+
35+
private final NativeWebRequest request;
36+
37+
@Autowired
38+
public StoreApiController(NativeWebRequest request) {
39+
this.request = request;
40+
}
41+
42+
@Override
43+
public Optional<NativeWebRequest> getRequest() {
44+
return Optional.ofNullable(request);
45+
}
46+
47+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package org.openapitools.api;
2+
3+
import java.time.OffsetDateTime;
4+
import org.openapitools.model.User;
5+
6+
7+
import org.springframework.beans.factory.annotation.Autowired;
8+
import org.springframework.http.HttpStatus;
9+
import org.springframework.http.MediaType;
10+
import org.springframework.http.ResponseEntity;
11+
import org.springframework.stereotype.Controller;
12+
import org.springframework.web.bind.annotation.PathVariable;
13+
import org.springframework.web.bind.annotation.RequestBody;
14+
import org.springframework.web.bind.annotation.RequestHeader;
15+
import org.springframework.web.bind.annotation.RequestMapping;
16+
import org.springframework.web.bind.annotation.CookieValue;
17+
import org.springframework.web.bind.annotation.RequestParam;
18+
import org.springframework.web.bind.annotation.RequestPart;
19+
import org.springframework.web.multipart.MultipartFile;
20+
import org.springframework.web.context.request.NativeWebRequest;
21+
22+
import javax.validation.constraints.*;
23+
import javax.validation.Valid;
24+
25+
import java.util.List;
26+
import java.util.Map;
27+
import java.util.Optional;
28+
import javax.annotation.Generated;
29+
30+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
31+
@Controller
32+
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
33+
public class UserApiController implements UserApi {
34+
35+
private final NativeWebRequest request;
36+
37+
@Autowired
38+
public UserApiController(NativeWebRequest request) {
39+
this.request = request;
40+
}
41+
42+
@Override
43+
public Optional<NativeWebRequest> getRequest() {
44+
return Optional.ofNullable(request);
45+
}
46+
47+
}

0 commit comments

Comments
 (0)