Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more parameter annotations and types for testing @Controller #2462

Open
alisevych opened this issue Jul 31, 2023 · 0 comments
Open
Assignees
Labels
comp-codegen Issue is related to code generator comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support ctg-enhancement New feature, improvement or change request

Comments

@alisevych
Copy link
Member

alisevych commented Jul 31, 2023

Description

#2447 only adds support for parameters annotated with @RequestBody and @PathVariable annotations.

Here are some more annotations that can be supported in a similar manner (sorted roughly in popularity decreasing order):

  1. @RequestParam
  2. @Valid (depends on Create a good EntityValueProvider for Spring fuzzing #2340)
  3. @RequestHeader
  4. @ModelAttribute (see also @ControllerAdvice)
  5. @CookieValue
  6. @RequestAttribute
  7. @RequestPart
  8. @SessionAttribute
  9. @MatrixVariable

Here are some more types that are treated specially by Spring (sorted roughly in popularity decreasing order):

  1. HttpServletRequest
  2. BindingResult
  3. Model and ModelMap
  4. Map<String, String> (with @RequestParam or @PathVariable annotations)
  5. Optional<T>
  6. Authentication
  7. HttpHeaders (with @RequestHeader annotation)
  8. HttpSession
  9. RedirectAttributes
  10. Locale
@alisevych alisevych added ctg-enhancement New feature, improvement or change request comp-codegen Issue is related to code generator comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support labels Jul 31, 2023
@alisevych alisevych added this to the Spring Phase 4 milestone Jul 31, 2023
@alisevych alisevych removed this from the Spring Phase 4 milestone Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator comp-instrumented-process Issue is related to Instrumented process comp-spring Issue is related to Spring projects support ctg-enhancement New feature, improvement or change request
Projects
Status: Todo
Development

No branches or pull requests

2 participants