catalog-backend-module-backstage-openapi: move over and tweak config schema
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -34,10 +34,8 @@
|
||||
"supertest": "^6.1.3"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"config.d.ts"
|
||||
"dist"
|
||||
],
|
||||
"configSchema": "config.d.ts",
|
||||
"dependencies": {
|
||||
"@backstage/backend-plugin-api": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
|
||||
+13
-5
@@ -13,11 +13,19 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface Config {
|
||||
openapi?: {
|
||||
/**
|
||||
* A list of plugins, whose OpenAPI specs you want to collate in `InternalOpenApiDocumentationProvider`.
|
||||
*/
|
||||
plugins: string[];
|
||||
catalog?: {
|
||||
providers?: {
|
||||
/**
|
||||
* BackstageOpenApiEntityProvider configuration
|
||||
*/
|
||||
backstageOpenapi?: {
|
||||
/**
|
||||
* A list of plugins, whose OpenAPI specs you want to collate in `InternalOpenApiDocumentationProvider`.
|
||||
*/
|
||||
plugins: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -47,7 +47,9 @@
|
||||
"openapi3-ts": "^3.1.2",
|
||||
"supertest": "^6.2.4"
|
||||
},
|
||||
"configSchema": "config.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"config.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider {
|
||||
|
||||
async refresh(logger: LoggerService) {
|
||||
const pluginsToMerge = this.config.getStringArray(
|
||||
'catalog.providers.openapi.plugins',
|
||||
'catalog.providers.backstageOpenapi.plugins',
|
||||
);
|
||||
logger.info(`Loading specs from from ${pluginsToMerge}.`);
|
||||
const documentationEntity: ApiEntity = {
|
||||
|
||||
Reference in New Issue
Block a user