Closed pavleprica closed 1 year ago
Hey team, @bnasslahsen @gklp @DennisHalmstad any chance for a review and opinion? :)
vote for this one
@gklp @bnasslahsen @adrien-ben Any chance to check it out? :)
@DennisHalmstad cool! Thanks for the comment and approve! Do you perhaps know who can we contact with write access to merge it?
Hi, looks good to me but I'm not a member of the team, sorry :/
@pavleprica,
There is no need for extra dependency.
This feature is already in place #12
To format the json correctly use the springdoc-openapi
property as argument of your maven goal: -Dspringdoc.writer-with-default-pretty-printer=true
@bnasslahsen thank you for reaching out! I've tested it locally and the pretty printer doesn't work. Frankly, I can't even find it in the code using the flag.
Could you perhaps provide an example of the command?
see the https://springdoc.org/#properties and the code reference https://github.com/springdoc/springdoc-openapi/blob/3745c32cdd742cf3e7e1ddb3f393eef238d69ba0/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfigProperties.java#L132
The sample command was in the referenced issue https://github.com/springdoc/springdoc-openapi-maven-plugin/issues/12#issuecomment-670402033 This is a sample command again:
mvn verify -Dspringdoc.writer-with-default-pretty-printer=true
And you are still unable to make it work, as described in the contribution guidelines
Make sure you provide a Minimal, Reproducible Example - with HelloController that reproduces the problem.
Thanks for the references, I'll see to follow through in more depth and if needed to provide you with a minimal reproducible example. :)
I took the liberty of adding the PR for the issue. It adds a lightweight dependency of
org.json
. Used to parse the string in case we want to write to a.json
file and then indent it properly.Please do share your thoughts.
Related to: https://github.com/springdoc/springdoc-openapi-maven-plugin/issues/42