Javalin: Is it possible to disable OpenApiDocumentation by default but customize which are enabled?

Created on 9 Aug 2019  路  3Comments  路  Source: tipsy/javalin

Posted on gitter:

I'm using the OpenApiPlugin with the DefaultDocumentation and I set OpenApiDocumentation.setIgnored(true).
is there a way to enable them individually when I'm defining OpenApiBuilder.documented(...)? I couldn't figure out a way.

@TobiasWalle @tipsy ?

QUESTION

All 3 comments

The problem was that the defaults were applied after the actual documentation. I created a PR which changes this behaviour so the defaults are applied before. With this change your use case is possible.

Please check out the test for an example
https://github.com/tipsy/javalin/pull/705/files#diff-7d30c95da986378e40bfafd1fe37a1ff

@TobiasWalle
Awesome! Thank you!

Was this page helpful?
0 / 5 - 0 ratings