feat: 리소스 스키마 및 검증 스크립트 추가, 기존 스키마 파일 삭제

This commit is contained in:
2026-01-18 08:49:19 +00:00
parent 2f05e5a1e1
commit cbe960364d
7 changed files with 30 additions and 10 deletions
+186
View File
@@ -0,0 +1,186 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"cities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"level": {
"type": "number"
},
"region": {
"type": "number"
},
"position": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
},
"connections": {
"type": "array",
"items": {
"type": "number"
}
},
"max": {
"type": "object",
"properties": {
"population": {
"type": "number"
},
"agriculture": {
"type": "number"
},
"commerce": {
"type": "number"
},
"security": {
"type": "number"
},
"defence": {
"type": "number"
},
"wall": {
"type": "number"
}
},
"required": [
"population",
"agriculture",
"commerce",
"security",
"defence",
"wall"
],
"additionalProperties": false
},
"initial": {
"type": "object",
"properties": {
"population": {
"type": "number"
},
"agriculture": {
"type": "number"
},
"commerce": {
"type": "number"
},
"security": {
"type": "number"
},
"defence": {
"type": "number"
},
"wall": {
"type": "number"
}
},
"required": [
"population",
"agriculture",
"commerce",
"security",
"defence",
"wall"
],
"additionalProperties": false
},
"meta": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"id",
"name",
"level",
"region",
"position",
"connections",
"max",
"initial"
],
"additionalProperties": false
}
},
"defaults": {
"type": "object",
"properties": {
"trust": {
"type": "number"
},
"trade": {
"type": "number"
},
"supplyState": {
"type": "number"
},
"frontState": {
"type": "number"
}
},
"additionalProperties": false
},
"meta": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"id",
"name",
"cities"
],
"additionalProperties": false
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
}
]
}
+151
View File
@@ -0,0 +1,151 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"type": "object",
"properties": {
"stat": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"npcTotal": {
"type": "number"
},
"npcMax": {
"type": "number"
},
"npcMin": {
"type": "number"
},
"chiefMin": {
"type": "number"
}
},
"additionalProperties": false
},
"iconPath": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"startYear": {
"type": "number"
},
"life": {
"type": "number"
},
"fiction": {
"type": "number"
},
"history": {
"type": "array",
"items": {
"type": "string"
}
},
"iconPath": {
"type": "string"
},
"stat": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"npcTotal": {
"type": "number"
},
"npcMax": {
"type": "number"
},
"npcMin": {
"type": "number"
},
"chiefMin": {
"type": "number"
}
},
"additionalProperties": false
},
"map": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"const": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"nation": {
"type": "array",
"items": {}
},
"diplomacy": {
"type": "array",
"items": {}
},
"general": {
"type": "array",
"items": {}
},
"general_ex": {
"type": "array",
"items": {}
},
"general_neutral": {
"type": "array",
"items": {}
},
"cities": {
"type": "array",
"items": {}
},
"events": {
"type": "array",
"items": {}
},
"initialEvents": {
"type": "array",
"items": {}
},
"initialActions": {
"type": "array",
"items": {}
},
"ignoreDefaultEvents": {
"type": "boolean"
}
},
"required": [
"title"
],
"additionalProperties": {}
}
]
}
+23
View File
@@ -0,0 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"general": {
"type": "array",
"items": {
"type": "string"
}
},
"nation": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"general",
"nation"
],
"additionalProperties": false
}
+386
View File
@@ -0,0 +1,386 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"defaultCrewTypeId": {
"type": "number"
},
"armTypes": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"crewTypes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"armType": {
"type": "number"
},
"name": {
"type": "string"
},
"attack": {
"type": "number"
},
"defence": {
"type": "number"
},
"speed": {
"type": "number"
},
"avoid": {
"type": "number"
},
"magicCoef": {
"type": "number"
},
"cost": {
"type": "number"
},
"rice": {
"type": "number"
},
"requirements": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqTech"
},
"tech": {
"type": "number"
}
},
"required": [
"type",
"tech"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqRegions"
},
"regions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"regions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqCities"
},
"cities": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"cities"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqCitiesWithCityLevel"
},
"level": {
"type": "number"
},
"cities": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"level",
"cities"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqHighLevelCities"
},
"level": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"type",
"level",
"count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqNationAux"
},
"key": {
"type": "string"
},
"op": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
}
},
"required": [
"type",
"key",
"op",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqMinRelYear"
},
"year": {
"type": "number"
}
},
"required": [
"type",
"year"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqChief"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ReqNotChief"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Impossible"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": {}
}
]
}
},
"attackCoef": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
{
"type": "array",
"items": {
"type": "number"
}
}
]
},
"defenceCoef": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
},
{
"type": "array",
"items": {
"type": "number"
}
}
]
},
"info": {
"type": "array",
"items": {
"type": "string"
}
},
"initSkillTrigger": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"phaseSkillTrigger": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"iActionList": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"armType",
"name",
"attack",
"defence",
"speed",
"avoid",
"magicCoef",
"cost",
"rice",
"requirements",
"attackCoef",
"defenceCoef",
"info",
"initSkillTrigger",
"phaseSkillTrigger",
"iActionList"
],
"additionalProperties": false
}
},
"meta": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
}