Skip to content

Commit e4b8731

Browse files
committed
Add default path title for all paths
1 parent fe46f3a commit e4b8731

File tree

2 files changed

+9
-45
lines changed

2 files changed

+9
-45
lines changed

codegen/data/paths.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,12 @@
1818
3. Create `acs_credential`s, which are the digital means of granting access to users, such as PIN codes, mobile keys, and plastic (RFID) cards.
1919
If you are developing a mobile app to provide access for your users, you can also use [Seam's iOS and Android SDKs](https://docs.seam.co/latest/capability-guides/mobile-access/mobile-device-sdks) that pair with the Seam API to create and manage mobile keys.
2020
21-
/acs/systems:
22-
title: Systems
23-
2421
/acs/users:
2522
title: ACS Users
2623

27-
/acs/entrances:
28-
title: Entrances
29-
30-
/acs/access_groups:
31-
title: Access Groups
32-
33-
/acs/credentials:
34-
title: Credentials
35-
36-
/acs/encoders:
37-
title: Encoders
38-
3924
/acs/encoders/simulate:
4025
title: Encoder Simulations
4126

42-
/phones:
43-
title: Phones
44-
4527
/phones/simulate:
4628
title: Phone Simulations
4729

@@ -99,15 +81,9 @@
9981
10082
---
10183
102-
/noise_sensors/noise_thresholds:
103-
title: Noise Thresholds
104-
10584
/noise_sensors/simulate:
10685
title: Noise Sensor Simulations
10786

108-
/user_identities:
109-
title: User Identities
110-
11187
/access_codes:
11288
title: Access Codes
11389
include_groups:
@@ -135,28 +111,10 @@
135111
title: Spaces
136112
alpha: "**Early Access Preview.** The spaces API is currently in Alpha. We're actively developing it and seeking early feedback at [[email protected]](mailto:[email protected]). Expect breaking changes as we refine the design."
137113

138-
/connected_accounts:
139-
title: Connected Accounts
140-
141114
/customers:
142115
title: Customers
143116
alpha: "**Early Access Preview.** The customers API is currently in Alpha. We're actively developing it and seeking early feedback at [[email protected]](mailto:[email protected]). Expect breaking changes as we refine the design."
144117

145-
/client_sessions:
146-
title: Client Sessions
147-
148-
/connect_webviews:
149-
title: Connect Webviews
150-
151-
/webhooks:
152-
title: Webhooks
153-
154-
/workspaces:
155-
title: Workspaces
156-
157-
/devices:
158-
title: Devices
159-
160118
/devices/unmanaged:
161119
title: Unmanaged Devices
162120

@@ -200,6 +158,3 @@
200158
201159
/locks/simulate:
202160
title: Lock Simulations
203-
204-
/instant_keys:
205-
title: Instant Keys

codegen/lib/reference.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { Blueprint, Endpoint } from '@seamapi/blueprint'
22
import type Metalsmith from 'metalsmith'
33

4+
import { toCapitalCase } from 'lib/handlebars/helpers.js'
5+
46
import {
57
type ApiEndpointLayoutContext,
68
type ApiNamespaceLayoutContext,
@@ -42,6 +44,13 @@ export const reference = (
4244

4345
const { blueprint } = metadata
4446

47+
for (const { path, name } of [...blueprint.routes, ...blueprint.namespaces]) {
48+
if (path in pathMetadata) continue
49+
pathMetadata[path] = PathMetadataSchema.valueSchema.parse({
50+
title: toCapitalCase(name),
51+
})
52+
}
53+
4554
const { resources } = blueprint
4655

4756
const namespaces = blueprint.namespaces.filter(

0 commit comments

Comments
 (0)