Skip to content

Commit

Permalink
extend schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeppner-dataport committed Jan 20, 2025
1 parent 967177b commit 5c85ab9
Showing 1 changed file with 111 additions and 20 deletions.
131 changes: 111 additions & 20 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
},
"NODE_ENV": {
"type": "string",
"enum": ["development", "test", "production", "migration"],
"enum": [
"development",
"test",
"production",
"migration"
],
"default": "production"
},
"REQUEST_OPTION": {
Expand Down Expand Up @@ -72,7 +77,10 @@
"DEFAULT_LANGUAGE": {
"type": "string",
"default": "de",
"enum": ["de", "en"],
"enum": [
"de",
"en"
],
"description": "Value for the default language"
},
"DEFAULT_TIMEZONE": {
Expand Down Expand Up @@ -100,13 +108,23 @@
"TEACHER_VISIBILITY_FOR_EXTERNAL_TEAM_INVITATION": {
"type": "string",
"default": "disabled",
"enum": ["disabled", "opt-in", "opt-out", "enabled"],
"enum": [
"disabled",
"opt-in",
"opt-out",
"enabled"
],
"description": "defines wheter external team invitation shows teachers from different schools or not. if enabled system wide there are options general enabled or opt-in/-out by user required."
},
"STUDENT_TEAM_CREATION": {
"type": "string",
"default": "opt-out",
"enum": ["disabled", "opt-in", "opt-out", "enabled"],
"enum": [
"disabled",
"opt-in",
"opt-out",
"enabled"
],
"description": "defines wheter students may create teams or not. if enabled system wide there are options general enabled or opt-in/-out by school admin required."
},
"REDIS_URI": {
Expand Down Expand Up @@ -282,7 +300,13 @@
"FILES_STORAGE": {
"type": "object",
"description": "Files storage server properties, required always to be defined",
"required": ["S3_ENDPOINT", "S3_REGION", "S3_BUCKET", "S3_ACCESS_KEY_ID", "S3_SECRET_ACCESS_KEY"],
"required": [
"S3_ENDPOINT",
"S3_REGION",
"S3_BUCKET",
"S3_ACCESS_KEY_ID",
"S3_SECRET_ACCESS_KEY"
],
"properties": {
"SERVICE_BASE_URL": {
"type": "string",
Expand Down Expand Up @@ -339,7 +363,13 @@
"FWU_CONTENT": {
"type": "object",
"description": "Properties of the S3 storage containing FWU content",
"required": ["S3_ENDPOINT", "S3_REGION", "S3_BUCKET", "S3_ACCESS_KEY", "S3_SECRET_KEY"],
"required": [
"S3_ENDPOINT",
"S3_REGION",
"S3_BUCKET",
"S3_ACCESS_KEY",
"S3_SECRET_KEY"
],
"properties": {
"S3_ENDPOINT": {
"type": "string",
Expand Down Expand Up @@ -378,7 +408,12 @@
"H5P_EDITOR": {
"type": "object",
"description": "Properties of the H5P server microservice and library management job",
"required": ["S3_ENDPOINT", "S3_REGION", "S3_BUCKET_CONTENT", "S3_BUCKET_LIBRARIES"],
"required": [
"S3_ENDPOINT",
"S3_REGION",
"S3_BUCKET_CONTENT",
"S3_BUCKET_LIBRARIES"
],
"default": {},
"properties": {
"S3_ENDPOINT": {
Expand Down Expand Up @@ -438,7 +473,12 @@
"H5P_Library": {
"type": "object",
"description": "Properties of the H5P server microservice",
"required": ["S3_ENDPOINT", "S3_BUCKET_LIBRARIES", "S3_ACCESS_KEY_ID", "S3_SECRET_ACCESS_KEY"],
"required": [
"S3_ENDPOINT",
"S3_BUCKET_LIBRARIES",
"S3_ACCESS_KEY_ID",
"S3_SECRET_ACCESS_KEY"
],
"default": {},
"properties": {
"S3_ENDPOINT": {
Expand Down Expand Up @@ -872,7 +912,9 @@
"ETHERPAD": {
"type": "object",
"description": "Etherpad settings",
"required": ["PAD_URI"],
"required": [
"PAD_URI"
],
"properties": {
"URI": {
"type": "string",
Expand Down Expand Up @@ -1030,7 +1072,9 @@
"API_VALIDATION_WHITELIST_EXTENSION": {
"type": "string",
"description": "when set, this is interpreted as a regex to extend the ignorelist for the API validation with any routes matching the regex.",
"examples": [".*/courses/[0-9a-f]{24}($|/$)"]
"examples": [
".*/courses/[0-9a-f]{24}($|/$)"
]
},
"FEATURE_PROMETHEUS_METRICS_ENABLED": {
"type": "boolean",
Expand Down Expand Up @@ -1105,13 +1149,31 @@
"type": "string",
"default": "error",
"description": "Log level for api.",
"enum": ["emerg", "alert", "crit", "error", "warning", "notice", "info", "debug"]
"enum": [
"emerg",
"alert",
"crit",
"error",
"warning",
"notice",
"info",
"debug"
]
},
"NEST_LOG_LEVEL": {
"type": "string",
"default": "notice",
"description": "Nest Log level for api. The http flag is for request logging. The http flag do only work by api methods with added 'request logging interceptor'.",
"enum": ["emerg", "alert", "crit", "error", "warning", "notice", "info", "debug"]
"enum": [
"emerg",
"alert",
"crit",
"error",
"warning",
"notice",
"info",
"debug"
]
},
"EXIT_ON_ERROR": {
"type": "boolean",
Expand All @@ -1122,7 +1184,12 @@
"type": "string",
"default": "requestError",
"description": "Special logs.",
"enum": ["requestError", "systemLogs", "request", "sendRequests"]
"enum": [
"requestError",
"systemLogs",
"request",
"sendRequests"
]
},
"SYNC_QUEUE_NAME": {
"type": "string",
Expand All @@ -1149,6 +1216,11 @@
"default": false,
"description": "Enabled that every request is logged with the information route and method"
},
"SC_CONTACT_EMAIL": {
"type": "string",
"default": "[email protected]",
"description": "Email address used for contacting"
},
"SUPPORT_PROBLEM_EMAIL_ADDRESS": {
"type": "string",
"default": "[email protected]",
Expand Down Expand Up @@ -1314,7 +1386,11 @@
"SAME_SITE": {
"type": "string",
"default": "none",
"enum": ["none", "lax", "strict"],
"enum": [
"none",
"lax",
"strict"
],
"description": "Value for cookies sameSite property. When SECURE flag is false, 'None' is not allowed in SAME_SITE and Lax should be used as default instead"
},
"HTTP_ONLY": {
Expand All @@ -1338,7 +1414,13 @@
"description": "Expiration in seconds from now"
}
},
"required": ["SAME_SITE", "HTTP_ONLY", "HOST_ONLY", "SECURE", "EXPIRES_SECONDS"],
"required": [
"SAME_SITE",
"HTTP_ONLY",
"HOST_ONLY",
"SECURE",
"EXPIRES_SECONDS"
],
"allOf": [
{
"$ref": "#/properties/COOKIE/definitions/SAME_SITE_SECURE_VALID"
Expand All @@ -1356,7 +1438,10 @@
"then": {
"properties": {
"SAME_SITE": {
"enum": ["lax", "strict"]
"enum": [
"lax",
"strict"
]
}
}
}
Expand Down Expand Up @@ -1564,12 +1649,16 @@
"API_URL": {
"type": "string",
"description": "Base URL of the schulconnex API (from dof)",
"examples": ["https://api-dienste.stage.niedersachsen-login.schule/v1/"]
"examples": [
"https://api-dienste.stage.niedersachsen-login.schule/v1/"
]
},
"TOKEN_ENDPOINT": {
"type": "string",
"description": "Token endpoint of the schulconnex API (from dof)",
"examples": ["https://api-dienste.stage.niedersachsen-login.schule/v1/oauth2/token"]
"examples": [
"https://api-dienste.stage.niedersachsen-login.schule/v1/oauth2/token"
]
},
"CLIENT_ID": {
"type": "string",
Expand Down Expand Up @@ -1645,7 +1734,9 @@
"type": "string",
"default": "",
"description": "URL for fetching policies info from moin.schule schulconnex",
"examples": ["https://api-dienste.stage.niedersachsen-login.schule/v1/policies-info"]
"examples": [
"https://api-dienste.stage.niedersachsen-login.schule/v1/policies-info"
]
},
"PROVISIONING_SCHULCONNEX_GROUP_USERS_LIMIT": {
"type": "number",
Expand Down Expand Up @@ -1693,4 +1784,4 @@
}
},
"required": []
}
}

0 comments on commit 5c85ab9

Please sign in to comment.