chore: prep for 3.3.0 (#319)

This commit is contained in:
Ryan Brink
2022-09-15 08:27:17 -05:00
committed by GitHub
parent fdcc64d29c
commit 95ae274f1d
36 changed files with 138 additions and 78 deletions

View File

@ -18,9 +18,15 @@ sourdoughLibrary {
}
dependencies {
// Versions
val detektVersion: String by project
api(projects.kompendiumJsonSchema)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
// Formatting
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
testImplementation(testFixtures(projects.kompendiumCore))
}

View File

@ -12,6 +12,6 @@ import kotlinx.serialization.Serializable
*/
@Serializable
data class Components(
val schemas: MutableMap<String, JsonSchema> = mutableMapOf(),
val securitySchemes: MutableMap<String, SecuritySchema> = mutableMapOf()
val schemas: MutableMap<String, JsonSchema> = mutableMapOf(),
val securitySchemes: MutableMap<String, SecuritySchema> = mutableMapOf()
)

View File

@ -16,10 +16,10 @@ import kotlinx.serialization.Serializable
*/
@Serializable
data class Header(
val schema: JsonSchema,
val description: String? = null,
val required: Boolean = true,
val deprecated: Boolean = false,
val allowEmptyValue: Boolean? = null,
val schema: JsonSchema,
val description: String? = null,
val required: Boolean = true,
val deprecated: Boolean = false,
val allowEmptyValue: Boolean? = null,
// todo support styling https://spec.openapis.org/oas/v3.1.0#style-values
)

View File

@ -15,9 +15,9 @@ import kotlinx.serialization.Serializable
*/
@Serializable
data class MediaType(
val schema: JsonSchema,
val examples: Map<String, Example>? = null,
val encoding: Map<String, Encoding>? = null,
val schema: JsonSchema,
val examples: Map<String, Example>? = null,
val encoding: Map<String, Encoding>? = null,
) {
@Serializable
data class Example(@Contextual val value: Any)

View File

@ -3,7 +3,7 @@ package io.bkbn.kompendium.oas.security
import kotlinx.serialization.Serializable
@Serializable
data class BearerAuth(val bearerFormat: String? = null): SecuritySchema {
data class BearerAuth(val bearerFormat: String? = null) : SecuritySchema {
val type: String = "http"
val scheme: String = "bearer"
}

View File

@ -16,5 +16,4 @@ object UriSerializer : KSerializer<URI> {
override fun serialize(encoder: Encoder, value: URI) {
encoder.encodeString(value.toString())
}
}