Closed patpatpat123 closed 4 years ago
I can take a look
I think it's good function too.
Created pull request #15 for this issue.
@anthropaedic,
For pretty print, add the following property as argument: -Dspringdoc.writer-with-default-pretty-printer=true
If you want the output in yaml format, just set the two following configuration propeties:
<apiDocsUrl>http://localhost:8080/v3/api-docs.yaml</apiDocsUrl>
<outputFileName>openapi.yaml</outputFileName>
Here is a complete setting sample: mvn verify -Dspring.application.admin.enabled=true -Pintegration -Dspringdoc.writer-with-default-pretty-printer=true
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.2.RELEASE</version>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<apiDocsUrl>http://localhost:8080/v3/api-docs.yaml
</apiDocsUrl>
<outputFileName>openapi.yaml</outputFileName>
</configuration>
</plugin>
</plugins>
Hello,
First of all, a big thanks for this project. This is a feature request, an idea to possibly make this project even more interesting, hope not to trouble.
Currently, this plugin is doing a great job in generating the JSON output.
First questions, can the output be pretty printed instead of the one liner?
Second question, would it be possible to add an option to have the output as (pretty printed) YAML/YML as well?
Thank you for your help.