2022-10-26 22:33:41 +02:00
|
|
|
{{/*
|
|
|
|
|
|
2024-03-19 15:50:49 +01:00
|
|
|
Renders an event example. Resolves `$ref`s, serializes as JSON, and ensures
|
2022-10-26 22:33:41 +02:00
|
|
|
that it can be included in HTML.
|
|
|
|
|
|
2024-03-19 15:50:49 +01:00
|
|
|
Parameters:
|
|
|
|
|
|
|
|
|
|
* `schema`: the schema of the example
|
|
|
|
|
* `name`: the name of the example
|
2022-10-26 22:33:41 +02:00
|
|
|
|
|
|
|
|
*/}}
|
|
|
|
|
|
2024-03-19 15:50:49 +01:00
|
|
|
{{ $path := delimit (slice "event-schemas/examples" .name) "/" }}
|
|
|
|
|
|
|
|
|
|
{{ $example_content := partial "json-schema/resolve-refs" (dict "schema" .schema "path" $path) }}
|
2025-03-05 10:44:59 +01:00
|
|
|
{{ partial "render-example" (dict "example" $example_content) }}
|