So a combination of things has happened:
- I am Icarus and thought I fixed it upon seeing the below error, but was wrong.
- There’s a weird discrepancy between the App Services schema validator and literally everything else??
The AS validator states no errors:
However, if I attempt to use Compass, with the same pasted schema mind you:
I genuinely don’t understand this stuff, I’ll post the updated schemas, test files, and errors but this is truly pain inducing at this point.
Updated Schema
{
"title": "userList",
"required": [
"_id",
"date",
"username",
"cheatData"
],
"properties": {
"_id": {
"bsonType": "string",
"title": "User ID",
"description": "Holds the Steam3 ID of an entered user. Is a primary key. Required."
},
"date": {
"bsonType": "date",
"title": "Addition Date",
"description": "Holds a MongoDB Date that represents the date and time that the data was added. Required."
},
"username": {
"bsonType": "string",
"title": "Username",
"description": "The current username of a given user, obtained via Steam API. Required."
},
"aliases": {
"bsonType": "array",
"title": "Aliases",
"description": "All past aliases of the user, obtained via Steam API.",
"items": {
"bsonType": "string"
}
},
"friends": {
"bsonType": "array",
"title": "Friends",
"description": "The current friends of the user, obtained via Steam API.",
"items": {
"bsonType": "string"
}
},
"cheatData": {
"bsonType": "object",
"title": "Cheat Data",
"description": "An object that contains what the user is logged as, reasons why if they're not innocent, and optional evidence links to prove they cheat. Required entries: flag, isBot.",
"required": [
"flag",
"isBot"
],
"properties": {
"flag": {
"bsonType": "string",
"title": "Flag",
"description": "What level of suspicion the user is at. Required."
},
"isBot": {
"bsonType": "bool",
"title": "Is Bot",
"description": "A simple boolean to say if the user is a bot. Required."
},
"infractions": {
"bsonType": "array",
"title": "Infractions",
"description": "All possible or confirmed infractions/cheats the user has demonstrated employing. Should only be filled out if the flag is suspicious or cheater.",
"items": {
"bsonType": "string"
}
},
"evidence": {
"bsonType": "array",
"title": "Evidence",
"description": "All evidence that is used to prove the user is a cheater. Not required, heavily encouraged.",
"items": {
"bsonType": "string"
}
}
}
},
"overrideName": {
"bsonType": "string",
"title": "Custom Name",
"description": "Overrides the username when displayed on any data visualizer or displayer. Should be used if a cheater changes their name often."
}
}
}
Updated Test File Numero Uno y Dos
File 1 (Currently In Database):
{
"_id": "[U:1:1341943403]",
"date": {
"$date": {
"$numberLong": "1685904702000"
}
},
"username": "OMEGATRONIC",
"aliases": [
"OMEGATRONIC"
],
"friends": [
"[U:1:1546566598]",
"[U:1:1545378816]"
],
"cheatData": {
"flag": "cheater",
"isBot": true,
"infractions": [
"cathook"
],
"evidence": [
"linkgoeshere"
]
},
"overrideName": "hello"
}
File 2:
{
"_id": "[U:1:3333333333]",
"date": {
"$date": {
"$numberLong": "1685904702001"
}
},
"username": "OMEGATRONIC",
"aliases": [
"OMEGATRONIC"
],
"friends": [
"[U:1:1111111111]",
"[U:1:2222222222]"
],
"cheatData": {
"flag": "cheater",
"isBot": true,
"infractions": [
"cathook"
],
"evidence": [
"linkgoeshere"
]
},
"overrideName": "hello"
}
Error
{
"failingDocumentId": "[U:1:3333333333]",
"details": {
"operatorName": "$and",
"clausesNotSatisfied": [
{
"index": {
"$numberInt": "0"
},
"details": {
"operatorName": "$eq",
"specifiedAs": {
"title": "userList"
},
"reason": "field was missing"
}
},
{
"index": {
"$numberInt": "1"
},
"details": {
"operatorName": "$eq",
"specifiedAs": {
"required": [
"_id",
"date",
"username",
"cheatData"
]
},
"reason": "field was missing"
}
},
{
"index": {
"$numberInt": "2"
},
"details": {
"operatorName": "$eq",
"specifiedAs": {
"properties": {
"_id": {
"bsonType": "string",
"title": "User ID",
"description": "Holds the Steam3 ID of an entered user. Is a primary key. Required."
},
"date": {
"bsonType": "date",
"title": "Addition Date",
"description": "Holds a MongoDB Date that represents the date and time that the data was added. Required."
},
"username": {
"bsonType": "string",
"title": "Username",
"description": "The current username of a given user, obtained via Steam API. Required."
},
"aliases": {
"bsonType": "array",
"title": "Aliases",
"description": "All past aliases of the user, obtained via Steam API.",
"items": {
"bsonType": "string"
}
},
"friends": {
"bsonType": "array",
"title": "Friends",
"description": "The current friends of the user, obtained via Steam API.",
"items": {
"bsonType": "string"
}
},
"cheatData": {
"bsonType": "object",
"title": "Cheat Data",
"description": "An object that contains what the user is logged as, reasons why if they're not innocent, and optional evidence links to prove they cheat. Required entries: flag, isBot.",
"required": [
"flag",
"isBot"
],
"properties": {
"flag": {
"bsonType": "string",
"title": "Flag",
"description": "What level of suspicion the user is at. Required."
},
"isBot": {
"bsonType": "bool",
"title": "Is Bot",
"description": "A simple boolean to say if the user is a bot. Required."
},
"infractions": {
"bsonType": "array",
"title": "Infractions",
"description": "All possible or confirmed infractions/cheats the user has demonstrated employing. Should only be filled out if the flag is suspicious or cheater.",
"items": {
"bsonType": "string"
}
},
"evidence": {
"bsonType": "array",
"title": "Evidence",
"description": "All evidence that is used to prove the user is a cheater. Not required, heavily encouraged.",
"items": {
"bsonType": "string"
}
}
}
},
"overrideName": {
"bsonType": "string",
"title": "Custom Name",
"description": "Overrides the username when displayed on any data visualizer or displayer. Should be used if a cheater changes their name often."
}
}
},
"reason": "field was missing"
}
}
]
}
}