Skip to content
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
24 changes: 21 additions & 3 deletions codegen/lib/layout/api-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,27 @@ const mapBlueprintParamToEndpointParam = (

...(param.format === 'list' &&
param.itemFormat === 'object' && {
objectParameters: param.itemParameters.map(
mapBlueprintParamToEndpointParam,
),
objectParameters: param.itemParameters.flatMap((nestedParam) => {
const mappedNestedParam =
mapBlueprintParamToEndpointParam(nestedParam)

if (mappedNestedParam.format !== 'Object') {
return [mappedNestedParam]
}

const nestedObjectParameters =
mapBlueprintParamToEndpointParam(nestedParam).objectParameters

if (nestedObjectParameters == null) {
return [mappedNestedParam]
}

const prefixedNestedObjectParameters = nestedObjectParameters.map(
(p) => ({ ...p, name: `${mappedNestedParam.name}.${p.name}` }),
)

return [mappedNestedParam, ...prefixedNestedObjectParameters]
}),
}),
}
}
Expand Down
48 changes: 48 additions & 0 deletions docs/api/acs/systems/report_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ Array of ACS encoders to report



<details>

<summary><b><code>hotek_metadata.encoder_number</code></b> <i>String</i></summary>

The encoder number determined by the USB port connection.

</details>

---



<details>

<summary><b><code>is_removed</code></b> <i>Boolean</i></summary>
Expand Down Expand Up @@ -263,6 +275,42 @@ Hotek-specific metadata associated with the entrance.



<details>

<summary><b><code>hotek_metadata.common_area_name</code></b> <i>String</i></summary>

The common area name

</details>

---



<details>

<summary><b><code>hotek_metadata.common_area_number</code></b> <i>String</i></summary>

The room number identifier

</details>

---



<details>

<summary><b><code>hotek_metadata.room_number</code></b> <i>String</i></summary>

The room number identifier

</details>

---



<details>

<summary><b><code>is_removed</code></b> <i>Boolean</i></summary>
Expand Down
Loading