A simple Gradle Plugin 🐘 to generate an OpenAPI diff from git tags and integrate it to your changelog.
// build.gradle.kts
plugins {
id("dev.octogene.openapidff") version "0.1.0"
}
openapiDiff {
targetFile = "${project.projectDir}/doc/openapi/petstore.yaml"
// Optional (will use targetFile as default)
baseFile = "${project.projectDir}/petstore.yaml"
baseTag = "example-1.0.0"
outputFile = "${project.projectDir}/CHANGELOG.md"
// Optional
section = "### OpenAPI"
// Optional (will use HEAD as default target)
targetTag = "example-1.0.2"
}
- Generate openapi diff from tags
- Insert diff at a section in markdown or asciidoc document
You can try to use directly the plugin with the example project by running:
./gradlew :example:patchOpenAPIDiff
Or you can use the task from the Gradle Changelog Plugin we hooked with our custom task :
./gradlew :example:patchChangelog
Feel free to open a issue or submit a pull request for any bugs/improvements.
This project is licensed under the MIT License - see the License file for details. This project is using the kotlin-gradle-plugin-template by Nicola Corti.