Skip to content

Split properties and legacyProperties #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions docs/api/phones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Represents an app user's mobile phone.
display_name: [example value],
errors: [example value],
nickname: [example value],
properties: [example value],
warnings: [example value],
workspace_id: [example value]
}
Expand Down Expand Up @@ -111,51 +110,6 @@ Optional nickname to describe the phone, settable through Seam.



---

**`properties`** *Object*


Properties of the phone.




<details>
<summary>Child Properties</summary>

- <strong><code>assa_abloy_credential_service_metadata</code></strong> <i>Object</i>

ASSA ABLOY Credential Service metadata for the phone.

- <strong><code>assa_abloy_credential_service_metadata.endpoints</code></strong> <i>List</i> <i>of Objects</i>

Endpoints associated with the phone.

- <strong><code>endpoint_id</code></strong> <i>String</i>

ID of the associated endpoint.


- <strong><code>is_active</code></strong> <i>Boolean</i>

Indicated whether the endpoint is active.


- <strong><code>assa_abloy_credential_service_metadata.has_active_endpoint</code></strong> <i>Boolean</i>

Indicates whether the credential service has active endpoints associated with the phone.

- <strong><code>salto_space_credential_service_metadata</code></strong> <i>Object</i>

Salto Space credential service metadata for the phone.

- <strong><code>salto_space_credential_service_metadata.has_active_phone</code></strong> <i>Boolean</i>

Indicates whether the credential service has an active associated phone.

</details>

---

**`warnings`** *List* *of Objects*
Expand Down
8 changes: 7 additions & 1 deletion src/lib/layout/api-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface ApiRouteResource {
name: string
description: string
properties: ApiRouteProperty[]
legacyProperties?: ApiRouteProperty
events: ApiRouteEvent[]
}

Expand Down Expand Up @@ -131,10 +132,15 @@ export function setApiRouteLayoutContext(
warnings: resourceWarnings.length > 0,
})

const legacyProperties = properties.find(
({ name }) => name === 'properties',
)

file.resources.push({
name: resource.resourceType,
description: resource.description,
properties,
properties: properties.filter(({ name }) => name !== 'properties'),
...(legacyProperties == null ? {} : { legacyProperties }),
errors: resourceErrors,
warnings: resourceWarnings,
events: eventsByRoutePath.get(resource.routePath) ?? [],
Expand Down
Loading