Repository navigation
Releases: AVSystem/justworks
Release list
v0.4.0
Highlights
Generated API clients can now take a preconfigured Ktor HttpClient. The generated client derives its own client from it with HttpClient.config {}, so every API client built from the same HttpClient shares one engine, its connection pool and the plugins you installed (timeouts, logging, metrics). Generated code still installs its own ContentNegotiation and sets expectSuccess = false. Closing a generated client does not close the HttpClient you passed in.
val http = HttpClient(Apache5) {
install(HttpTimeout) { requestTimeoutMillis = 10_000 }
}
val pets = PetsApi("https://api.example.com", http) { tokenStore.getAccessToken() }See [Ktor Engine and HttpClient] in the README.
Breaking changes
Generated client constructors gained a second parameter, httpClient: HttpClient? = null, placed before the auth parameters. Calls using a trailing lambda or named arguments compile unchanged:
PetsApi("https://api.example.com") { token } // still compiles
PetsApi(baseUrl = "https://api.example.com", token = { token }) // still compilesCalls that pass auth lambdas positionally inside the parentheses no longer compile, because the first lambda now lands on httpClient:
PetsApi("https://api.example.com", { token }) // ❌ no longer compiles
BasicApi("https://api.example.com", { user }, { pass }) // ❌ no longer compilesTo fix them, use a trailing lambda or named arguments, e.g. BasicApi(url, basicAuthUsername = { user }, basicAuthPassword = { pass }).
What's Changed
- feat(api): enable injection of a preconfigured HttpClient for shared engine and plugin usage by @mfabisiak in #123
- chore(deps): bump com.squareup:kotlinpoet from 2.3.0 to 2.4.0 by @dependabot[bot] in #121
- chore(deps): bump jvm from 2.4.0 to 2.4.10 by @dependabot[bot] in #106
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.45 to 2.1.48 by @dependabot[bot] in #120
- chore(deps): bump gradle-wrapper from 9.5.1 to 9.7.1 by @dependabot[bot] in #119
Full Changelog: v0.3.1...v0.4.0
v0.3.1
What's Changed
- feat(plugin): add generateInterfaces option by @halotukozak in #86
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
- test(core): integration tests against popular public OpenAPI specs by @halotukozak in #90
- feat(core): support non-JSON response content types by @halotukozak in #81
- chore(deps): bump com.vanniktech.maven.publish from 0.36.0 to 0.37.0 by @dependabot[bot] in #101
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.43 to 2.1.45 by @dependabot[bot] in #102
- chore(deps): bump org.jetbrains.kotlinx.kover from 0.9.8 to 0.9.9 in the kotlin group across 1 directory by @dependabot[bot] in #107
- test(plugin): add compilation test for a feature-rich spec by @halotukozak in #88
- Add codeql yml file by @mzielu in #113
- fix(core): decoding string responses by @mfabisiak in #112
- fix(core): use URL encoding for path parameters by @mfabisiak in #109
New Contributors
Full Changelog: v0.2.5...v0.3.0
v0.2.5
What's Changed
- fix(core): oneOf wrapper (externally-tagged) unions generate an internally-tagged model that cannot deserialize the wire payload by @mfabisiak in #105
Full Changelog: v0.2.4...v0.2.5
v0.2.4
What's Changed
- feat(core): honor schema-level nullable:true in OpenAPI 3.0 by @halotukozak in #83
Full Changelog: v0.2.3...v0.2.4
v0.2.3
What's Changed
- fix(core): use backtick-escaped constant reference for enum default values by @mfabisiak in #99
New Contributors
- @mfabisiak made their first contribution in #99
Full Changelog: v0.2.2...v0.2.3
v0.2.2
What's Changed
- fix: generate compilable defaults for object-reference properties by @halotukozak in #97
Full Changelog: v0.2.1...v0.2.2
v0.2.1
What's Changed
- fix: emit Set defaults for unique arrays in generated models by @halotukozak in #96
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- chore(deps): bump io.arrow-kt:arrow-core from 2.2.2.1 to 2.2.3 by @dependabot[bot] in #72
- chore(deps): bump jvm from 2.3.21 to 2.4.0 by @dependabot[bot] in #71
- feat: generate Kotlin Set for array schemas with uniqueItems by @halotukozak in #75
- Generate typed enums for inline enums in array items by @halotukozak in #76
- fix(core): map content-less response schema to Unit, not JsonElement by @halotukozak in #79
- fix(core): stop hoisting polymorphic discriminator into a dead enum by @halotukozak in #78
- fix(core): honor property defaults instead of dropping them to null by @halotukozak in #77
- refactor(build): remove
-Xcontext-parameterscompiler argument configuration by @halotukozak in #95 - feat(plugin): add generateKdoc configuration option by @halotukozak in #84
- feat(plugin): add apiClassPrefix / apiClassSuffix options by @halotukozak in #85
- docs: add "What Gets Generated" section to README by @halotukozak in #87
Full Changelog: v0.1.0...v0.2.0
v0.1.0
What's Changed
- Configure Dependabot for Gradle with daily updates by @halotukozak in #55
- chore(deps): bump org.jetbrains.kotlinx.kover from 0.9.1 to 0.9.8 in the kotlin group by @dependabot[bot] in #56
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.39 to 2.1.40 by @dependabot[bot] in #59
- chore(deps): bump org.jlleitschuh.gradle.ktlint from 12.1.2 to 14.2.0 by @dependabot[bot] in #57
- chore(deps): bump gradle-wrapper from 8.13 to 9.4.1 by @dependabot[bot] in #58
- chore(deps): bump jvm from 2.3.0 to 2.3.20 by @dependabot[bot] in #60
- chore(deps): bump com.squareup:kotlinpoet from 2.2.0 to 2.3.0 by @dependabot[bot] in #61
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.40 to 2.1.41 by @dependabot[bot] in #65
- chore(deps): bump io.arrow-kt:arrow-core from 2.2.1.1 to 2.2.2.1 by @dependabot[bot] in #63
- chore(deps): bump jvm from 2.3.20 to 2.3.21 by @dependabot[bot] in #64
- chore(deps): bump org.jetbrains.kotlinx:kotlinx-datetime from 0.7.1 to 0.8.0 in the kotlin group by @dependabot[bot] in #67
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.41 to 2.1.42 by @dependabot[bot] in #68
- chore(deps): bump com.vanniktech.maven.publish from 0.30.0 to 0.36.0 by @dependabot[bot] in #62
- feat(core): support HEAD, OPTIONS and TRACE HTTP methods by @halotukozak in #49
- feat(core): support default response in return type resolution by @halotukozak in #50
- feat(core): emit warnings when unknown schemas map to JsonElement by @halotukozak in #51
- chore(deps): bump io.swagger.parser.v3:swagger-parser from 2.1.42 to 2.1.43 by @dependabot[bot] in #70
- chore(deps): bump gradle-wrapper from 9.4.1 to 9.5.1 by @dependabot[bot] in #69
- feat(core): validate operationId uniqueness and warn on duplicates by @halotukozak in #52
- Remove sanitizeKdoc — redundant with KotlinPoet 2.3.0 by @halotukozak in #66
New Contributors
- @dependabot[bot] made their first contribution in #56
Full Changelog: v0.0.2...v0.1.0