From eaa053fb89ee399ec32d3c077264b689be8e1798 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 17:12:55 +0100 Subject: [PATCH 01/23] Add api-namespace layout --- src/layouts/api-namespace.hbs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/layouts/api-namespace.hbs diff --git a/src/layouts/api-namespace.hbs b/src/layouts/api-namespace.hbs new file mode 100644 index 00000000..3f341e3b --- /dev/null +++ b/src/layouts/api-namespace.hbs @@ -0,0 +1,16 @@ +--- +description: {{description}} +--- + +# {{title}} + +In the Seam platform and API, {{toNoCase title}} namespace consists of the following components: + +## Core Components + +{{#each resources}} +### {{add @index 1}}. {{toCapitalCase name}} +- **API Object:** `{{name}}` +- **Description:** {{description}} + +{{/each}} From 0e4639ada972dc69f76b5220835c794ed46fe050 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 17:13:13 +0100 Subject: [PATCH 02/23] Add handlebars helpers --- src/lib/handlebars-helpers.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/handlebars-helpers.ts b/src/lib/handlebars-helpers.ts index fed810cd..7491b36d 100644 --- a/src/lib/handlebars-helpers.ts +++ b/src/lib/handlebars-helpers.ts @@ -1,3 +1,5 @@ +import { capitalCase, noCase } from 'change-case' + export const eq = (v1: unknown, v2: unknown): boolean => { return v1 === v2 } @@ -8,3 +10,19 @@ export const or = (...args: unknown[]): boolean => { return args.some(Boolean) } + +export const add = (v1: number, v2: number): number => { + return v1 + v2 +} + +export const not = (value: boolean): boolean => { + return !value +} + +export const toNoCase = (str: string): string => { + return noCase(str) +} + +export const toCapitalCase = (str: string): string => { + return capitalCase(str) +} From 8d1294d1c4c09cb4e210ea809e4e9d76a6f0e491 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 17:14:09 +0100 Subject: [PATCH 03/23] Introduce setNamespaceLayoutContext --- src/data/paths.yaml | 10 ++++++ src/lib/layout/api-namespace.ts | 57 +++++++++++++++++++++++++++++++++ src/lib/layout/index.ts | 1 + src/lib/path-metadata.ts | 1 + src/lib/reference.ts | 3 ++ 5 files changed, 72 insertions(+) create mode 100644 src/lib/layout/api-namespace.ts diff --git a/src/data/paths.yaml b/src/data/paths.yaml index 3b710080..13fee7fc 100644 --- a/src/data/paths.yaml +++ b/src/data/paths.yaml @@ -1,4 +1,14 @@ --- +/acs: + title: Access Control Systems + description: Systems for managing and monitoring access to physical spaces + resources: + - acs_system + - acs_user + - acs_entrance + - acs_access_group + - acs_credential + /acs/systems: title: Systems resources: diff --git a/src/lib/layout/api-namespace.ts b/src/lib/layout/api-namespace.ts new file mode 100644 index 00000000..cfaa2211 --- /dev/null +++ b/src/lib/layout/api-namespace.ts @@ -0,0 +1,57 @@ +import type { Blueprint, Route } from '@seamapi/blueprint' +import type Metalsmith from 'metalsmith' + +import type { PathMetadata } from 'lib/path-metadata.js' + +export interface ApiNamespaceLayoutContext { + title: string + description: string + resources: Array<{ name: string; description: string }> +} + +type File = ApiNamespaceLayoutContext & { layout: string } + +export function setNamespaceLayoutContext( + files: Metalsmith.Files, + blueprint: Blueprint, + pathMetadata: PathMetadata, +): void { + const namespacePaths = getNamespacePaths(blueprint.routes) + + for (const path of namespacePaths) { + const namespaceMetadata = pathMetadata[path] + if (namespaceMetadata == null) continue + + const k = `api${path}/README.md` + files[k] = { + contents: Buffer.from('\n'), + } + const file = files[k] as unknown as File + file.layout = 'api-namespace.hbs' + + file.title = namespaceMetadata.title + file.description = namespaceMetadata.description ?? '' + file.resources = namespaceMetadata.resources.map((resourceName) => { + const resource = blueprint.resources[resourceName] + + if (resource == null) { + throw new Error(`Resource ${resourceName} not found in blueprint`) + } + + return { + name: resourceName, + description: resource.description, + } + }) + } +} + +function getNamespacePaths(routes: Route[]): string[] { + return Array.from( + new Set( + routes.flatMap((route) => + route.namespace != null ? [route.namespace.path] : [], + ), + ), + ) +} diff --git a/src/lib/layout/index.ts b/src/lib/layout/index.ts index a6401261..964d7e74 100644 --- a/src/lib/layout/index.ts +++ b/src/lib/layout/index.ts @@ -1,2 +1,3 @@ export * from './api-endpoint.js' +export * from './api-namespace.js' export * from './api-route.js' diff --git a/src/lib/path-metadata.ts b/src/lib/path-metadata.ts index dc2cfd8d..b03fa4ef 100644 --- a/src/lib/path-metadata.ts +++ b/src/lib/path-metadata.ts @@ -5,6 +5,7 @@ export const PathMetadataSchema = z.record( z.object({ title: z.string().trim().min(1), resources: z.array(z.string()).default([]), + description: z.string().trim().min(1).optional(), }), ) diff --git a/src/lib/reference.ts b/src/lib/reference.ts index 1e76b7f4..68ca20c2 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -6,6 +6,7 @@ import { type ApiRouteLayoutContext, setApiRouteLayoutContext, setEndpointLayoutContext, + setNamespaceLayoutContext, } from './layout/index.js' import { PathMetadataSchema } from './path-metadata.js' @@ -35,6 +36,8 @@ export const reference = ( ...metadata, } + setNamespaceLayoutContext(files, blueprint, pathMetadata) + for (const route of blueprint.routes ?? []) { if (route.isUndocumented) continue From f910c041c355be62a0674389fe31142b1f7eab25 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 17:15:52 +0100 Subject: [PATCH 04/23] Remove not helper --- src/lib/handlebars-helpers.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/handlebars-helpers.ts b/src/lib/handlebars-helpers.ts index 7491b36d..aab2bd0c 100644 --- a/src/lib/handlebars-helpers.ts +++ b/src/lib/handlebars-helpers.ts @@ -15,10 +15,6 @@ export const add = (v1: number, v2: number): number => { return v1 + v2 } -export const not = (value: boolean): boolean => { - return !value -} - export const toNoCase = (str: string): string => { return noCase(str) } From 3ab2b0c5de2549213179c6f2cc75cf516a0188c7 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 22 Nov 2024 16:20:06 +0000 Subject: [PATCH 05/23] ci: Generate docs --- docs/api/acs/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/api/acs/README.md diff --git a/docs/api/acs/README.md b/docs/api/acs/README.md new file mode 100644 index 00000000..8b72b6d5 --- /dev/null +++ b/docs/api/acs/README.md @@ -0,0 +1,32 @@ +--- +description: Systems for managing and monitoring access to physical spaces +--- + +# Access Control Systems + +In the Seam platform and API, access control systems namespace consists of the following components: + +## Core Components + +### 1. Acs System +- **API Object:** `acs_system` +- **Description:** Represents an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). + +### 2. Acs User +- **API Object:** `acs_user` +- **Description:** + +### 3. Acs Entrance +- **API Object:** `acs_entrance` +- **Description:** Represents an [entrance](../../capability-guides/access-systems/retrieving-entrance-details.md) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). + +### 4. Acs Access Group +- **API Object:** `acs_access_group` +- **Description:** Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. +The `acs_access_group` object represents an [access group](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). + +### 5. Acs Credential +- **API Object:** `acs_credential` +- **Description:** Means by which a user gains access at an entrance. +The `acs_credential` object represents a credential that provides an ACS user access within an access control system. For each acs_credential object, you define the access method. You can also specify additional properties, such as a code. + From 158cc2d6bb502698ee95a0298c6cb464653518ed Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 18:06:41 +0100 Subject: [PATCH 06/23] Compute namespace resources --- src/data/paths.yaml | 6 ------ src/lib/layout/api-namespace.ts | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/data/paths.yaml b/src/data/paths.yaml index 13fee7fc..189d9d43 100644 --- a/src/data/paths.yaml +++ b/src/data/paths.yaml @@ -2,12 +2,6 @@ /acs: title: Access Control Systems description: Systems for managing and monitoring access to physical spaces - resources: - - acs_system - - acs_user - - acs_entrance - - acs_access_group - - acs_credential /acs/systems: title: Systems diff --git a/src/lib/layout/api-namespace.ts b/src/lib/layout/api-namespace.ts index cfaa2211..0d5fdc06 100644 --- a/src/lib/layout/api-namespace.ts +++ b/src/lib/layout/api-namespace.ts @@ -31,7 +31,10 @@ export function setNamespaceLayoutContext( file.title = namespaceMetadata.title file.description = namespaceMetadata.description ?? '' - file.resources = namespaceMetadata.resources.map((resourceName) => { + const namespaceResources = Object.entries(pathMetadata) + .filter(([p]) => p.startsWith(path)) + .flatMap(([_, metadata]) => metadata.resources) + file.resources = namespaceResources.map((resourceName) => { const resource = blueprint.resources[resourceName] if (resource == null) { From 270a06d0b3a012aa071669e9a37d827b1065607d Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 18:08:30 +0100 Subject: [PATCH 07/23] Update template, remove toNoCase helper --- src/layouts/api-namespace.hbs | 2 -- src/lib/handlebars-helpers.ts | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/layouts/api-namespace.hbs b/src/layouts/api-namespace.hbs index 3f341e3b..22e8700f 100644 --- a/src/layouts/api-namespace.hbs +++ b/src/layouts/api-namespace.hbs @@ -4,8 +4,6 @@ description: {{description}} # {{title}} -In the Seam platform and API, {{toNoCase title}} namespace consists of the following components: - ## Core Components {{#each resources}} diff --git a/src/lib/handlebars-helpers.ts b/src/lib/handlebars-helpers.ts index aab2bd0c..fec12fa4 100644 --- a/src/lib/handlebars-helpers.ts +++ b/src/lib/handlebars-helpers.ts @@ -1,4 +1,4 @@ -import { capitalCase, noCase } from 'change-case' +import { capitalCase } from 'change-case' export const eq = (v1: unknown, v2: unknown): boolean => { return v1 === v2 @@ -15,10 +15,6 @@ export const add = (v1: number, v2: number): number => { return v1 + v2 } -export const toNoCase = (str: string): string => { - return noCase(str) -} - export const toCapitalCase = (str: string): string => { return capitalCase(str) } From 4036c16731d961eedf4d638eaa29c1e5446aa148 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 22 Nov 2024 17:12:47 +0000 Subject: [PATCH 08/23] ci: Generate docs --- docs/api/acs/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/api/acs/README.md b/docs/api/acs/README.md index 8b72b6d5..ab4e8d96 100644 --- a/docs/api/acs/README.md +++ b/docs/api/acs/README.md @@ -4,8 +4,6 @@ description: Systems for managing and monitoring access to physical spaces # Access Control Systems -In the Seam platform and API, access control systems namespace consists of the following components: - ## Core Components ### 1. Acs System From b318b39b0b2e206b8dcdf60d6f60cc37439c8ca1 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 18:22:56 +0100 Subject: [PATCH 09/23] Make setNamespaceLayoutContext to be responsible only for setting context --- src/lib/layout/api-namespace.ts | 66 ++++++++++++--------------------- src/lib/reference.ts | 31 ++++++++++++++-- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/src/lib/layout/api-namespace.ts b/src/lib/layout/api-namespace.ts index 0d5fdc06..abe56300 100644 --- a/src/lib/layout/api-namespace.ts +++ b/src/lib/layout/api-namespace.ts @@ -1,5 +1,4 @@ -import type { Blueprint, Route } from '@seamapi/blueprint' -import type Metalsmith from 'metalsmith' +import type { Blueprint } from '@seamapi/blueprint' import type { PathMetadata } from 'lib/path-metadata.js' @@ -9,52 +8,33 @@ export interface ApiNamespaceLayoutContext { resources: Array<{ name: string; description: string }> } -type File = ApiNamespaceLayoutContext & { layout: string } - export function setNamespaceLayoutContext( - files: Metalsmith.Files, - blueprint: Blueprint, + file: ApiNamespaceLayoutContext, + namespace: string, + resources: Blueprint['resources'], pathMetadata: PathMetadata, ): void { - const namespacePaths = getNamespacePaths(blueprint.routes) - - for (const path of namespacePaths) { - const namespaceMetadata = pathMetadata[path] - if (namespaceMetadata == null) continue - - const k = `api${path}/README.md` - files[k] = { - contents: Buffer.from('\n'), - } - const file = files[k] as unknown as File - file.layout = 'api-namespace.hbs' + const namespaceMetadata = pathMetadata[namespace] + if (namespaceMetadata == null) { + throw new Error(`Namespace metadata for ${namespace} not found`) + } - file.title = namespaceMetadata.title - file.description = namespaceMetadata.description ?? '' - const namespaceResources = Object.entries(pathMetadata) - .filter(([p]) => p.startsWith(path)) - .flatMap(([_, metadata]) => metadata.resources) - file.resources = namespaceResources.map((resourceName) => { - const resource = blueprint.resources[resourceName] + file.title = namespaceMetadata.title + file.description = namespaceMetadata.description ?? '' - if (resource == null) { - throw new Error(`Resource ${resourceName} not found in blueprint`) - } + const namespaceResources = Object.entries(pathMetadata) + .filter(([p]) => p.startsWith(namespace)) + .flatMap(([_, metadata]) => metadata.resources) + file.resources = namespaceResources.map((resourceName) => { + const resource = resources[resourceName] - return { - name: resourceName, - description: resource.description, - } - }) - } -} + if (resource == null) { + throw new Error(`Resource ${resourceName} not found in blueprint`) + } -function getNamespacePaths(routes: Route[]): string[] { - return Array.from( - new Set( - routes.flatMap((route) => - route.namespace != null ? [route.namespace.path] : [], - ), - ), - ) + return { + name: resourceName, + description: resource.description, + } + }) } diff --git a/src/lib/reference.ts b/src/lib/reference.ts index 68ca20c2..12c1955b 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -1,8 +1,9 @@ -import type { Blueprint } from '@seamapi/blueprint' +import type { Blueprint, Route } from '@seamapi/blueprint' import type Metalsmith from 'metalsmith' import { type ApiEndpointLayoutContext, + type ApiNamespaceLayoutContext, type ApiRouteLayoutContext, setApiRouteLayoutContext, setEndpointLayoutContext, @@ -15,7 +16,8 @@ const sdks: Array<'javascript'> = [] type Metadata = Partial> type File = ApiEndpointLayoutContext & - ApiRouteLayoutContext & { layout: string } + ApiRouteLayoutContext & + ApiNamespaceLayoutContext & { layout: string } export const reference = ( files: Metalsmith.Files, @@ -36,7 +38,20 @@ export const reference = ( ...metadata, } - setNamespaceLayoutContext(files, blueprint, pathMetadata) + const namespacePaths = getNamespacePaths(blueprint.routes) + for (const path of namespacePaths) { + const namespaceMetadata = pathMetadata[path] + if (namespaceMetadata == null) continue + + const k = `api${path}/README.md` + files[k] = { + contents: Buffer.from('\n'), + } + const file = files[k] as unknown as File + file.layout = 'api-namespace.hbs' + + setNamespaceLayoutContext(file, path, blueprint.resources, pathMetadata) + } for (const route of blueprint.routes ?? []) { if (route.isUndocumented) continue @@ -80,3 +95,13 @@ export const reference = ( } } } + +function getNamespacePaths(routes: Route[]): string[] { + return Array.from( + new Set( + routes.flatMap((route) => + route.namespace != null ? [route.namespace.path] : [], + ), + ), + ) +} From 578e853326be07eca292055c22a9da130c0bcef4 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Fri, 22 Nov 2024 18:38:12 +0100 Subject: [PATCH 10/23] Report untitled namespaces --- src/layouts/report.hbs | 12 ++++++++++++ src/lib/report.ts | 31 +++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/layouts/report.hbs b/src/layouts/report.hbs index 7a502881..640070c8 100644 --- a/src/layouts/report.hbs +++ b/src/layouts/report.hbs @@ -1,4 +1,16 @@ # Documentation Report +{{#if (or noTitle.namespaces.length )}} + +## Untitled +{{#if noTitle.namespaces.length }} + +### Namespaces + +{{#each noTitle.namespaces}} +- `{{name}}` +{{/each}} +{{/if}} +{{/if}} {{#if (or undocumented.routes.length undocumented.resources.length undocumented.resourceProperties.length undocumented.namespaces.length undocumented.endpoints.length undocumented.parameters.length)}} ## Undocumented diff --git a/src/lib/report.ts b/src/lib/report.ts index 5f03435e..4a11cd91 100644 --- a/src/lib/report.ts +++ b/src/lib/report.ts @@ -10,6 +10,8 @@ import type { import { openapi } from '@seamapi/types/connect' import type Metalsmith from 'metalsmith' +import { PathMetadataSchema } from './path-metadata.js' + const defaultDeprecatedMessage = 'No deprecated message provided' const defaultDraftMessage = 'No draft message provided' const defaultUndocumentedMessage = 'No undocumented message provided' @@ -21,6 +23,7 @@ interface Report { deprecated: ReportSection extraResponseKeys: MissingResponseKeyReport[] endpointsWithoutCodeSamples: string[] + noTitle: Pick } interface ReportSection { @@ -77,6 +80,9 @@ function generateReport(metadata: Metadata): Report { deprecated: createEmptyReportSection(), extraResponseKeys: [], endpointsWithoutCodeSamples: [], + noTitle: { + namespaces: [], + }, } const resources = metadata.resources ?? {} @@ -86,7 +92,7 @@ function generateReport(metadata: Metadata): Report { const routes = metadata.routes ?? [] for (const route of routes) { - processRoute(route, report) + processRoute(route, report, metadata) } return report @@ -171,7 +177,7 @@ function processProperty( } } -function processRoute(route: Route, report: Report): void { +function processRoute(route: Route, report: Report, metadata: Metadata): void { if (route.isUndocumented) { report.undocumented.routes.push({ name: route.path, @@ -193,6 +199,19 @@ function processRoute(route: Route, report: Report): void { }) } + const pathMetadata = + 'pathMetadata' in metadata + ? PathMetadataSchema.parse(metadata.pathMetadata) + : {} + const namespace = route.namespace + if ( + namespace != null && + pathMetadata[namespace.path]?.title == null && + !namespace.isUndocumented + ) { + addUntitledNamespaceToReport(namespace.path, report) + } + if (route.namespace != null) { processNamespace(route.namespace, report) } @@ -204,6 +223,14 @@ function processRoute(route: Route, report: Report): void { } } +const addUntitledNamespaceToReport = ( + namespace: string, + report: Report, +): void => { + if (report.noTitle.namespaces.some((n) => n.name === namespace)) return + report.noTitle.namespaces.push({ name: namespace }) +} + function processNamespace(namespace: Namespace, report: Report): void { const addNamespace = (section: ReportItem[], reason: string): void => { if (section.some((item) => item.name === namespace.path)) return From 1fc4f59eaa8fe808c6bfb4d2aea4b1248bbecb06 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <84702959+andrii-balitskyi@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:43:57 +0100 Subject: [PATCH 11/23] Update src/layouts/api-namespace.hbs Co-authored-by: DebbieAtSeam <145377258+DebbieAtSeam@users.noreply.github.com> --- src/layouts/api-namespace.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/api-namespace.hbs b/src/layouts/api-namespace.hbs index 22e8700f..3e6438fc 100644 --- a/src/layouts/api-namespace.hbs +++ b/src/layouts/api-namespace.hbs @@ -4,7 +4,7 @@ description: {{description}} # {{title}} -## Core Components +## Resources {{#each resources}} ### {{add @index 1}}. {{toCapitalCase name}} From bff636f27ef06fc623246e96e5c9eee51261cb71 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <84702959+andrii-balitskyi@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:44:22 +0100 Subject: [PATCH 12/23] Update src/layouts/api-namespace.hbs Co-authored-by: DebbieAtSeam <145377258+DebbieAtSeam@users.noreply.github.com> --- src/layouts/api-namespace.hbs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/layouts/api-namespace.hbs b/src/layouts/api-namespace.hbs index 3e6438fc..7954dc57 100644 --- a/src/layouts/api-namespace.hbs +++ b/src/layouts/api-namespace.hbs @@ -7,8 +7,7 @@ description: {{description}} ## Resources {{#each resources}} -### {{add @index 1}}. {{toCapitalCase name}} -- **API Object:** `{{name}}` -- **Description:** {{description}} +### `{{name}}` +{{description}} {{/each}} From f8140d47e15fb03d8f796d4b6a1908413eeedcee Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 22 Nov 2024 17:48:22 +0000 Subject: [PATCH 13/23] ci: Generate docs --- docs/api/acs/README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/api/acs/README.md b/docs/api/acs/README.md index ab4e8d96..9fef99a7 100644 --- a/docs/api/acs/README.md +++ b/docs/api/acs/README.md @@ -4,27 +4,22 @@ description: Systems for managing and monitoring access to physical spaces # Access Control Systems -## Core Components +## Resources -### 1. Acs System -- **API Object:** `acs_system` -- **Description:** Represents an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). +### `acs_system` +Represents an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### 2. Acs User -- **API Object:** `acs_user` -- **Description:** +### `acs_user` -### 3. Acs Entrance -- **API Object:** `acs_entrance` -- **Description:** Represents an [entrance](../../capability-guides/access-systems/retrieving-entrance-details.md) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### 4. Acs Access Group -- **API Object:** `acs_access_group` -- **Description:** Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. +### `acs_entrance` +Represents an [entrance](../../capability-guides/access-systems/retrieving-entrance-details.md) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). + +### `acs_access_group` +Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. The `acs_access_group` object represents an [access group](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### 5. Acs Credential -- **API Object:** `acs_credential` -- **Description:** Means by which a user gains access at an entrance. +### `acs_credential` +Means by which a user gains access at an entrance. The `acs_credential` object represents a credential that provides an ACS user access within an access control system. For each acs_credential object, you define the access method. You can also specify additional properties, such as a code. From 8cc189b2757930a5f7037495e3bf010cfdf305fa Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 22 Nov 2024 12:02:51 -0800 Subject: [PATCH 14/23] Update paths.yaml --- src/data/paths.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/paths.yaml b/src/data/paths.yaml index 189d9d43..43446d2d 100644 --- a/src/data/paths.yaml +++ b/src/data/paths.yaml @@ -9,7 +9,7 @@ - acs_system /acs/users: - title: Users + title: ACS Users resources: - acs_user From 9fadb1eb7b23b597c3390d4153f622eac4e75f46 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Fri, 22 Nov 2024 20:06:03 +0000 Subject: [PATCH 15/23] ci: Generate docs --- docs/api/acs/users/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/acs/users/README.md b/docs/api/acs/users/README.md index 8f656ec0..69c22336 100644 --- a/docs/api/acs/users/README.md +++ b/docs/api/acs/users/README.md @@ -1,4 +1,4 @@ -# Users +# ACS Users ## `acs_user` From 76aece04c25ff9bd787582af6f3adde86f9085b0 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 25 Nov 2024 11:29:32 +0000 Subject: [PATCH 16/23] ci: Generate docs --- docs/api/_report.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/api/_report.md b/docs/api/_report.md index 5dd03f4e..0abc218b 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -59,7 +59,6 @@ - `/connected_accounts/get` - `/connected_accounts/list` - `/connected_accounts/update` -- `/devices/delete` - `/devices/get` - `/devices/list_device_providers` - `/devices/update` From f5921a5c55adaf9ae413bcf3f7027c65967821e4 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Mon, 25 Nov 2024 12:58:17 +0100 Subject: [PATCH 17/23] Replace api-clients/acs links with api/acs --- .gitbook.yaml | 68 ++++++++++++++++++++++++------------------------- docs/SUMMARY.md | 2 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.gitbook.yaml b/.gitbook.yaml index 16bc2421..9daa9765 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -44,40 +44,40 @@ redirects: api-clients/access-codes/pull-backup-access-code: api-clients/access_codes/pull_backup_access_code.md api-clients/access-codes/update-an-access-code: api-clients/access_codes/update.md api-clients/access-codes: api-clients/access_codes/README.md - api-clients/access-control-systems/access-groups/add-user-to-access-group: api-clients/acs/access_groups/add_user.md - api-clients/access-control-systems/access-groups/get-access-group: api-clients/acs/access_groups/get.md - api-clients/access-control-systems/access-groups/list-access-groups: api-clients/acs/access_groups/list.md - api-clients/access-control-systems/access-groups/list-users-in-access-group: api-clients/acs/access_groups/list_users.md - api-clients/access-control-systems/access-groups/remove-user-from-access-group: api-clients/acs/access_groups/remove_user.md - api-clients/access-control-systems/access-groups: api-clients/acs/access_groups/README.md - api-clients/access-control-systems/credentials/assign-a-credential-to-a-user: api-clients/acs/credentials/assign.md - api-clients/access-control-systems/credentials/create-credential-for-user: api-clients/acs/credentials/create.md - api-clients/access-control-systems/credentials/delete-credential: api-clients/acs/credentials/delete.md - api-clients/access-control-systems/credentials/get-credential: api-clients/acs/credentials/get.md - api-clients/access-control-systems/credentials/list-accessible-entrances: api-clients/acs/credentials/list_accessible_entrances.md - api-clients/access-control-systems/credentials/list-credentials: api-clients/acs/credentials/list.md - api-clients/access-control-systems/credentials/unassign-a-credential-from-a-user: api-clients/acs/credentials/unassign.md - api-clients/access-control-systems/credentials/update-a-credential: api-clients/acs/credentials/update.md - api-clients/access-control-systems/credentials: api-clients/acs/credentials/README.md - api-clients/access-control-systems/entrances/get-an-entrance: api-clients/acs/entrances/get.md - api-clients/access-control-systems/entrances/list-credentials-with-access-to-an-entrance: api-clients/acs/entrances/list_credentials_with_access.md - api-clients/access-control-systems/entrances/list-entrances: api-clients/acs/entrances/list.md - api-clients/access-control-systems/entrances: api-clients/acs/entrances/README.md - api-clients/access-control-systems/systems/get-system: api-clients/acs/systems/get.md - api-clients/access-control-systems/systems/list-compatible-credential-manager-acs-systems: api-clients/acs/systems/list_compatible_credential_manager_acs_systems.md - api-clients/access-control-systems/systems/list-systems: api-clients/acs/systems/list.md - api-clients/access-control-systems/systems: api-clients/acs/systems/README.md - api-clients/access-control-systems/users/add-user-to-access-group: api-clients/acs/users/add_to_access_group.md - api-clients/access-control-systems/users/create-user: api-clients/acs/users/create.md - api-clients/access-control-systems/users/delete-user: api-clients/acs/users/delete.md - api-clients/access-control-systems/users/get-user: api-clients/acs/users/get.md - api-clients/access-control-systems/users/list-users: api-clients/acs/users/list.md - api-clients/access-control-systems/users/remove-user-from-access-group: api-clients/acs/users/remove_from_access_group.md - api-clients/access-control-systems/users/suspend-a-user: api-clients/acs/users/suspend.md - api-clients/access-control-systems/users/unsuspend-a-user: api-clients/acs/users/unsuspend.md - api-clients/access-control-systems/users/update-user: api-clients/acs/users/update.md - api-clients/access-control-systems/users: api-clients/acs/users/README.md - api-clients/access-control-systems: api-clients/acs/README.md + api-clients/access-control-systems/access-groups/add-user-to-access-group: api/acs/access_groups/add_user.md + api-clients/access-control-systems/access-groups/get-access-group: api/acs/access_groups/get.md + api-clients/access-control-systems/access-groups/list-access-groups: api/acs/access_groups/list.md + api-clients/access-control-systems/access-groups/list-users-in-access-group: api/acs/access_groups/list_users.md + api-clients/access-control-systems/access-groups/remove-user-from-access-group: api/acs/access_groups/remove_user.md + api-clients/access-control-systems/access-groups: api/acs/access_groups/README.md + api-clients/access-control-systems/credentials/assign-a-credential-to-a-user: api/acs/credentials/assign.md + api-clients/access-control-systems/credentials/create-credential-for-user: api/acs/credentials/create.md + api-clients/access-control-systems/credentials/delete-credential: api/acs/credentials/delete.md + api-clients/access-control-systems/credentials/get-credential: api/acs/credentials/get.md + api-clients/access-control-systems/credentials/list-accessible-entrances: api/acs/credentials/list_accessible_entrances.md + api-clients/access-control-systems/credentials/list-credentials: api/acs/credentials/list.md + api-clients/access-control-systems/credentials/unassign-a-credential-from-a-user: api/acs/credentials/unassign.md + api-clients/access-control-systems/credentials/update-a-credential: api/acs/credentials/update.md + api-clients/access-control-systems/credentials: api/acs/credentials/README.md + api-clients/access-control-systems/entrances/get-an-entrance: api/acs/entrances/get.md + api-clients/access-control-systems/entrances/list-credentials-with-access-to-an-entrance: api/acs/entrances/list_credentials_with_access.md + api-clients/access-control-systems/entrances/list-entrances: api/acs/entrances/list.md + api-clients/access-control-systems/entrances: api/acs/entrances/README.md + api-clients/access-control-systems/systems/get-system: api/acs/systems/get.md + api-clients/access-control-systems/systems/list-compatible-credential-manager-acs-systems: api/acs/systems/list_compatible_credential_manager_acs_systems.md + api-clients/access-control-systems/systems/list-systems: api/acs/systems/list.md + api-clients/access-control-systems/systems: api/acs/systems/README.md + api-clients/access-control-systems/users/add-user-to-access-group: api/acs/users/add_to_access_group.md + api-clients/access-control-systems/users/create-user: api/acs/users/create.md + api-clients/access-control-systems/users/delete-user: api/acs/users/delete.md + api-clients/access-control-systems/users/get-user: api/acs/users/get.md + api-clients/access-control-systems/users/list-users: api/acs/users/list.md + api-clients/access-control-systems/users/remove-user-from-access-group: api/acs/users/remove_from_access_group.md + api-clients/access-control-systems/users/suspend-a-user: api/acs/users/suspend.md + api-clients/access-control-systems/users/unsuspend-a-user: api/acs/users/unsuspend.md + api-clients/access-control-systems/users/update-user: api/acs/users/update.md + api-clients/access-control-systems/users: api/acs/users/README.md + api-clients/access-control-systems: api/acs/README.md api-clients/action-attempt/get-action-attempt: api-clients/action_attempts/get.md api-clients/action-attempt: api-clients/action_attempts/README.md api-clients/client-sessions/create-a-client-session: api-clients/client_sessions/create.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 4aab7499..59e1af34 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -164,7 +164,7 @@ * [Lock a Lock](api-clients/locks/lock\_door.md) * [Unlock a Lock](api-clients/locks/unlock\_door.md) * [List Locks](api-clients/locks/list.md) -* [Access Control Systems](api-clients/acs/README.md) +* [Access Control Systems](api/acs/README.md) * [Systems](api/acs/systems/README.md) * [List ACS Systems](api/acs/systems/list.md) * [Get an ACS System](api/acs/systems/get.md) From def5b59122eb16c1bb2297ef7412dd6acfbaf760 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Tue, 26 Nov 2024 13:56:28 +0100 Subject: [PATCH 18/23] Revert .gitbook.yaml --- .gitbook.yaml | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.gitbook.yaml b/.gitbook.yaml index 9daa9765..16bc2421 100644 --- a/.gitbook.yaml +++ b/.gitbook.yaml @@ -44,40 +44,40 @@ redirects: api-clients/access-codes/pull-backup-access-code: api-clients/access_codes/pull_backup_access_code.md api-clients/access-codes/update-an-access-code: api-clients/access_codes/update.md api-clients/access-codes: api-clients/access_codes/README.md - api-clients/access-control-systems/access-groups/add-user-to-access-group: api/acs/access_groups/add_user.md - api-clients/access-control-systems/access-groups/get-access-group: api/acs/access_groups/get.md - api-clients/access-control-systems/access-groups/list-access-groups: api/acs/access_groups/list.md - api-clients/access-control-systems/access-groups/list-users-in-access-group: api/acs/access_groups/list_users.md - api-clients/access-control-systems/access-groups/remove-user-from-access-group: api/acs/access_groups/remove_user.md - api-clients/access-control-systems/access-groups: api/acs/access_groups/README.md - api-clients/access-control-systems/credentials/assign-a-credential-to-a-user: api/acs/credentials/assign.md - api-clients/access-control-systems/credentials/create-credential-for-user: api/acs/credentials/create.md - api-clients/access-control-systems/credentials/delete-credential: api/acs/credentials/delete.md - api-clients/access-control-systems/credentials/get-credential: api/acs/credentials/get.md - api-clients/access-control-systems/credentials/list-accessible-entrances: api/acs/credentials/list_accessible_entrances.md - api-clients/access-control-systems/credentials/list-credentials: api/acs/credentials/list.md - api-clients/access-control-systems/credentials/unassign-a-credential-from-a-user: api/acs/credentials/unassign.md - api-clients/access-control-systems/credentials/update-a-credential: api/acs/credentials/update.md - api-clients/access-control-systems/credentials: api/acs/credentials/README.md - api-clients/access-control-systems/entrances/get-an-entrance: api/acs/entrances/get.md - api-clients/access-control-systems/entrances/list-credentials-with-access-to-an-entrance: api/acs/entrances/list_credentials_with_access.md - api-clients/access-control-systems/entrances/list-entrances: api/acs/entrances/list.md - api-clients/access-control-systems/entrances: api/acs/entrances/README.md - api-clients/access-control-systems/systems/get-system: api/acs/systems/get.md - api-clients/access-control-systems/systems/list-compatible-credential-manager-acs-systems: api/acs/systems/list_compatible_credential_manager_acs_systems.md - api-clients/access-control-systems/systems/list-systems: api/acs/systems/list.md - api-clients/access-control-systems/systems: api/acs/systems/README.md - api-clients/access-control-systems/users/add-user-to-access-group: api/acs/users/add_to_access_group.md - api-clients/access-control-systems/users/create-user: api/acs/users/create.md - api-clients/access-control-systems/users/delete-user: api/acs/users/delete.md - api-clients/access-control-systems/users/get-user: api/acs/users/get.md - api-clients/access-control-systems/users/list-users: api/acs/users/list.md - api-clients/access-control-systems/users/remove-user-from-access-group: api/acs/users/remove_from_access_group.md - api-clients/access-control-systems/users/suspend-a-user: api/acs/users/suspend.md - api-clients/access-control-systems/users/unsuspend-a-user: api/acs/users/unsuspend.md - api-clients/access-control-systems/users/update-user: api/acs/users/update.md - api-clients/access-control-systems/users: api/acs/users/README.md - api-clients/access-control-systems: api/acs/README.md + api-clients/access-control-systems/access-groups/add-user-to-access-group: api-clients/acs/access_groups/add_user.md + api-clients/access-control-systems/access-groups/get-access-group: api-clients/acs/access_groups/get.md + api-clients/access-control-systems/access-groups/list-access-groups: api-clients/acs/access_groups/list.md + api-clients/access-control-systems/access-groups/list-users-in-access-group: api-clients/acs/access_groups/list_users.md + api-clients/access-control-systems/access-groups/remove-user-from-access-group: api-clients/acs/access_groups/remove_user.md + api-clients/access-control-systems/access-groups: api-clients/acs/access_groups/README.md + api-clients/access-control-systems/credentials/assign-a-credential-to-a-user: api-clients/acs/credentials/assign.md + api-clients/access-control-systems/credentials/create-credential-for-user: api-clients/acs/credentials/create.md + api-clients/access-control-systems/credentials/delete-credential: api-clients/acs/credentials/delete.md + api-clients/access-control-systems/credentials/get-credential: api-clients/acs/credentials/get.md + api-clients/access-control-systems/credentials/list-accessible-entrances: api-clients/acs/credentials/list_accessible_entrances.md + api-clients/access-control-systems/credentials/list-credentials: api-clients/acs/credentials/list.md + api-clients/access-control-systems/credentials/unassign-a-credential-from-a-user: api-clients/acs/credentials/unassign.md + api-clients/access-control-systems/credentials/update-a-credential: api-clients/acs/credentials/update.md + api-clients/access-control-systems/credentials: api-clients/acs/credentials/README.md + api-clients/access-control-systems/entrances/get-an-entrance: api-clients/acs/entrances/get.md + api-clients/access-control-systems/entrances/list-credentials-with-access-to-an-entrance: api-clients/acs/entrances/list_credentials_with_access.md + api-clients/access-control-systems/entrances/list-entrances: api-clients/acs/entrances/list.md + api-clients/access-control-systems/entrances: api-clients/acs/entrances/README.md + api-clients/access-control-systems/systems/get-system: api-clients/acs/systems/get.md + api-clients/access-control-systems/systems/list-compatible-credential-manager-acs-systems: api-clients/acs/systems/list_compatible_credential_manager_acs_systems.md + api-clients/access-control-systems/systems/list-systems: api-clients/acs/systems/list.md + api-clients/access-control-systems/systems: api-clients/acs/systems/README.md + api-clients/access-control-systems/users/add-user-to-access-group: api-clients/acs/users/add_to_access_group.md + api-clients/access-control-systems/users/create-user: api-clients/acs/users/create.md + api-clients/access-control-systems/users/delete-user: api-clients/acs/users/delete.md + api-clients/access-control-systems/users/get-user: api-clients/acs/users/get.md + api-clients/access-control-systems/users/list-users: api-clients/acs/users/list.md + api-clients/access-control-systems/users/remove-user-from-access-group: api-clients/acs/users/remove_from_access_group.md + api-clients/access-control-systems/users/suspend-a-user: api-clients/acs/users/suspend.md + api-clients/access-control-systems/users/unsuspend-a-user: api-clients/acs/users/unsuspend.md + api-clients/access-control-systems/users/update-user: api-clients/acs/users/update.md + api-clients/access-control-systems/users: api-clients/acs/users/README.md + api-clients/access-control-systems: api-clients/acs/README.md api-clients/action-attempt/get-action-attempt: api-clients/action_attempts/get.md api-clients/action-attempt: api-clients/action_attempts/README.md api-clients/client-sessions/create-a-client-session: api-clients/client_sessions/create.md From c3dbdf0bd590ba2a43f07ccd2980b69f2db22b3b Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Tue, 26 Nov 2024 14:18:30 +0100 Subject: [PATCH 19/23] Add resource link --- src/layouts/api-namespace.hbs | 2 +- src/lib/layout/api-namespace.ts | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/layouts/api-namespace.hbs b/src/layouts/api-namespace.hbs index 7954dc57..f99661ba 100644 --- a/src/layouts/api-namespace.hbs +++ b/src/layouts/api-namespace.hbs @@ -7,7 +7,7 @@ description: {{description}} ## Resources {{#each resources}} -### `{{name}}` +### [`{{name}}`]({{link}}) {{description}} {{/each}} diff --git a/src/lib/layout/api-namespace.ts b/src/lib/layout/api-namespace.ts index abe56300..81a2db1b 100644 --- a/src/lib/layout/api-namespace.ts +++ b/src/lib/layout/api-namespace.ts @@ -5,7 +5,11 @@ import type { PathMetadata } from 'lib/path-metadata.js' export interface ApiNamespaceLayoutContext { title: string description: string - resources: Array<{ name: string; description: string }> + resources: Array<{ + name: string + description: string + link: string + }> } export function setNamespaceLayoutContext( @@ -22,9 +26,12 @@ export function setNamespaceLayoutContext( file.title = namespaceMetadata.title file.description = namespaceMetadata.description ?? '' - const namespaceResources = Object.entries(pathMetadata) - .filter(([p]) => p.startsWith(namespace)) - .flatMap(([_, metadata]) => metadata.resources) + const namespaceRoutes = Object.entries(pathMetadata).filter(([p]) => + p.startsWith(namespace), + ) + const namespaceResources = namespaceRoutes.flatMap( + ([_, metadata]) => metadata.resources, + ) file.resources = namespaceResources.map((resourceName) => { const resource = resources[resourceName] @@ -32,9 +39,20 @@ export function setNamespaceLayoutContext( throw new Error(`Resource ${resourceName} not found in blueprint`) } + const resourceRoute = namespaceRoutes.find(([_, metadata]) => + metadata.resources.includes(resourceName), + ) + if (resourceRoute == null) { + throw new Error(`Route for resource ${resourceName} not found`) + } + const [routePath] = resourceRoute + + const docLink = `./${routePath.split('/').at(-1)}/README.md#${resourceName}` + return { name: resourceName, description: resource.description, + link: docLink, } }) } From 88c3c5fc9bf9a356e99f7608488303e506f6ca84 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 26 Nov 2024 13:21:59 +0000 Subject: [PATCH 20/23] ci: Generate docs --- docs/api/acs/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/acs/README.md b/docs/api/acs/README.md index 9fef99a7..e1196e45 100644 --- a/docs/api/acs/README.md +++ b/docs/api/acs/README.md @@ -6,20 +6,20 @@ description: Systems for managing and monitoring access to physical spaces ## Resources -### `acs_system` +### [`acs_system`](./systems/README.md#acs_system) Represents an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### `acs_user` +### [`acs_user`](./users/README.md#acs_user) -### `acs_entrance` +### [`acs_entrance`](./entrances/README.md#acs_entrance) Represents an [entrance](../../capability-guides/access-systems/retrieving-entrance-details.md) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### `acs_access_group` +### [`acs_access_group`](./access_groups/README.md#acs_access_group) Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. The `acs_access_group` object represents an [access group](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups) within an [access control system](https://docs.seam.co/latest/capability-guides/access-systems). -### `acs_credential` +### [`acs_credential`](./credentials/README.md#acs_credential) Means by which a user gains access at an entrance. The `acs_credential` object represents a credential that provides an ACS user access within an access control system. For each acs_credential object, you define the access method. You can also specify additional properties, such as a code. From 8a1ade26cf3abca047a84718560c92996a11fc91 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <10balian10@gmail.com> Date: Tue, 26 Nov 2024 14:22:49 +0100 Subject: [PATCH 21/23] Improve readability of src/lib/layout/api-namespace.ts --- src/lib/layout/api-namespace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/layout/api-namespace.ts b/src/lib/layout/api-namespace.ts index 81a2db1b..f25c9913 100644 --- a/src/lib/layout/api-namespace.ts +++ b/src/lib/layout/api-namespace.ts @@ -46,8 +46,8 @@ export function setNamespaceLayoutContext( throw new Error(`Route for resource ${resourceName} not found`) } const [routePath] = resourceRoute - - const docLink = `./${routePath.split('/').at(-1)}/README.md#${resourceName}` + const lastPathSegment = routePath.split('/').at(-1) + const docLink = `./${lastPathSegment}/README.md#${resourceName}` return { name: resourceName, From bc0ce7335e53507cb169abf95a2ad9a4e6cb5077 Mon Sep 17 00:00:00 2001 From: Andrii Balitskyi <84702959+andrii-balitskyi@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:14:10 +0100 Subject: [PATCH 22/23] Update src/lib/reference.ts Co-authored-by: Evan Sosenko --- src/lib/reference.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/reference.ts b/src/lib/reference.ts index cc9728bb..ed12201a 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -40,8 +40,6 @@ export const reference = ( const namespacePaths = getNamespacePaths(blueprint.routes) for (const path of namespacePaths) { - const namespaceMetadata = pathMetadata[path] - if (namespaceMetadata == null) continue const k = `api${path}/README.md` files[k] = { From ed4ae4480bb7b492a4dbb335bf933f99e57ec207 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Wed, 27 Nov 2024 14:14:49 +0000 Subject: [PATCH 23/23] ci: Format code --- src/lib/reference.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/reference.ts b/src/lib/reference.ts index ed12201a..aa9b415f 100644 --- a/src/lib/reference.ts +++ b/src/lib/reference.ts @@ -40,7 +40,6 @@ export const reference = ( const namespacePaths = getNamespacePaths(blueprint.routes) for (const path of namespacePaths) { - const k = `api${path}/README.md` files[k] = { contents: Buffer.from('\n'),