Skip to content

Commit a716ef0

Browse files
committed
Add specific places for implementations to link their docs and source.
Homepage and source are not always the same, and we may at some point make use of all these fields in the Bowtie UI.
1 parent bb56257 commit a716ef0

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ tasks.withType<Jar> {
2020
put("Implementation-Version", lib.version)
2121
put("Implementation-Homepage", "https://github.com/OptimumCode/json-schema-validator")
2222
put("Implementation-Issues", "https://github.com/OptimumCode/json-schema-validator/issues")
23+
put("Implementation-Source", "https://github.com/OptimumCode/json-schema-validator")
2324
},
2425
)
2526
}

src/main/kotlin/BowtieSampsonSchemaValidatorLauncher.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class BowtieSampsonSchemaValidatorLauncher(
5555
private val libraryVersion: String
5656
private val libraryHomepage: String
5757
private val libraryIssues: String
58+
private val librarySource: String
5859

5960
init {
6061
val attributes: Attributes = javaClass.getResourceAsStream("META-INF/MANIFEST.MF").use {
@@ -65,6 +66,7 @@ class BowtieSampsonSchemaValidatorLauncher(
6566
libraryVersion = getValue("Implementation-Version")
6667
libraryHomepage = getValue("Implementation-Homepage")
6768
libraryIssues = getValue("Implementation-Issues")
69+
librarySource = getValue("Implementation-Source")
6870
}
6971
}
7072

@@ -189,6 +191,7 @@ class BowtieSampsonSchemaValidatorLauncher(
189191
homepage = libraryHomepage,
190192
dialects = SUPPORTED_DIALECTS,
191193
issues = libraryIssues,
194+
source = librarySource,
192195
),
193196
),
194197
),

src/main/kotlin/Responses.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ class StartResponse(
88
val implementation: Implementation,
99
)
1010

11+
@Suppress("LongParameterList")
1112
@Serializable
1213
class Implementation(
1314
val language: String = "kotlin",
1415
val name: String = "kmp-json-schema-validator",
1516
val version: String,
1617
val dialects: Set<String>,
17-
val homepage: String? = null,
18+
val homepage: String,
1819
val issues: String,
20+
val source: String,
1921
)
2022

2123
@Serializable

0 commit comments

Comments
 (0)