Fix review comment: don't use ConfigSchemaPackageEntry nor make it public.
Signed-off-by: David Festal <dfestal@redhat.com>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { ConfigSchemaPackageEntry } from '@backstage/config-loader';
|
||||
import express from 'express';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
|
||||
@@ -14,7 +14,9 @@ export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
additionalSchemas?: ConfigSchemaPackageEntry[];
|
||||
additionalSchemas?: {
|
||||
[context: string]: JsonObject;
|
||||
};
|
||||
appPackageName: string;
|
||||
// (undocumented)
|
||||
config: Config;
|
||||
|
||||
@@ -20,7 +20,6 @@ import { Logger } from 'winston';
|
||||
import { AppConfig, Config } from '@backstage/config';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { loadConfigSchema, readEnvConfig } from '@backstage/config-loader';
|
||||
import { ConfigSchemaPackageEntry } from '@backstage/config-loader';
|
||||
|
||||
type InjectOptions = {
|
||||
appConfigs: AppConfig[];
|
||||
@@ -75,7 +74,7 @@ type ReadOptions = {
|
||||
env: { [name: string]: string | undefined };
|
||||
appDistDir: string;
|
||||
config: Config;
|
||||
additionalSchemas?: ConfigSchemaPackageEntry[];
|
||||
additionalSchemas?: { [context: string]: JsonObject };
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
CACHE_CONTROL_NO_CACHE,
|
||||
CACHE_CONTROL_REVALIDATE_CACHE,
|
||||
} from '../lib/headers';
|
||||
import { ConfigSchemaPackageEntry } from '@backstage/config-loader';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
|
||||
// express uses mime v1 while we only have types for mime v2
|
||||
type Mime = { lookup(arg0: string): string };
|
||||
@@ -89,14 +89,14 @@ export interface RouterOptions {
|
||||
|
||||
/**
|
||||
*
|
||||
* Provides a list of additional config schemas, in addition to the serialized schemas
|
||||
* Provides a map of additional config schemas, in addition to the serialized schemas
|
||||
* generated during the application build.
|
||||
* This is useful when additional plugins are dynamically loaded in the application at start,
|
||||
* which were not part of the application build. This option allows feeding the corresponding
|
||||
* JSON schemas.
|
||||
*
|
||||
*/
|
||||
additionalSchemas?: ConfigSchemaPackageEntry[];
|
||||
additionalSchemas?: { [context: string]: JsonObject };
|
||||
}
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user