2

Is there a Maven plugin which can generate an openapi.json file at build time for my SpringBoot RestControllers?

If not a Maven plugin, is there another simple package to generate the file at build time?

I only want the openapi.json file, I don't want Swagger UIs auto-integrated, etc.

1

2 Answers 2

1

I was able to get this working with SpringDoc.

I couldn't find a project which showed exactly my use-case (without all the swagger ui stuff), so I created an example project on GitHub for others to use as reference: springdoc-maven-plugin-demo

Sign up to request clarification or add additional context in comments.

1 Comment

This means we must start our whole SpringBoot web application in order to extract the API doc from it. :( I don't really like this solution.
0

You can use Spring-doc which support OpenAPI 3

Look at the demos

1 Comment

Is there a project in that repo that demonstrates building the openapi.json file via Maven? I couldn't find it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.