Skip to content

Conversation

@pavleprica
Copy link

@pavleprica pavleprica commented Sep 1, 2022

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: #42

@pavleprica
Copy link
Author

Hey team, @bnasslahsen @gklp @DennisHalmstad
any chance for a review and opinion? :)

@apigitlabs
Copy link

vote for this one

@pavleprica
Copy link
Author

@gklp @bnasslahsen @adrien-ben Any chance to check it out? :)

Copy link
Contributor

@DennisHalmstad DennisHalmstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

@pavleprica
Copy link
Author

@DennisHalmstad cool! Thanks for the comment and approve!
Do you perhaps know who can we contact with write access to merge it?

@adrien-ben
Copy link
Contributor

Hi, looks good to me but I'm not a member of the team, sorry :/

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Nov 24, 2022

@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 bnasslahsen added the duplicate This issue or pull request already exists label Nov 24, 2022
@pavleprica
Copy link
Author

@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?

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Nov 24, 2022

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 #12 (comment)
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.

@pavleprica
Copy link
Author

Thanks for the references, I'll see to follow through in more depth and if needed to provide you with a minimal reproducible example. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants