-
Notifications
You must be signed in to change notification settings - Fork 523
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
global-operation-parameters在不配置的情况下会出现空指针异常 #225
Comments
这个问题有什么方法规避掉吗? |
配置一个空的 |
在yml下可以设置个空的,如下: 但是还是建议官方修复 |
目前这个bug还在 建议修复下 |
空的 |
|
如题,在DocketConfiguration中创建createSpringFoxRestApi的时候,如果没有设置global-operation-parameters,下面的代码会报空指针
private List getRequestParameters(List<SwaggerProperties.GlobalOperationParameter> properties) {
return properties.stream()
.map(param -> new RequestParameterBuilder().name(param.getName()).description(param.getDescription())
.in(ParameterType.from(param.getParameterType())).required(param.getRequired())
.query(q -> q.defaultValue(param.getType()))
.query(q -> q.model(m -> m.scalarModel(!ScalarType.from(param.getType(), param.getFormat()).isPresent()
? ScalarType.STRING : ScalarType.from(param.getType(), param.getFormat()).get())))
.build())
.collect(Collectors.toList());
}
The text was updated successfully, but these errors were encountered: