2.6.1 Cannot read property of custom enum list
See original GitHub issueCustom enum like this:
@Getter
@AllArgsConstructor
public enum AccountType {
CASH("现金账户", 2),
BANK("银行账户", 3);
private String name;
private int code;
}
Pojo like this:
@Data
public class AccountQuery {
@ApiParam(value = "账户号类型,支持多值", allowMultiple = true)
private List<AccountType> type;
}
Controller method like this:
@RequestMapping(value = "/account", method = GET)
@ApiOperation(value = "查询账户", notes = "分页查询")
JsonResult getPage(@ModelAttribute AccountQuery query) {
return ok();
}
Then the html page does not show the property ‘type’, I can not figure out why.
I found that ExpandedParameterBuilder#apply skiped this property.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Typescript runtime error: cannot read property of undefined ...
I want to import and use the enum in another class as such: import { RESTConfig, RESTMethod } from './RESTConfig'; class Pipelines ...
Read more >Handbook - Enums - TypeScript
Enums allow a developer to define a set of named constants. ... Using an enum is simple: just access any member as a...
Read more >(Enum) cannot read property of undefined Error in TS
The enum error - cannot read property of undefined occurs for 2 main reasons, using const enums that get removed during compilation.
Read more >MapStruct 1.5.3.Final Reference Guide
This is the reference documentation of MapStruct, an annotation processor for generating type-safe, performant and dependency-free bean ...
Read more >What's new - Radzen
closeAllPopups() 'Cannot read properties of undefined' error. (Blazor) Fixed packaged .css ... (Blazor) DropDownBase will use Display attribute of Enum.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jearton Sorry I haven’t had ⏲to get to it. With the holidays it might be a couple of weeks.
I pushed my code to https://git.coding.net/jearton/springfox-demos.git