chore: mention entityClient as an additional option of createRouter

This commit is contained in:
Marvin9
2020-11-02 22:48:44 +05:30
parent 59166e5ec2
commit 2400364960
+11 -1
View File
@@ -3,4 +3,14 @@
'@backstage/plugin-scaffolder-backend': minor
---
Scaffolder's API `/v1/jobs` will accept `templateName` instead of `template` Entity.
`createRouter` of scaffolder backend will now require additional option as `entityClient` which could be generated by `CatalogEntityClient` in `plugin-scaffolder-backend` package. Here is example to generate `entityClient`.
```js
import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend';
import { SingleHostDiscovery } from '@backstage/backend-common';
const discovery = SingleHostDiscovery.fromConfig(config);
const entityClient = new CatalogEntityClient({ discovery });
```
- Scaffolder's API `/v1/jobs` will accept `templateName` instead of `template` Entity.