Compare commits

...

15 Commits

Author SHA1 Message Date
3c585c06a3 feat: kompendium 2.0.0 release! 2022-01-23 14:14:44 -05:00
7bfd168d74 chore(deps): update endbug/add-and-commit action to v8 (#158)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 17:00:22 -05:00
19298f4deb chore(deps): update plugin io.bkbn.sourdough.root to v0.6.0 (#161)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 14:46:51 +00:00
54bdf107e2 chore(deps): update plugin io.bkbn.sourdough.library.jvm to v0.6.0 (#160)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 12:35:30 +00:00
721302d651 chore(deps): update plugin io.bkbn.sourdough.application.jvm to v0.6.0 (#159)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 11:09:16 +00:00
3ffda43a52 chore(deps): update dependency org.webjars:swagger-ui to v4.2.1 (#157)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 10:34:17 +00:00
ae2a1b578a chore: version bumps and cleanup (#156) 2022-01-17 03:22:33 +00:00
147c7e7fb0 chore(deps): update kotestversion to v5.1.0 (#155)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-16 19:02:58 -05:00
906b329c2e chore(deps): update dependency org.slf4j:slf4j-simple to v1.7.33 (#153)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 19:03:18 +00:00
1bf81cfd82 chore(deps): update dependency org.slf4j:slf4j-api to v1.7.33 (#152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 17:25:57 +00:00
c9f173d6b0 chore(deps): update plugin io.bkbn.sourdough.root to v0.5.5 (#151)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 13:19:33 +00:00
c43fafae1b chore(deps): update plugin io.bkbn.sourdough.library.jvm to v0.5.5 (#150)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 08:17:21 -05:00
3b2fa72d26 chore(deps): update plugin io.bkbn.sourdough.application.jvm to v0.5.5 (#149)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 12:25:52 +00:00
91d4ec10b7 chore(deps): update dependency org.webjars:swagger-ui to v4.1.3-1 (#148)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 10:15:55 +00:00
aa1b898b22 fix: adding signing plugin (#147) 2022-01-12 11:19:19 -05:00
12 changed files with 84 additions and 96 deletions

View File

@ -46,7 +46,7 @@ jobs:
properties: | properties: |
release=true release=true
- name: Push New Documentation - name: Push New Documentation
uses: EndBug/add-and-commit@v7 uses: EndBug/add-and-commit@v8
with: with:
default_author: github_actions default_author: github_actions
branch: main branch: main

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
.gradle .gradle
build build
.idea .idea
dokka
wiki

View File

@ -1,6 +1,7 @@
# Changelog # Changelog
## Unreleased ## Unreleased
### Added ### Added
### Changed ### Changed
@ -11,21 +12,19 @@
## Released ## Released
## [2.0.0-beta] - January 12th, 2022 ## [2.0.0] - January 23rd, 2022
Major Release 🎉 As we head towards the Ktor 2 release, this library will be kept compatible with Ktor 1. A future
Kompendium 2 repository will be created soon, porting much of the changes you see here, with some awesome Ktor 2 twists
😉
### Added ### Added
- Support for HTTP Patch, Head, and Options methods - Support for HTTP Patch, Head, and Options methods
- Support for including parameter examples via `MethodInfo` - Support for including parameter examples via `MethodInfo`
- Dokka Pipeline Generation - Dokka Pipeline Generation
- GitHub Pages integration - GitHub Pages integration
- Sourdough Gradle updates - Sourdough Gradle updates
### Changed
- Kompendium now leverages the chosen API serializer. Supports Jackson, Gson and Kotlinx Serialization
- Fixed bug where overridden field names were not reflected in serialized object and required array
- Fixed bug where Ktor Location parents were not being scanned for parameters
## [2.0.0-alpha] - January 2nd, 2022
### Added
- Support for OAuth authentication - Support for OAuth authentication
- Gradle Toolchain feature to ensure match between local JDK and compile target - Gradle Toolchain feature to ensure match between local JDK and compile target
- Dokka integration - Dokka integration
@ -35,6 +34,10 @@
- Ability to document expected unstructured data - Ability to document expected unstructured data
### Changed ### Changed
- Kompendium now leverages the chosen API serializer. Supports Jackson, Gson and Kotlinx Serialization
- Fixed bug where overridden field names were not reflected in serialized object and required array
- Fixed bug where Ktor Location parents were not being scanned for parameters
- `$ref` types are no longer generated, instead all objects are defined explicitly - `$ref` types are no longer generated, instead all objects are defined explicitly
- All OpenAPI domain models moved to a separate module `kompendium-oas` - All OpenAPI domain models moved to a separate module `kompendium-oas`
- Moved all files in `kompendium-core` into `io.bkbn.kompendium.core` package from `io.bkbn.kompendium` - Moved all files in `kompendium-core` into `io.bkbn.kompendium.core` package from `io.bkbn.kompendium`
@ -42,7 +45,8 @@
- Gradle build logic offloaded to Sourdough Plugin - Gradle build logic offloaded to Sourdough Plugin
- Minimum supported Java version is now 11 - Minimum supported Java version is now 11
- Bumped Kotlin to 1.6 - Bumped Kotlin to 1.6
- Annotations now live in a separate module. (Should not impact end users as module is imported as api dependency by core). - Annotations now live in a separate module. (Should not impact end users as module is imported as api dependency by
core).
- Kotest as the testing framework of choice - Kotest as the testing framework of choice
- Path calculation removed in favor of built-in route toString - Path calculation removed in favor of built-in route toString
- Ktor to 1.6.7 - Ktor to 1.6.7
@ -68,11 +72,15 @@
- Dropped ASDF tool manifest - Dropped ASDF tool manifest
## [1.11.1] - November 25th, 2021 ## [1.11.1] - November 25th, 2021
### Added ### Added
- Documentation showing how to add header names using Kotlin backtick convention - Documentation showing how to add header names using Kotlin backtick convention
## [1.11.0] - November 25th, 2021 ## [1.11.0] - November 25th, 2021
### Added ### Added
- Support for Ktor Location Plugin - Support for Ktor Location Plugin
## [1.10.0] - November 25th, 2021 ## [1.10.0] - November 25th, 2021
@ -92,7 +100,7 @@
### Changed ### Changed
- Code Coverage removed from PR checks due to limitations with GitHub workflows - Code Coverage removed from PR checks due to limitations with GitHub workflows
- Minor linting fixes - Minor linting fixes
- Detekt now builds off of default config - Detekt now builds off of default config
@ -102,7 +110,6 @@
- ByteArray added to the set of default types - ByteArray added to the set of default types
## [1.8.1] - October 4th, 2021 ## [1.8.1] - October 4th, 2021
### Added ### Added
@ -216,13 +223,13 @@ This is just to get my repo back to normal now that I have confirmed sonatype pu
- In order to facilitate default parameters, a couple changes were needed - In order to facilitate default parameters, a couple changes were needed
- `KompendiumParam` was added in replacement of the four parameter annotations - `KompendiumParam` was added in replacement of the four parameter annotations
- Specs now explicitly declare type of parameter rather than a reference in order to not override default values. - Specs now explicitly declare type of parameter rather than a reference in order to not override default values.
## [0.8.0] - May 4th, 2021 ## [0.8.0] - May 4th, 2021
### Added ### Added
- Support for example request and response bodies. Parameter examples / defaults are a separate issue for later. - Support for example request and response bodies. Parameter examples / defaults are a separate issue for later.
### Changed ### Changed
@ -238,7 +245,7 @@ This is just to get my repo back to normal now that I have confirmed sonatype pu
### Changed ### Changed
- Refactored `kompendium-core` to break up the `Kompendium` object into slightly more manageable chunks - Refactored `kompendium-core` to break up the `Kompendium` object into slightly more manageable chunks
- Notarization Parameters can now be inferred from method info - Notarization Parameters can now be inferred from method info
## [0.6.2] - April 23rd, 2021 ## [0.6.2] - April 23rd, 2021
@ -255,23 +262,24 @@ This is just to get my repo back to normal now that I have confirmed sonatype pu
### Changed ### Changed
- Set jvm target to 11 - Set jvm target to 11
- Resolved bug for empty params and/or empty response body - Resolved bug for empty params and/or empty response body
## [0.6.0] - April 21st, 2021 ## [0.6.0] - April 21st, 2021
### Added ### Added
- Added basic and jwt security scheme support with the new module kompendium-auth - Added basic and jwt security scheme support with the new module kompendium-auth
## [0.5.2] - April 19th, 2021 ## [0.5.2] - April 19th, 2021
### Removed ### Removed
- Removed `Route.calculatePath` - Removed `Route.calculatePath`
### Added
- Added an explicit `PathCalculator` interface to allow for easier handling of routes external to the core set of Ktor route selectors. ### Added
- Added an explicit `PathCalculator` interface to allow for easier handling of routes external to the core set of Ktor
route selectors.
## [0.5.1] - April 19th, 2021 ## [0.5.1] - April 19th, 2021
@ -283,7 +291,7 @@ This is just to get my repo back to normal now that I have confirmed sonatype pu
### Added ### Added
- Expose `/openapi.json` and `/docs` as opt-in pre-built Routes - Expose `/openapi.json` and `/docs` as opt-in pre-built Routes
## [0.4.0] - April 17th, 2021 ## [0.4.0] - April 17th, 2021
@ -362,12 +370,13 @@ This is just to get my repo back to normal now that I have confirmed sonatype pu
### Added ### Added
- Beginning of an implementation. Currently, able to generate a rough outline of the API at runtime, along with generating - Beginning of an implementation. Currently, able to generate a rough outline of the API at runtime, along with
full data classes represented by JSON Schema. generating full data classes represented by JSON Schema.
## [0.0.1] - April 11th, 2021 ## [0.0.1] - April 11th, 2021
### Added ### Added
- Added _most_ of the data classes necessary for generating an [Open API Spec](https://swagger.io/specification) - Added _most_ of the data classes necessary for generating an [Open API Spec](https://swagger.io/specification)
- Added playground to allow users to tinker with a live Ktor api in conjunction with development - Added playground to allow users to tinker with a live Ktor api in conjunction with development
- Added all standard OSS files - Added all standard OSS files

View File

@ -1,6 +1,9 @@
plugins { plugins {
kotlin("jvm") version "1.6.10" apply false kotlin("jvm") version "1.6.10" apply false
id("io.bkbn.sourdough.root") version "0.5.4" kotlin("plugin.serialization") version "1.6.10" apply false
id("io.bkbn.sourdough.library.jvm") version "0.6.0" apply false
id("io.bkbn.sourdough.application.jvm") version "0.6.0" apply false
id("io.bkbn.sourdough.root") version "0.6.0"
id("com.github.jakemarsden.git-hooks") version "0.0.2" id("com.github.jakemarsden.git-hooks") version "0.0.2"
id("org.jetbrains.dokka") version "1.6.10" id("org.jetbrains.dokka") version "1.6.10"
id("org.jetbrains.kotlinx.kover") version "0.5.0-RC" id("org.jetbrains.kotlinx.kover") version "0.5.0-RC"
@ -27,3 +30,17 @@ allprojects {
} }
} }
} }
subprojects {
plugins.withType(io.bkbn.sourdough.gradle.library.jvm.LibraryJvmPlugin::class) {
extensions.configure(io.bkbn.sourdough.gradle.library.jvm.LibraryJvmExtension::class) {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
}
}
}

View File

@ -1,5 +1,5 @@
# Kompendium # Kompendium
project.version=2.0.0-beta project.version=2.0.0
# Kotlin # Kotlin
kotlin.code.style=official kotlin.code.style=official
# Gradle # Gradle
@ -9,4 +9,4 @@ org.gradle.jvmargs=-Xmx2000m
# Dependencies # Dependencies
ktorVersion=1.6.7 ktorVersion=1.6.7
kotestVersion=5.0.3 kotestVersion=5.1.0

View File

@ -1,23 +1,17 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium Annotations") libraryName.set("Kompendium Annotations")
libraryDescription.set("A set of annotations used by Kompendium to generate OpenAPI Specifications") libraryDescription.set("A set of annotations used by Kompendium to generate OpenAPI Specifications")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
} }
testing { testing {

View File

@ -1,23 +1,17 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium Authentication") libraryName.set("Kompendium Authentication")
libraryDescription.set("Kompendium library to pair with Ktor Auth to provide authorization info to OpenAPI") libraryDescription.set("Kompendium library to pair with Ktor Auth to provide authorization info to OpenAPI")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
} }
dependencies { dependencies {

View File

@ -1,24 +1,18 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
id("java-test-fixtures") id("java-test-fixtures")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium Core") libraryName.set("Kompendium Core")
libraryDescription.set("Core functionality for the Kompendium library") libraryDescription.set("Core functionality for the Kompendium library")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn")) compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn"))
} }

View File

@ -1,23 +1,17 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium Locations") libraryName.set("Kompendium Locations")
libraryDescription.set("Supplemental library for Kompendium offering support for Ktor's Location API") libraryDescription.set("Supplemental library for Kompendium offering support for Ktor's Location API")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn")) compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn"))
} }

View File

@ -1,24 +1,18 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("plugin.serialization") version "1.6.10" kotlin("plugin.serialization")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium OpenAPI Spec") libraryName.set("Kompendium OpenAPI Spec")
libraryDescription.set("Collections of kotlin data classes modeling the OpenAPI specification") libraryDescription.set("Collections of kotlin data classes modeling the OpenAPI specification")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn")) compilerArgs.set(listOf("-opt-in=kotlin.RequiresOptIn"))
} }

View File

@ -1,7 +1,7 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("plugin.serialization") version "1.6.10" kotlin("plugin.serialization")
id("io.bkbn.sourdough.application.jvm") version "0.5.4" id("io.bkbn.sourdough.application.jvm")
id("application") id("application")
} }
@ -33,8 +33,8 @@ dependencies {
implementation("org.apache.logging.log4j:log4j-api-kotlin:1.1.0") implementation("org.apache.logging.log4j:log4j-api-kotlin:1.1.0")
implementation("org.apache.logging.log4j:log4j-api:2.17.1") implementation("org.apache.logging.log4j:log4j-api:2.17.1")
implementation("org.apache.logging.log4j:log4j-core:2.17.1") implementation("org.apache.logging.log4j:log4j-core:2.17.1")
implementation("org.slf4j:slf4j-api:1.7.32") implementation("org.slf4j:slf4j-api:1.7.33")
implementation("org.slf4j:slf4j-simple:1.7.32") implementation("org.slf4j:slf4j-simple:1.7.33")
implementation(group = "org.jetbrains.kotlinx", "kotlinx-serialization-json", version = "1.3.1") implementation(group = "org.jetbrains.kotlinx", "kotlinx-serialization-json", version = "1.3.1")

View File

@ -1,30 +1,24 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("io.bkbn.sourdough.library.jvm") version "0.5.4" id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") version "1.19.0" id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") version "3.1.0" id("com.adarshr.test-logger")
id("org.jetbrains.dokka") id("org.jetbrains.dokka")
id("maven-publish") id("maven-publish")
id("java-library") id("java-library")
id("signing")
} }
sourdough { sourdough {
githubOrg.set("bkbnio")
githubRepo.set("kompendium")
libraryName.set("Kompendium Swagger") libraryName.set("Kompendium Swagger")
libraryDescription.set("Offers Swagger as a bundled WebJAR for Ktor") libraryDescription.set("Offers Swagger as a bundled WebJAR for Ktor")
licenseName.set("MIT License")
licenseUrl.set("https://mit-license.org")
developerId.set("unredundant")
developerName.set("Ryan Brink")
developerEmail.set("admin@bkbn.io")
} }
dependencies { dependencies {
val ktorVersion: String by project val ktorVersion: String by project
implementation(group = "io.ktor", name = "ktor-server-core", version = ktorVersion) implementation(group = "io.ktor", name = "ktor-server-core", version = ktorVersion)
implementation(group = "io.ktor", name = "ktor-webjars", version = ktorVersion) implementation(group = "io.ktor", name = "ktor-webjars", version = ktorVersion)
implementation(group = "org.webjars", name = "swagger-ui", version = "4.1.3") implementation(group = "org.webjars", name = "swagger-ui", version = "4.2.1")
} }
testing { testing {