mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
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:
1 parent
1a9cbd26b3
commit
2de029b96e
8 files changed
+28
-6
No files matched your search
@@ -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"] },
|
||||
|
||||
@@ -55,6 +55,7 @@ class ProgressEvent {
|
||||
technologies: {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "object",
|
||||
required: ["name", "level", "progress"],
|
||||
properties: {
|
||||
name: { type: "string" },
|
||||
|
||||
@@ -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" },
|
||||
|
||||
Reference in new issue
Block a user