Swagger / OpenAPI
Rewrites OpenAPI JSON only when changes are made by analyzing RouterFunction and handler sources.
Functional endpoint mode
ApiAccountRouter.java
javaCombines nested paths, HTTP methods, and handler method references to configure endpoints. The handler parser infers the request body and response publisher type.
SwaggerJsonFileWatcher.Config
watchDirectory
default src/main/java
swaggerOutputFile
Default src/main/resources/static/swagger.json.
projectMode
Default FUNCTIONAL_ENDPOINT, optional MVC.
addDecompileJar / addDecompileJarClass
Source analysis of external jar types.
addSourceClasspath
Source/classpath for symbol resolution.
customTypeMapper
Receives Class and schema Map to apply custom schema.
Annotation to correct inference
Write only if changed
If the generation result is the same as the existing JSON, it will not unnecessarily change the file timestamp. This is advantageous in reducing regeneration loops in a structure where the front watcher detects changes in the swagger file.