Address comments and suggestions

- Added documentation for api-report.md
- Reverted the change to ADOPTERS.md

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2022-02-08 11:23:10 +00:00
parent c16a3a60a0
commit 7dc3a7d32a
5 changed files with 62 additions and 22 deletions
+3 -2
View File
@@ -193,8 +193,6 @@ integrations:
- host: amazonaws.com
accessKeyId: ${AWS_ACCESS_KEY_ID}
secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
airbrake:
apiKey: ${AIRBRAKE_API_KEY}
catalog:
import:
@@ -466,3 +464,6 @@ apacheAirflow:
gocd:
baseUrl: https://your.gocd.instance.com
airbrake:
apiKey: ${AIRBRAKE_API_KEY}
+10 -19
View File
@@ -3,33 +3,24 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Config } from '@backstage/config';
import express from 'express';
import { Logger as Logger_2 } from 'winston';
import { Options } from 'http-proxy-middleware/dist/types';
// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export type AirbrakeConfig = {
apiKey: string;
};
// @public
export function createRouter(options: RouterOptions): Promise<express.Router>;
// Warning: (ae-missing-release-tag) "generateAirbrakePathRewrite" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const generateAirbrakePathRewrite: (
options: RouterOptions,
) => Options['pathRewrite'];
// @public
export function extractAirbrakeConfig(config: Config): AirbrakeConfig;
// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
// @public
export interface RouterOptions {
// Warning: (ae-forgotten-export) The symbol "AirbrakeConfig" needs to be exported by the entry point index.d.ts
//
// (undocumented)
airbrakeConfig: AirbrakeConfig;
// (undocumented)
logger: Logger_2;
}
// (No @packageDocumentation comment for this package)
```
@@ -15,12 +15,27 @@
*/
import { Config } from '@backstage/config';
/**
* The Airbrake config object
*
* @public
*/
export type AirbrakeConfig = {
/**
* The API Key
*/
apiKey: string;
};
/**
* Extract the Airbrake config from a config object
*
* @public
*
* @param config - The config object to extract from
*/
export function extractAirbrakeConfig(config: Config): AirbrakeConfig {
return {
apiKey: config.getString('integrations.airbrake.apiKey'),
apiKey: config.getString('airbrake.apiKey'),
};
}
+7
View File
@@ -14,4 +14,11 @@
* limitations under the License.
*/
/**
* The Airbrake Backend plugin used by \@backstage/plugin-airbrake
*
* @packageDocumentation
*/
export * from './service/router';
export * from './config';
@@ -22,11 +22,30 @@ import { createProxyMiddleware } from 'http-proxy-middleware';
import { AirbrakeConfig } from '../config';
import { Options } from 'http-proxy-middleware/dist/types';
/**
* The router options that are needed when creating a router.
*
* @public
*/
export interface RouterOptions {
/**
* A logger object
*/
logger: Logger;
/**
* The Airbrake config obtained from {@link extractAirbrakeConfig}
*/
airbrakeConfig: AirbrakeConfig;
}
/**
* Mainly used internally to generate the path.
*
* @internal
*
* @param options - Router options
*/
export const generateAirbrakePathRewrite = (
options: RouterOptions,
): Options['pathRewrite'] => {
@@ -43,6 +62,13 @@ export const generateAirbrakePathRewrite = (
};
};
/**
* Create the Airbrake Router, used for making API calls to the Airbrake API.
*
* @public
*
* @param options - Router options
*/
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {