diff --git a/api-gen-runtime/build.gradle.kts b/api-gen-runtime/build.gradle.kts index 9a1e11e..e369f5a 100644 --- a/api-gen-runtime/build.gradle.kts +++ b/api-gen-runtime/build.gradle.kts @@ -16,7 +16,6 @@ kotlin { val commonMain by getting { dependencies { api(libs.kotlinx.datetime) - api(libs.kotlinx.serialization.cbor) api(libs.kotlinx.serialization.json) api(libs.ktor.core) diff --git a/api-gen-runtime/src/commonMain/kotlin/sh/christian/ozone/api/model/Blob.kt b/api-gen-runtime/src/commonMain/kotlin/sh/christian/ozone/api/model/Blob.kt index 1085be9..234ddd5 100644 --- a/api-gen-runtime/src/commonMain/kotlin/sh/christian/ozone/api/model/Blob.kt +++ b/api-gen-runtime/src/commonMain/kotlin/sh/christian/ozone/api/model/Blob.kt @@ -6,7 +6,6 @@ import kotlinx.serialization.EncodeDefault import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import kotlinx.serialization.cbor.ByteString import sh.christian.ozone.api.Cid import sh.christian.ozone.api.runtime.BlobSerializer @@ -21,7 +20,7 @@ sealed interface Blob { @Serializable data class StandardBlob( - @ByteString val ref: BlobRef, + val ref: BlobRef, val mimeType: String, val size: Long, ) : Blob { diff --git a/generator/src/main/kotlin/sh/christian/ozone/api/generator/TypeNames.kt b/generator/src/main/kotlin/sh/christian/ozone/api/generator/TypeNames.kt index fb70ad5..1b1bec4 100644 --- a/generator/src/main/kotlin/sh/christian/ozone/api/generator/TypeNames.kt +++ b/generator/src/main/kotlin/sh/christian/ozone/api/generator/TypeNames.kt @@ -9,7 +9,6 @@ object TypeNames { val AtpEnum by classOfPackage("sh.christian.ozone.api.model") val AtpResponse by classOfPackage("sh.christian.ozone.api.response") val Blob by classOfPackage("sh.christian.ozone.api.model") - val ByteString by classOfPackage("kotlinx.serialization.cbor") val Cid by classOfPackage("sh.christian.ozone.api") val Deprecated by classOfPackage("kotlin") val Did by classOfPackage("sh.christian.ozone.api") diff --git a/generator/src/main/kotlin/sh/christian/ozone/api/generator/builder/util.kt b/generator/src/main/kotlin/sh/christian/ozone/api/generator/builder/util.kt index 701186f..55ce7f0 100644 --- a/generator/src/main/kotlin/sh/christian/ozone/api/generator/builder/util.kt +++ b/generator/src/main/kotlin/sh/christian/ozone/api/generator/builder/util.kt @@ -80,9 +80,6 @@ fun createDataClass( defaultValue(property.defaultValue()) } addDescription(property.description) - if (property.type.hasClassName(BYTE_ARRAY)) { - addAnnotation(AnnotationSpec.builder(TypeNames.ByteString).build()) - } } .build() }