You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"as_text": "'street' property has been specified, but 'city' is missing."
275
281
}
276
282
]
277
283
```
@@ -298,14 +304,14 @@ The public methods of this class are:
298
304
299
305
This class could directly raise any of the following errors:
300
306
301
-
| Enum value | Description | Params |
302
-
|-|-|-|
303
-
| COULD_NOT_OPEN_FILE | The file path leads to a nonexistent file or an error occurred when opening the file. |**code -> int:** <br> Error code returned by [File.open()](https://docs.godotengine.org/en/stable/classes/class_file.html?highlight=File#class-file-method-open). |
304
-
| EMPTY_FILE | The input file is empty. | None. |
305
-
| JSON_PARSING_ERROR | An error occurred when parsing the JSON. These are only syntax errors. |**code -> int:** <br> Error returned by [JSONParseResult.get_error()](https://docs.godotengine.org/en/stable/classes/class_jsonparseresult.html#property-descriptions). <br> **line -> int:** <br> Line where the error ocurred. <br> **string -> String:** <br> Message that describes the error.|
306
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [OBJECT](./ENUMS.md).
307
-
OBJECT_MISSING_PROPERTY | The input does not specify a required property. | **property -> String:** <br> Name of the required property. |
308
-
OBJECT_NON_VALID_PROPERTY | The input specifies a property not defined by the structure. | **property -> String:** <br> Name of the non-valid property. |
309
-
OBJECT_ONE_IS_REQUIRED | If the structure defines an array of exclusive properties, and it specifies that at least one must be present, this error arises whenever none of these properties are present. | **properties -> Array:** <br> List of names of the exclusive properties. |
310
-
OBJECT_EXCLUSIVITY_ERROR | The input specifies two properties present in the same array of exclusive properties. | **properties -> Array:** <br> List of the exclusive properties specified in the input. |
311
-
OBJECT_DEPENDENCY_ERROR | The main property is present in the input but not the dependent one | **main_property -> String:** <br> Name of the main property. <br> **dependent_property -> String:** <br> Name of the dependent property. |
307
+
| Enum value | Description | Params | As text |
308
+
|-|-|-|-|
309
+
| COULD_NOT_OPEN_FILE | The file path leads to a nonexistent file or an error occurred when opening the file. |**code -> int:** <br> Error code returned by [File.open()](https://docs.godotengine.org/en/stable/classes/class_file.html?highlight=File#class-file-method-open). | Could not open the file |
310
+
| EMPTY_FILE | The input file is empty. | None. | The configuration file can not be empty |
311
+
| JSON_PARSING_ERROR | An error occurred when parsing the JSON. These are only syntax errors. |**code -> int:** <br> Error returned by [JSONParseResult.get_error()](https://docs.godotengine.org/en/stable/classes/class_jsonparseresult.html#property-descriptions). <br> **line -> int:** <br> Line where the error ocurred. <br> **string -> String:** <br> Message that describes the error.| JSON parsing error at line {line}: \"{string}\"|
312
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [OBJECT](./ENUMS.md).| Wrong type: expected 'object' |
313
+
OBJECT_MISSING_PROPERTY | The input does not specify a required property. | **property -> String:** <br> Name of the required property. | The property '{property}' has not been specified |
314
+
OBJECT_NON_VALID_PROPERTY | The input specifies a property not defined by the structure. | **property -> String:** <br> Name of the non-valid property. | The property '{property}' is not a valid one |
315
+
OBJECT_ONE_IS_REQUIRED | If the structure defines an array of exclusive properties, and it specifies that at least one must be present, this error arises whenever none of these properties are present. | **properties -> Array:** <br> List of names of the exclusive properties. | One of this properties needs to be specified: {properties} |
316
+
OBJECT_EXCLUSIVITY_ERROR | The input specifies two properties present in the same array of exclusive properties. | **properties -> Array:** <br> List of the exclusive properties specified in the input. | This properties can not be present at the same time: {properties} |
317
+
OBJECT_DEPENDENCY_ERROR | The main property is present in the input but not the dependent one | **main_property -> String:** <br> Name of the main property. <br> **dependent_property -> String:** <br> Name of the dependent property. | '{main_property}' property has been specified, but '{dependent_property}' is missing |
Copy file name to clipboardExpand all lines: doc/files/JSON-PROPERTY-ARRAY.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@ The public methods of this class are:
13
13
|**remove_max_size**| None. | Removes any maximum size boundary. | Nothing. |
14
14
|**set_element_property**|**element_property -> JSONProperty:** <br> Object with the conditions that every element of the array must satisfy. | Sets the conditions that every element of the array must satisfy. | Nothing. |
15
15
|**remove_element_property**| None. | Allows the elements of the array to be anything. | Nothing. |
16
-
| **set_uniqueness** | **uniqueness -> bool:** <br> Determines if every object of the array must be different from each other. <br> **unique_key -> String (""):** <br> If the array has dictionaries as its elements, 'unique_key' determines which property to use when comparing if two of then are equal. <br><br> **WARNING:** An empty 'unique_key' means that every property of the dictionaries must be equal for them to be equal. | Determines if the elements of the array have to be unique. | Nothing.
16
+
| **set_uniqueness** | **uniqueness -> bool:** <br> Determines if every object of the array must be different from each other. <br> **unique_key -> String (""):** <br> If the array has dictionaries as its elements, 'unique_key' determines which property to use when comparing if two of then are equal. <br><br> **WARNING:** An empty 'unique_key' means that every property of the dictionaries must be the same for them to be equal. | Determines if the elements of the array have to be unique. | Nothing.
Copy file name to clipboardExpand all lines: doc/files/JSON-PROPERTY-BOOL.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,8 @@ Returned error:
48
48
{
49
49
"error": JSONProperty.Errors.WRONG_TYPE,
50
50
"expected": JSONProperty.Types.BOOL,
51
-
"context": "bool"
51
+
"context": "bool",
52
+
"as_text": "Wrong type: expected 'boolean', at 'bool'."
52
53
}
53
54
]
54
55
```
@@ -66,6 +67,6 @@ The public methods of this class are:
66
67
67
68
This class could directly raise any of the following errors:
68
69
69
-
| Enum value | Description | Params |
70
-
|-|-|-|
71
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [BOOL](./ENUMS.md).
70
+
| Enum value | Description | Params | As text |
71
+
|-|-|-|-|
72
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [BOOL](./ENUMS.md).| Wrong type: expected 'boolean' |
Copy file name to clipboardExpand all lines: doc/files/JSON-PROPERTY-COLOR.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,8 @@ Returned error:
58
58
{
59
59
"error": JSONProperty.Errors.WRONG_TYPE,
60
60
"expected": JSONProperty.Types.COLOR,
61
-
"context": "color"
61
+
"context": "color",
62
+
"as_text": "Wrong type: expected 'color', at 'color'."
62
63
}
63
64
]
64
65
```
@@ -80,7 +81,8 @@ Returned error:
80
81
{
81
82
"error": JSONProperty.Errors.COLOR_WRONG_SIZE,
82
83
"size": 1,
83
-
"context": "color"
84
+
"context": "color",
85
+
"as_text": "The color is 1 element(s) long, when it should be 3 to 4, at 'color'."
84
86
}
85
87
]
86
88
```
@@ -101,7 +103,8 @@ Returned error:
101
103
[
102
104
{
103
105
"error": JSONProperty.Errors.COLOR_WRONG_TYPE,
104
-
"context": "color/[0]"
106
+
"context": "color/[0]",
107
+
"as_text": "Wrong type: expected 'integer' in the range [0, 255], at 'color/[0]'."
105
108
}
106
109
]
107
110
```
@@ -123,7 +126,8 @@ Returned error:
123
126
{
124
127
"error": JSONProperty.Errors.COLOR_OUT_OF_RANGE,
125
128
"value": 256,
126
-
"context": "color/[0]"
129
+
"context": "color/[0]",
130
+
"as_text": "256 is out of the range [0, 255], at 'color/[0]'."
127
131
}
128
132
]
129
133
```
@@ -141,9 +145,9 @@ The public methods of this class are:
141
145
142
146
This class could directly raise any of the following errors:
143
147
144
-
| Enum value | Description | Params |
145
-
|-|-|-|
146
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [COLOR](./ENUMS.md).
147
-
| COLOR_WRONG_SIZE | The size of the color array is not 3 or 4. | **size -> int:** <br> The input size.
148
-
| COLOR_WRONG_TYPE | The type of one of the color array elements is not an integer. | None.
149
-
| COLOR_OUT_OF_RANGE | The value of one of the color array elements is not in the range [0, 256]. | **value -> int:** <br> The input value.
148
+
| Enum value | Description | Params | As text |
149
+
|-|-|-|-|
150
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [COLOR](./ENUMS.md).| Wrong type: expected 'color' |
151
+
| COLOR_WRONG_SIZE | The size of the color array is not 3 or 4. |**size -> int:** <br> The input size.| The color is {size} element(s) long, when it should be 3 to 4 |
152
+
| COLOR_WRONG_TYPE | The type of one of the color array elements is not an integer. | None.| Wrong type: expected 'integer' in the range [0, 255]|
153
+
| COLOR_OUT_OF_RANGE | The value of one of the color array elements is not in the range [0, 256]. |**value -> int:** <br> The input value.| {value} is out of the range [0, 255]|
Copy file name to clipboardExpand all lines: doc/files/JSON-PROPERTY-ENUM.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,8 @@ Returned error:
57
57
{
58
58
"error": JSONProperty.Errors.WRONG_TYPE,
59
59
"expected": JSONProperty.Types.ENUM,
60
-
"context": "enum"
60
+
"context": "enum",
61
+
"as_text": "Wrong type: expected 'string', at 'enum'."
61
62
}
62
63
]
63
64
```
@@ -79,7 +80,8 @@ Returned error:
79
80
{
80
81
"error": JSONProperty.Errors.ENUM_NOT_VALID,
81
82
"value": "FOURTH",
82
-
"context": "enum"
83
+
"context": "enum",
84
+
"as_text": "'FOURTH' is not in the list of valid values, at 'enum'."
83
85
}
84
86
]
85
87
```
@@ -98,7 +100,7 @@ The public methods of this class are:
98
100
99
101
This class could directly raise any of the following errors:
100
102
101
-
| Enum value | Description | Params |
102
-
|-|-|-|
103
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [ENUM](./ENUMS.md).
104
-
| ENUM_NOT_VALID | The input is not present in the list of possible values. | **value -> String:** <br> The input value.
103
+
| Enum value | Description | Params | As text |
104
+
|-|-|-|-|
105
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [ENUM](./ENUMS.md).| Wrong type: expected 'string' |
106
+
| ENUM_NOT_VALID | The input is not present in the list of possible values. |**value -> String:** <br> The input value.| '{value}' is not in the list of valid values |
"as_text": "11 is more than the maximum allowed (10), at 'integer'."
107
110
}
108
111
]
109
112
```
@@ -125,9 +128,9 @@ The public methods of this class are:
125
128
126
129
This class could directly raise any of the following errors:
127
130
128
-
| Enum value | Description | Params |
129
-
|-|-|-|
130
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [INTEGER](./ENUMS.md).
131
-
| NUMBER_VALUE_LESS_THAN_MIN | The value of the input is less than the minimum. | **value -> int:** <br> The input value. <br> **min -> int:** <br> The minimum value allowed.
132
-
| NUMBER_VALUE_MORE_THAN_MAX | The value of the input is more than the maximum. | **value -> int:** <br> The input value. <br> **max -> int:** <br> The maximum value allowed.
131
+
| Enum value | Description | Params | As text |
132
+
|-|-|-|-|
133
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [INTEGER](./ENUMS.md).| Wrong type: expected 'integer' |
134
+
| NUMBER_VALUE_LESS_THAN_MIN | The value of the input is less than the minimum. |**value -> int:** <br> The input value. <br> **min -> int:** <br> The minimum value allowed.| {value} is less than the minimum allowed ({min}) |
135
+
| NUMBER_VALUE_MORE_THAN_MAX | The value of the input is more than the maximum. |**value -> int:** <br> The input value. <br> **max -> int:** <br> The maximum value allowed.| {value} is more than the maximum allowed ({max}) |
"as_text": "10.100 is more than the maximum allowed (10.000), at 'number'."
107
110
}
108
111
]
109
112
```
@@ -125,8 +128,8 @@ The public methods of this class are:
125
128
126
129
This class could directly raise any of the following errors:
127
130
128
-
| Enum value | Description | Params |
129
-
|-|-|-|
130
-
| WRONG_TYPE | The type of the input does not match the expected one. | **expected -> int:** <br> Takes the value [NUMBER](./ENUMS.md).
131
-
| NUMBER_VALUE_LESS_THAN_MIN | The value of the input is less than the minimum. | **value -> float:** <br> The input value. <br> **min -> float:** <br> The minimum value allowed.
132
-
| NUMBER_VALUE_MORE_THAN_MAX | The value of the input is more than the maximum. | **value -> float:** <br> The input value. <br> **max -> float:** <br> The maximum value allowed.
131
+
| Enum value | Description | Params | As text |
132
+
|-|-|-|-|
133
+
| WRONG_TYPE | The type of the input does not match the expected one. |**expected -> int:** <br> Takes the value [NUMBER](./ENUMS.md).| Wrong type: expected 'number' |
134
+
| NUMBER_VALUE_LESS_THAN_MIN | The value of the input is less than the minimum. |**value -> float:** <br> The input value. <br> **min -> float:** <br> The minimum value allowed.| {value} is less than the minimum allowed ({min}) |
135
+
| NUMBER_VALUE_MORE_THAN_MAX | The value of the input is more than the maximum. |**value -> float:** <br> The input value. <br> **max -> float:** <br> The maximum value allowed.| {value} is more than the maximum allowed ({max}) |
0 commit comments