Closed sbahloul closed 1 year ago
As long as it's not supported directly, because it'd add non standard to OpenApi properties to the scheme, you can still achieve it with document processor:
Let me know if it works for you :)
For those who might be interested:
options.withDefinitionConfiguration((s, config) -> {
/* the rest of the configuration .... */
config.withDefinitionProcessor(content -> { // you can add whatever you want to this document using your favourite json api
ObjectNode logo = new ObjectNode(JsonNodeFactory.instance);
logo.putIfAbsent("url", new TextNode("https://redocly.github.io/redoc/example-logo.png"));
logo.putIfAbsent("backgroundColor", new TextNode("#FFFFFF"));
logo.putIfAbsent("altText", new TextNode("Example logo"));
((ObjectNode)content.findValue("info")).putIfAbsent("x-logo", logo);
return content.toPrettyString();
});
Describe the feature Aș part of the effort to improve and beautify the documentation with OpenAPI through redoc via Javalin, it would be nice to support the addition of the logo: https://redocly.com/docs/api-reference-docs/specification-extensions/x-logo/
Additional context It used to be possible to extend the class OpenAPIInfo to add a logo as followed, but now the class OpenAPIInfo is final. Would it be possible to either add this feature or allow to extend OpenAPIInfo ?
NOTE: you are doing a fantastic job, really appreciated ! Kudos to all the Javalin team and contributors