@@ -15,5 +15,5 @@
|
||||
*/
|
||||
|
||||
export { configSchemaApiRef } from './types';
|
||||
export type { ConfigSchemaApi } from './types';
|
||||
export type { ConfigSchemaApi, ConfigSchemaResult } from './types';
|
||||
export { StaticSchemaLoader } from './StaticSchemaLoader';
|
||||
|
||||
@@ -18,14 +18,17 @@ import { Schema } from 'jsonschema';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { Observable } from '@backstage/types';
|
||||
|
||||
/** @public */
|
||||
export interface ConfigSchemaResult {
|
||||
schema?: Schema;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface ConfigSchemaApi {
|
||||
schema$(): Observable<ConfigSchemaResult>;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export const configSchemaApiRef = createApiRef<ConfigSchemaApi>({
|
||||
id: 'plugin.config-schema',
|
||||
});
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
/** @public */
|
||||
export const configSchemaPlugin = createPlugin({
|
||||
id: 'config-schema',
|
||||
routes: {
|
||||
@@ -27,6 +28,7 @@ export const configSchemaPlugin = createPlugin({
|
||||
},
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const ConfigSchemaPage = configSchemaPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'ConfigSchemaPage',
|
||||
|
||||
Reference in New Issue
Block a user