diff --git a/packages/backend-common/config-schema.json b/packages/backend-common/config-schema.json new file mode 100644 index 0000000000..2012447a11 --- /dev/null +++ b/packages/backend-common/config-schema.json @@ -0,0 +1,80 @@ +{ + "$schema": "https://backstage.io/schema/config-v1", + "title": "@backstage/backend-common", + "type": "object", + "properties": { + "integrations": { + "type": "object", + "additionalProperties": false, + "properties": { + "github": { + "type": "array", + "items": { + "type": "object", + "required": ["host"], + "properties": { + "host": { + "type": "string" + }, + "token": { + "type": "string", + "visibility": "secret" + } + } + } + }, + "gitlab": { + "type": "array", + "items": { + "type": "object", + "required": ["host"], + "properties": { + "host": { + "type": "string" + }, + "token": { + "type": "string", + "visibility": "secret" + } + } + } + }, + "bitbucket": { + "type": "array", + "items": { + "type": "object", + "required": ["host"], + "properties": { + "host": { + "type": "string" + }, + "username": { + "type": "string" + }, + "appPassword": { + "type": "string", + "visibility": "secret" + } + } + } + }, + "azure": { + "type": "array", + "items": { + "type": "object", + "required": ["host"], + "properties": { + "host": { + "type": "string" + }, + "token": { + "type": "string", + "visibility": "secret" + } + } + } + } + } + } + } +} diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index ea84d1a383..2f58bd0536 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -90,5 +90,6 @@ }, "files": [ "dist" - ] + ], + "configSchema": "config-schema.json" } diff --git a/packages/core/package.json b/packages/core/package.json index 848f0847bd..3d4b53d35b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -80,5 +80,54 @@ }, "files": [ "dist" - ] + ], + "configSchema": { + "$schema": "https://backstage.io/schema/config-v1", + "title": "@backstage/core", + "type": "object", + "properties": { + "app": { + "type": "object", + "properties": { + "title": { + "type": "string", + "visibility": "frontend" + }, + "baseUrl": { + "type": "string", + "visibility": "frontend" + } + }, + "required": [ + "title", + "baseUrl" + ] + }, + "backend": { + "type": "object", + "properties": { + "baseUrl": { + "type": "string", + "visibility": "frontend" + } + }, + "required": [ + "baseUrl" + ] + }, + "organization": { + "type": "object", + "properties": { + "name": { + "type": "string", + "visibility": "frontend" + } + } + } + }, + "required": [ + "app", + "backend" + ] + } } diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index af3d056b28..2bc00f56a2 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -66,5 +66,38 @@ "files": [ "dist", "migrations" - ] + ], + "configSchema": { + "$schema": "https://backstage.io/schema/config-v1", + "title": "@backstage/plugin-auth-backend", + "type": "object", + "properties": { + "auth": { + "type": "object", + "properties": { + "providers": { + "type": "object", + "properties": { + "google": { + "type": "object", + "visibility": "frontend", + "additionalProperties": { + "type": "object", + "properties": { + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string", + "visibility": "secret" + } + } + } + } + } + } + } + } + } + } }