mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-08-26 05:36:53 +00:00
fix: remove jsonunwrapped workaround by upgrading to micronaut-json-schema version 2.0.0-M6
This commit is contained in:
parent
da0d67a2db
commit
1702266b75
@ -161,12 +161,6 @@ val compileJsonSchemas by tasks.registering(JavaCompile::class) {
|
||||
source = sourceSets.main.get().java
|
||||
include("org/asamk/signal/json/**/*.java")
|
||||
|
||||
// Exclude files with @JsonUnwrapped and files that reference them as that breaks
|
||||
// the annotation generator
|
||||
exclude("org/asamk/signal/json/JsonSyncDataMessage.java")
|
||||
exclude("org/asamk/signal/json/JsonSyncStoryMessage.java")
|
||||
exclude("org/asamk/signal/json/JsonSyncMessage.java")
|
||||
|
||||
classpath = sourceSets.main.get().compileClasspath + files(sourceSets.main.get().java.destinationDirectory)
|
||||
destinationDirectory.set(layout.buildDirectory.dir("classes/java/schemas"))
|
||||
|
||||
@ -181,12 +175,6 @@ val compileJsonSchemas by tasks.registering(JavaCompile::class) {
|
||||
)
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from("src/main/resources/META-INF/schemas")
|
||||
into(destinationDirectory.get().dir("META-INF/schemas"))
|
||||
include("*.schema.json")
|
||||
}
|
||||
|
||||
fileTree(destinationDirectory.get().dir("META-INF/schemas").asFile) {
|
||||
include("*.schema.json")
|
||||
}.forEach { schemaFile ->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[versions]
|
||||
slf4j = "2.0.17"
|
||||
junit = "6.0.2"
|
||||
micronaut-json-schema = "1.7.2"
|
||||
micronaut-json-schema = "2.0.0-M6"
|
||||
micronaut-core = "4.9.3"
|
||||
|
||||
[libraries]
|
||||
|
||||
@ -1,109 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "sync-data-message.schema.json",
|
||||
"title": "SyncDataMessage",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"destination": {
|
||||
"type": "string"
|
||||
},
|
||||
"destinationNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"destinationUuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"editMessage": {
|
||||
"$ref": "edit-message.schema.json"
|
||||
},
|
||||
"adminDelete": {
|
||||
"$ref": "admin-delete.schema.json"
|
||||
},
|
||||
"attachments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "attachment.schema.json"
|
||||
}
|
||||
},
|
||||
"contacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "shared-contact.schema.json"
|
||||
}
|
||||
},
|
||||
"expiresInSeconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"groupInfo": {
|
||||
"$ref": "group-info.schema.json"
|
||||
},
|
||||
"isExpirationUpdate": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"mentions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "mention.schema.json"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"payment": {
|
||||
"$ref": "payment.schema.json"
|
||||
},
|
||||
"pinMessage": {
|
||||
"$ref": "pin-message.schema.json"
|
||||
},
|
||||
"pollCreate": {
|
||||
"$ref": "poll-create.schema.json"
|
||||
},
|
||||
"pollTerminate": {
|
||||
"$ref": "poll-terminate.schema.json"
|
||||
},
|
||||
"pollVote": {
|
||||
"$ref": "poll-vote.schema.json"
|
||||
},
|
||||
"previews": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "preview.schema.json"
|
||||
}
|
||||
},
|
||||
"quote": {
|
||||
"$ref": "quote.schema.json"
|
||||
},
|
||||
"reaction": {
|
||||
"$ref": "reaction.schema.json"
|
||||
},
|
||||
"remoteDelete": {
|
||||
"$ref": "remote-delete.schema.json"
|
||||
},
|
||||
"sticker": {
|
||||
"$ref": "sticker.schema.json"
|
||||
},
|
||||
"storyContext": {
|
||||
"$ref": "story-context.schema.json"
|
||||
},
|
||||
"textStyles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "text-style.schema.json"
|
||||
}
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "integer"
|
||||
},
|
||||
"unpinMessage": {
|
||||
"$ref": "unpin-message.schema.json"
|
||||
},
|
||||
"viewOnce": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"destinationNumber",
|
||||
"destinationUuid",
|
||||
"timestamp"
|
||||
]
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "sync-message.schema.json",
|
||||
"title": "SyncMessage",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blockedGroupIds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"blockedNumbers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"readMessages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "sync-read-message.schema.json"
|
||||
}
|
||||
},
|
||||
"sentMessage": {
|
||||
"$ref": "sync-data-message.schema.json"
|
||||
},
|
||||
"sentStoryMessage": {
|
||||
"$ref": "sync-story-message.schema.json"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"CONTACTS_SYNC",
|
||||
"GROUPS_SYNC",
|
||||
"REQUEST_SYNC"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "sync-story-message.schema.json",
|
||||
"title": "SyncStoryMessage",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"destinationNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"destinationUuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"allowsReplies": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fileAttachment": {
|
||||
"$ref": "attachment.schema.json"
|
||||
},
|
||||
"groupId": {
|
||||
"type": "string"
|
||||
},
|
||||
"textAttachment": {
|
||||
"title": "JsonStoryMessage.TextAttachment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"backgroundColor": {
|
||||
"type": "string"
|
||||
},
|
||||
"backgroundGradient": {
|
||||
"title": "JsonStoryMessage.TextAttachment.Gradient",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"angle": {
|
||||
"type": "integer"
|
||||
},
|
||||
"colors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"endColor": {
|
||||
"type": "string"
|
||||
},
|
||||
"positions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"startColor": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"preview": {
|
||||
"$ref": "preview.schema.json"
|
||||
},
|
||||
"style": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"textBackgroundColor": {
|
||||
"type": "string"
|
||||
},
|
||||
"textForegroundColor": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"destinationNumber",
|
||||
"destinationUuid",
|
||||
"allowsReplies"
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user