Hi,
Is it possible to use a customizer to modify the OpenApi data in the
same way that it is with a Swagger Customizer?
I have this:
@Bean
@Autowired
public OpenApiFeature openApiFeature(MyOpenApiCustomizer customizer) {
OpenApiFeature feature = new OpenApiFeature();
feature.setVersion("1.0.0");
feature.setLicense("");
feature.setLicenseUrl("");
feature.setSupportSwaggerUi(true);
feature.setScan(true);
feature.setCustomizer(customizer);
feature.setTitle("Service API");
feature.setDescription("The service does stuff\n");
return feature;
}
Where MyOpenApiCustomizer just overrides one customize method:
@Override
public void customize(OpenAPI oas) {
super.customize(oas);
StringBuilder builder = new StringBuilder();
builder.append(oas.getInfo().getDescription());
builder.append("More docs");
oas.getInfo().description(builder.toString());
}
I'm getting the standard openapi.json data out, but my customizer isn't
being called at all.
In OpenApiCustomizedResource it's looking for an OpenApiContext with a
CXF ID, but not finding one.
What's wrong?
Thanks
Jim