Describe the bug
When using dependency quarkus-smallrye-openapi, it not uses my json serializer configuration while generating openapi schema file.
In my case, i'm using a snake case style
import io.quarkus.jsonb.JsonbConfigCustomizer;
import javax.inject.Singleton;
import javax.json.bind.JsonbConfig;
import static javax.json.bind.JsonbConfig.PROPERTY_NAMING_STRATEGY;
import static javax.json.bind.config.PropertyNamingStrategy.LOWER_CASE_WITH_UNDERSCORES;
@Singleton
public class JsonConfig implements JsonbConfigCustomizer {
public void customize(JsonbConfig config) {
config.setProperty(PROPERTY_NAMING_STRATEGY, LOWER_CASE_WITH_UNDERSCORES);
}
}
Expected behavior
It should automatically use my json config, or have some tutorial to how to modify it.
Actual behavior
It is generating schema with other json configuration.
To Reproduce
Steps to reproduce the behavior:
quarkus-smallrye-openapi/cc @EricWittmann, @MikeEdgar, @phillip-kruger
Hi @AlexandreGuidin . SmallRye OpenAPI is not using Jsonb under the covers, so that code will have no effect on the Schema generation. You can change the field name by using the @Schema annotation on the field as per the spec.
@AlexandreGuidin I am closing here, please reopen if you believe this is a bug.