Add custom JSON schema, extending KPluginMetaData and enforcing KDE-Connect specific keys

This commit is contained in:
Alexander Lohnau 2024-05-30 22:12:13 +02:00 committed by Albert Vaca Cintora
parent 4a6babecba
commit b1c3049fc1
30 changed files with 85 additions and 6 deletions

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,5 +1,5 @@
{ {
"Encoding": "UTF-8", "$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {
@ -132,5 +133,6 @@
}, },
"X-KdeConnect-OutgoingPacketType": [ "X-KdeConnect-OutgoingPacketType": [
"kdeconnect.findmyphone.request" "kdeconnect.findmyphone.request"
] ],
"X-KdeConnect-SupportedPacketType": []
} }

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {
@ -111,5 +112,6 @@
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_findthisdevice_config", "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_findthisdevice_config",
"X-KdeConnect-SupportedPacketType": [ "X-KdeConnect-SupportedPacketType": [
"kdeconnect.findmyphone.request" "kdeconnect.findmyphone.request"
] ],
"X-KdeConnect-OutgoingPacketType": []
} }

View file

@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://autoconfig.kde.org/jsonschemas/kpluginmetadata.schema.json"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"KPlugin",
"X-KdeConnect-SupportedPacketType",
"X-KdeConnect-OutgoingPacketType"
],
"properties": {
"$schema": {
"type": "string"
},
"KPlugin": {
"type": "object"
},
"X-KdeConnect-SupportedPacketType": {
"type": "array",
"items": {
"type": "string"
}
},
"X-KdeConnect-OutgoingPacketType": {
"type": "array",
"items": {
"type": "string"
}
},
"X-KdeConnect-SupportedDeviceTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"X-KDE-ConfigModule": {
"type": "string",
"pattern": "^kdeconnect/kcms/[^/]+$"
}
}
}
]
}

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {
@ -116,5 +117,6 @@
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_pausemusic_config", "X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_pausemusic_config",
"X-KdeConnect-SupportedPacketType": [ "X-KdeConnect-SupportedPacketType": [
"kdeconnect.telephony" "kdeconnect.telephony"
] ],
"X-KdeConnect-OutgoingPacketType": []
} }

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {
@ -111,5 +112,7 @@
"Name[x-test]": "xxInhibit screensaverxx", "Name[x-test]": "xxInhibit screensaverxx",
"Name[zh_CN]": "禁止屏保", "Name[zh_CN]": "禁止屏保",
"Name[zh_TW]": "停止螢幕保護" "Name[zh_TW]": "停止螢幕保護"
} },
"X-KdeConnect-SupportedPacketType": [],
"X-KdeConnect-OutgoingPacketType": []
} }

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,5 +1,5 @@
{ {
"Encoding": "UTF-8", "$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {

View file

@ -1,4 +1,5 @@
{ {
"$schema": "../kdeconnect.schema.json",
"KPlugin": { "KPlugin": {
"Authors": [ "Authors": [
{ {