Merge pull request #1283 from uhoreg/fix_event_subtype
improve display of event subtypespull/1319/head
commit
82d2dd4ab0
@ -0,0 +1 @@
|
||||
Improve display of event subtypes.
|
@ -0,0 +1,17 @@
|
||||
{{/*
|
||||
|
||||
Renders an event example. Resolves `$ref`s, serializes as JSON, and ensures
|
||||
that it can be included in HTML.
|
||||
|
||||
This partial is called with the example event object as its context.
|
||||
|
||||
*/}}
|
||||
|
||||
{{ $example_content := partial "json-schema/resolve-refs" (dict "schema" . "path" "event-schemas/examples") }}
|
||||
{{ $example_json := jsonify (dict "indent" " ") $example_content }}
|
||||
{{ $example_json = replace $example_json "\\u003c" "<" }}
|
||||
{{ $example_json = replace $example_json "\\u003e" ">" | safeHTML }}
|
||||
|
||||
```json
|
||||
{{ $example_json }}
|
||||
```
|
Loading…
Reference in New Issue