Merge pull request #25537 from adamdmharvey/ah-api-docs

chore: Improve API Reference documentation
This commit is contained in:
Patrik Oldsberg
2024-07-16 11:04:21 +02:00
committed by GitHub
6 changed files with 17 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-node': patch
---
Fix invalid cross-reference in API Reference docs
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-react': patch
---
Improve API Reference documentation
@@ -145,7 +145,7 @@ ApiReportGenerator.generateReviewFileContent =
if (!localName) {
// Sometimes the symbol name is suffixed with a number to disambiguate,
// e.g. "Props_14" instead of "Props" if there are multiple Props interfaces
// so we tyry to strip that suffix and look up the symbol again.
// so we try to strip that suffix and look up the symbol again.
const [, trimmedSymbolName] = symbolName.match(/(.*)_\d+/) || [];
localName = (sourceFile as any).identifiers?.get(trimmedSymbolName);
}
+1 -1
View File
@@ -23,7 +23,7 @@ import { NoInfer } from './integration/util';
/**
* A conditional rule that can be provided in an
* {@link @backstage/permission-common#AuthorizeDecision} response to an authorization request.
* {@link @backstage/plugin-permission-common#AuthorizeDecision} response to an authorization request.
*
* @remarks
*
-2
View File
@@ -100,6 +100,4 @@ export function usePermission(
resourceRef: string | undefined;
},
): AsyncPermissionResult;
// (No @packageDocumentation comment for this package)
```
+5
View File
@@ -14,6 +14,11 @@
* limitations under the License.
*/
/**
* Components and hooks to help implement permissions in Backstage frontend plugins.
*
* @packageDocumentation
*/
export * from './components';
export * from './hooks';
export * from './apis';