Skip to content

Make top-of-page links conditional #708

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions docs/api/access_grants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
## The access_grant Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/access_methods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
## The access_method Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/acs/access_groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The acs_access_group Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
1 change: 0 additions & 1 deletion docs/api/acs/credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## The acs_credential Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)
Expand Down
2 changes: 0 additions & 2 deletions docs/api/acs/encoders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The acs_encoder Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/acs/entrances/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The acs_entrance Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/client_sessions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The client_session Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/connect_webviews/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The connect_webview Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4336,8 +4336,6 @@ Indicates that the temperature threshold has been exceeded.
## The device_provider Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/noise_sensors/noise_thresholds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## The noise_threshold Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
2 changes: 0 additions & 2 deletions docs/api/phones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

- [Properties](./#properties)
- [phone.properties](./#phone.properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)

Expand Down
3 changes: 0 additions & 3 deletions docs/api/spaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
## The space Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)


Expand Down
3 changes: 0 additions & 3 deletions docs/api/thermostats/schedules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
## The thermostat_schedule Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)


Expand Down
1 change: 0 additions & 1 deletion docs/api/user_identities/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)


Expand Down
3 changes: 0 additions & 3 deletions docs/api/webhooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
## The webhook Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)


Expand Down
3 changes: 0 additions & 3 deletions docs/api/workspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
## The workspace Object

- [Properties](./#properties)
- [Errors](./#errors)
- [Warnings](./#warnings)
- [Events](./#events)
- [Endpoints](./#endpoints)


Expand Down
10 changes: 10 additions & 0 deletions src/layouts/partials/api-resource.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{{#unless hidePreamble}}
## The {{name}} Object

{{#if propertyGroups.length}}
- [Properties](./#properties)
{{/if}}
{{#if legacyPropertyGroups}}
- [{{name}}.properties](./#{{name}}.properties)
{{/if}}
{{#if errorGroups}}
- [Errors](./#errors)
{{/if}}
{{#if warningGroups}}
- [Warnings](./#warnings)
{{/if}}
{{#if events}}
- [Events](./#events)
{{/if}}
{{#if endpoints}}
- [Endpoints](./#endpoints)
{{/if}}

{{#if description}}

Expand Down
2 changes: 2 additions & 0 deletions src/lib/layout/api-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export interface ApiRouteResource {
legacyPropertyGroups?: ApiRoutePropertyGroup[]
events: ApiRouteEvent[]
hidePreamble: boolean
endpoints?: ApiRouteEndpoint[]
}

interface ApiRouteVariantGroup {
Expand Down Expand Up @@ -198,6 +199,7 @@ export const setApiRouteLayoutContext = (
warningGroups,
hidePreamble: route.path !== resource.routePath,
events: eventsByRoutePath.get(resource.routePath) ?? [],
endpoints: file.endpoints,
resourceSamples: resource.resourceSamples
.filter(({ title }) => {
if (groupOptions.include != null) {
Expand Down
Loading