Skip to content

Commit

Permalink
Remove @ByteString annotation.
Browse files Browse the repository at this point in the history
Redundant now that alwaysUseByteString is a Cbor configuration option.
  • Loading branch information
christiandeange committed Nov 24, 2024
1 parent 4abc3e2 commit 6270e94
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion api-gen-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 6270e94

Please sign in to comment.