From e04ed79f33f7c181de39e29552aef29b22ff7473 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 7 Jun 2023 22:52:59 -0400 Subject: [PATCH] Add backend api doc Signed-off-by: josh --- plugins/nomad-backend/api-report.md | 22 +++++++++++++++++++++ plugins/nomad-backend/src/service/router.ts | 2 ++ plugins/nomad/README.md | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 plugins/nomad-backend/api-report.md diff --git a/plugins/nomad-backend/api-report.md b/plugins/nomad-backend/api-report.md new file mode 100644 index 0000000000..5b56661e43 --- /dev/null +++ b/plugins/nomad-backend/api-report.md @@ -0,0 +1,22 @@ +## API Report File for "@backstage/plugin-nomad-backend" + +> 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 } from 'winston'; + +// @public (undocumented) +export function createRouter(options: RouterOptions): Promise; + +// @public (undocumented) +export interface RouterOptions { + // (undocumented) + config: Config; + // (undocumented) + logger: Logger; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/plugins/nomad-backend/src/service/router.ts b/plugins/nomad-backend/src/service/router.ts index 7c462d811e..a1b820866c 100644 --- a/plugins/nomad-backend/src/service/router.ts +++ b/plugins/nomad-backend/src/service/router.ts @@ -20,11 +20,13 @@ import express from 'express'; import Router from 'express-promise-router'; import { Logger } from 'winston'; +/** @public */ export interface RouterOptions { logger: Logger; config: Config; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/nomad/README.md b/plugins/nomad/README.md index aa93b57f07..1a38cc299a 100644 --- a/plugins/nomad/README.md +++ b/plugins/nomad/README.md @@ -41,7 +41,7 @@ Add configuration to your [`app-config.yaml`](https://github.com/backstage/backs ```yaml nomad: addr: 'http://localhost:4646' - token: '70d707b6-3d45-472e-8639-6b15770c19b8' + token: '93e034ad-e504-42f9-129d-5d81be9f13d3' ``` The `token` can be excluded if [ACLs are not enabled](https://developer.hashicorp.com/nomad/api-docs#authentication).