Fix strict mode warnings from Ajv

Add type object to schemas specifying properties and minItems to schemas
specifying tuples. Disable strictTuples because it's desirable to be
able to add additional items to the tuples in the future.
This commit is contained in:
Hornwitser committed 2023-07-27 00:35:26 +02:00
1 parent 1a9cbd26b3
commit 2de029b96e
8 files changed
+28 -6

No files matched your search

+2
View File
@@ -47,6 +47,7 @@ AcquireRequest.Response = class Response {
}
static jsonSchema = {
type: "object",
required: ["status"],
properties: {
"status": {
@@ -165,6 +166,7 @@ DownloadRequest.Response = class Response {
}
static jsonSchema = {
type: "object",
required: ["playerData"],
properties: {
"playerData": { type: ["object", "null"] },
+1
View File
@@ -55,6 +55,7 @@ class ProgressEvent {
technologies: {
type: "array",
items: {
type: "object",
required: ["name", "level", "progress"],
properties: {
name: { type: "string" },
+4
View File
@@ -46,6 +46,7 @@ class PlaceEvent {
}
static jsonSchema = {
type: "object",
required: ["items"],
properties: {
"items": {
@@ -74,6 +75,7 @@ class RemoveRequest {
}
static jsonSchema = {
type: "object",
required: ["items"],
properties: {
"items": {
@@ -113,6 +115,7 @@ class UpdateStorageEvent {
}
static jsonSchema = {
type: "object",
required: ["items"],
properties: {
"items": {
@@ -142,6 +145,7 @@ class SetStorageSubscriptionRequest {
}
static jsonSchema = {
type: "object",
required: ["storage"],
properties: {
"storage": { type: "boolean" },