dromara / fast-request

IntelliJ IDEA plugin Restful Fast Request
https://api-buddy.com/en
Other
452 stars 116 forks source link

Incorrect case for static params #255

Closed diroxx closed 1 year ago

diroxx commented 1 year ago

Current Version

2023.1.6

Operation steps

Request parameters that are static, aren't parsed and are just taken as raw string value. I.E.

Public static final String STATIC_STRING = "staticString";
@GetMapping(path = "/path")
public String getAString(@RequestParam(STATIC_STRING) final String staticString)

Parameter staticString key will be STATIC_STRING, instead of staticString, which will not work as parameters are case-sensitive.

Error Message

diroxx commented 1 year ago

Addition: Similiar issue with Path Params.

public static final String PATH_PARAM = "pathParam";
@GetMapping(path="/" + PATH_PARAM )
public String getAString(@PathVariable(URL_PARAM)) final String pathParam)

Path parameter key will be PATH_PARAM, instead of pathParam and thus the url will contain the placeholder parameter and will not work.

kings1990 commented 1 year ago

fixparam

@diroxx Thanks for your feedback. I will fix this problem in the next plugin version 2023.1.7. IDEA 2021.2+

diroxx commented 1 year ago

Thanks!