Closed hlavki closed 6 years ago
I had a quick look at the SpringWebApiRegistry, and it looks like this:
private final EnunciateSpringWebContext context;
public SpringWebApiRegistry(EnunciateSpringWebContext context) {
this.context = context;
}
@Override
public List<ServiceApi> getServiceApis(ApiRegistrationContext context) {
return Collections.emptyList();
}
@Override
public List<ResourceApi> getResourceApis(ApiRegistrationContext context) {
return this.context.getControllers().isEmpty() ? Collections.<ResourceApi>emptyList() : Collections.singletonList((ResourceApi) new SpringWebResourceApi(this.context, context));
}
The call chain in the stack trace shows that OpenApiModule calls AggregateApiRegistry with a non-null argument. I am not sure how that ApiRegistry in spring_web is supposed to behave, but it is not something I can fix from the OpenApi module.
At a guess, it has been initialized in a faulty manner. Or it is supposed to use that input argument context, rather than this.context.
It looks like you need to add "spring-web" as a dependency module at OpenApiModule.java
line 75. I'd bet that would fix the issue.
Interesting @stoicflame . Do I need to add the other provider modules as well (jaxws and jackson1)?
I can easily add those dependency modules.
Yes, you'll want to add those, too.
I have released 1.0.5 which fixes this problem.
Getting error:
Full log: enunciate.log
Related enunciate issue: https://github.com/stoicflame/enunciate/issues/856