From a17ce95475e3e9b83e340ef35f4bb30427b62a7b Mon Sep 17 00:00:00 2001 From: Denis Blanchette Date: Fri, 29 Nov 2024 13:19:09 -0500 Subject: [PATCH] feat: Add `description_safe_mode` config option (#283) * feat: Add `description_safe_mode` config option --- config_schema.json | 35 +- docs/Examples.md | 66 ++++ docs/examples/cases/html_in_description.json | 23 ++ .../examples_flat_default/Configuration.html | 222 ++++++----- .../array_additionalItems.html | 2 +- .../examples/examples_flat_default/basic.html | 4 +- .../examples_flat_default/broken_ref.html | 2 +- .../empty_property_name.html | 2 +- .../html_in_description.html | 165 ++++++++ .../long_description.html | 2 +- .../examples_flat_default/multiple_types.html | 4 +- .../pattern_properties.html | 4 +- .../examples_flat_default/ref_with_tabs.html | 40 +- .../examples_flat_default/references_url.html | 2 +- .../examples_flat_default/with_examples.html | 4 +- .../with_special_chars.html | 2 +- .../examples_js_default/Configuration.html | 221 +++++++---- .../array_additionalItems.html | 2 +- docs/examples/examples_js_default/basic.html | 4 +- .../examples_js_default/broken_ref.html | 2 +- .../empty_property_name.html | 2 +- .../html_in_description.html | 163 ++++++++ .../examples_js_default/long_description.html | 2 +- .../examples_js_default/multiple_types.html | 4 +- .../pattern_properties.html | 4 +- .../examples_js_default/ref_with_tabs.html | 40 +- .../examples_js_default/references_url.html | 2 +- .../examples_js_default/with_examples.html | 4 +- .../with_special_chars.html | 2 +- .../Configuration.html | 221 +++++++---- .../array_additionalItems.html | 2 +- .../examples_js_offline_default/basic.html | 4 +- .../broken_ref.html | 2 +- .../empty_property_name.html | 2 +- .../html_in_description.html | 163 ++++++++ .../long_description.html | 2 +- .../multiple_types.html | 4 +- .../pattern_properties.html | 4 +- .../ref_with_tabs.html | 40 +- .../references_url.html | 2 +- .../with_examples.html | 4 +- .../with_special_chars.html | 2 +- .../examples_md_default/Configuration.md | 254 ++++++------ .../html_in_description.md | 63 +++ .../Configuration.md | 241 +++++++----- .../html_in_description.md | 81 ++++ .../Configuration.html | 360 ------------------ .../Configuration.md | 232 ++++++----- .../additional_properties.html | 117 ------ .../anyOf_option_names.html | 76 ---- .../examples_md_nested_with_badges/array.html | 106 ------ .../array_additionalItems.html | 154 -------- .../array_advanced.html | 80 ---- .../examples_md_nested_with_badges/basic.html | 122 ------ .../break_on_newline.html | 31 -- .../circular.html | 50 --- .../combining_not.html | 36 -- .../combining_oneOf.html | 77 ---- .../conditional_subschema.html | 106 ------ .../conditional_subschema_no_else.html | 172 --------- .../defaults.html | 52 --- .../deprecated.html | 68 ---- .../description_from_ref.html | 53 --- .../description_markdown.html | 15 - .../description_with_ref.html | 68 ---- .../examples_md_nested_with_badges/geo.html | 58 --- .../html_in_description.md | 77 ++++ .../html_in_patterns.html | 13 - .../long_description.html | 30 -- .../multiple_types.html | 89 ----- .../pattern_properties.html | 116 ------ .../pattern_properties_html_id.html | 125 ------ .../recursive.html | 66 ---- .../recursive_array.html | 80 ---- .../recursive_parent_in_definition.html | 91 ----- .../recursive_two_files.html | 86 ----- .../recursive_two_files2.html | 11 - .../ref_merge.html | 87 ----- .../references.html | 325 ---------------- .../references_url.html | 31 -- .../references_url_two_levels.html | 73 ---- .../references_url_yaml.html | 78 ---- .../single_element_allOf.html | 33 -- .../top_level_array.html | 33 -- .../top_level_combining.html | 62 --- .../with_default.html | 94 ----- .../with_definitions.html | 110 ------ .../with_descriptions.html | 182 --------- .../with_examples.html | 127 ------ .../with_keywords.html | 200 ---------- .../with_special_chars.html | 99 ----- .../examples_md_with_badges/Configuration.md | 245 ++++++------ .../html_in_description.md | 59 +++ .../generation_configuration.py | 1 + json_schema_for_humans/jinja_filters.py | 12 +- json_schema_for_humans/template_renderer.py | 4 +- poetry.lock | 127 +++--- pyproject.toml | 1 - tests/generate_test.py | 47 +++ 99 files changed, 2051 insertions(+), 4918 deletions(-) create mode 100644 docs/examples/cases/html_in_description.json create mode 100644 docs/examples/examples_flat_default/html_in_description.html create mode 100644 docs/examples/examples_js_default/html_in_description.html create mode 100644 docs/examples/examples_js_offline_default/html_in_description.html create mode 100644 docs/examples/examples_md_default/html_in_description.md create mode 100644 docs/examples/examples_md_nested_default/html_in_description.md delete mode 100644 docs/examples/examples_md_nested_with_badges/Configuration.html delete mode 100644 docs/examples/examples_md_nested_with_badges/additional_properties.html delete mode 100644 docs/examples/examples_md_nested_with_badges/anyOf_option_names.html delete mode 100644 docs/examples/examples_md_nested_with_badges/array.html delete mode 100644 docs/examples/examples_md_nested_with_badges/array_additionalItems.html delete mode 100644 docs/examples/examples_md_nested_with_badges/array_advanced.html delete mode 100644 docs/examples/examples_md_nested_with_badges/basic.html delete mode 100644 docs/examples/examples_md_nested_with_badges/break_on_newline.html delete mode 100644 docs/examples/examples_md_nested_with_badges/circular.html delete mode 100644 docs/examples/examples_md_nested_with_badges/combining_not.html delete mode 100644 docs/examples/examples_md_nested_with_badges/combining_oneOf.html delete mode 100644 docs/examples/examples_md_nested_with_badges/conditional_subschema.html delete mode 100644 docs/examples/examples_md_nested_with_badges/conditional_subschema_no_else.html delete mode 100644 docs/examples/examples_md_nested_with_badges/defaults.html delete mode 100644 docs/examples/examples_md_nested_with_badges/deprecated.html delete mode 100644 docs/examples/examples_md_nested_with_badges/description_from_ref.html delete mode 100644 docs/examples/examples_md_nested_with_badges/description_markdown.html delete mode 100644 docs/examples/examples_md_nested_with_badges/description_with_ref.html delete mode 100644 docs/examples/examples_md_nested_with_badges/geo.html create mode 100644 docs/examples/examples_md_nested_with_badges/html_in_description.md delete mode 100644 docs/examples/examples_md_nested_with_badges/html_in_patterns.html delete mode 100644 docs/examples/examples_md_nested_with_badges/long_description.html delete mode 100644 docs/examples/examples_md_nested_with_badges/multiple_types.html delete mode 100644 docs/examples/examples_md_nested_with_badges/pattern_properties.html delete mode 100644 docs/examples/examples_md_nested_with_badges/pattern_properties_html_id.html delete mode 100644 docs/examples/examples_md_nested_with_badges/recursive.html delete mode 100644 docs/examples/examples_md_nested_with_badges/recursive_array.html delete mode 100644 docs/examples/examples_md_nested_with_badges/recursive_parent_in_definition.html delete mode 100644 docs/examples/examples_md_nested_with_badges/recursive_two_files.html delete mode 100644 docs/examples/examples_md_nested_with_badges/recursive_two_files2.html delete mode 100644 docs/examples/examples_md_nested_with_badges/ref_merge.html delete mode 100644 docs/examples/examples_md_nested_with_badges/references.html delete mode 100644 docs/examples/examples_md_nested_with_badges/references_url.html delete mode 100644 docs/examples/examples_md_nested_with_badges/references_url_two_levels.html delete mode 100644 docs/examples/examples_md_nested_with_badges/references_url_yaml.html delete mode 100644 docs/examples/examples_md_nested_with_badges/single_element_allOf.html delete mode 100644 docs/examples/examples_md_nested_with_badges/top_level_array.html delete mode 100644 docs/examples/examples_md_nested_with_badges/top_level_combining.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_default.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_definitions.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_descriptions.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_examples.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_keywords.html delete mode 100644 docs/examples/examples_md_nested_with_badges/with_special_chars.html create mode 100644 docs/examples/examples_md_with_badges/html_in_description.md diff --git a/config_schema.json b/config_schema.json index 4e809304..fb30d958 100644 --- a/config_schema.json +++ b/config_schema.json @@ -4,20 +4,15 @@ "title": "JSON Schema for Humans configuration file", "description": "Choose how to generate JSON Schema for Humans documentation file.\n\nConfiguration parameters can be provided in several ways:\n\n- On the CLI using `--config parameter_name=value` (example: `--config template_name=flat`)\n- On the CLI using a config file `--config-file config.json`\n- From code, by providing a GenerationConfiguration object to the called generation method.", "properties": { - "minify": { - "type": "boolean", - "default": true, - "description": "[Deprecated]" - }, "description_is_markdown": { "type": "boolean", "default": true, - "description": "Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly." + "description": "(HTML outputs only)\nWhether to consider the description as Markdown and render it accordingly." }, - "allow_html_description": { - "type": "boolean", - "default": false, - "description": "Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks" + "description_safe_mode": { + "enum": [null, "escape", "replace"], + "default": "escape", + "description": "(HTML outputs only)\n(Only used with `description_is_markdown`)\nHow are HTML tags in descriptions handled. Correspond to the `safe_mode` option of the markdown2 library.\n\n- \"escape\": Escape all HTML tags in descriptions\n- \"replace\": Replace HTML tags with `[HTML_REMOVED]`\n- null: Allow HTML in descriptions" }, "expand_buttons": { "type": "boolean", @@ -52,7 +47,7 @@ "deprecated_from_description": { "type": "boolean", "default": false, - "description": "Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`." + "description": "Mark a property as deprecated (with a big red badge) if the description contains the string `[\u200BDeprecated`." }, "default_from_description": { "type": "boolean", @@ -69,10 +64,6 @@ "default": true, "description": "Copy `schema_doc.min.js` to the same directory as `RESULT_FILE` after generation.\n\nThis file contains the logic for the anchor links." }, - "templates_directory": { - "type": "string", - "description": "[Deprecated]" - }, "template_name": { "type": "string", "enum": [ @@ -171,6 +162,20 @@ "type": "boolean", "description": "Whether the footer should display the generation time", "default": true + }, + "allow_html_description": { + "type": "boolean", + "default": false, + "description": "[Deprecated]" + }, + "minify": { + "type": "boolean", + "default": true, + "description": "[Deprecated]" + }, + "templates_directory": { + "type": "string", + "description": "[Deprecated]" } } } diff --git a/docs/Examples.md b/docs/Examples.md index 221fbd2b..223fa031 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -1608,6 +1608,72 @@ the description of an attribute [examples/examples_md_nested_with_badges/geo.md](examples/examples_md_nested_with_badges/geo.md ':include') +## --html_in_description-- +### html_in_description + + +
+Json schema - Click here to expand source code... + +[examples/cases/html_in_description.json](examples/cases/html_in_description.json ':include :type=code') +
+ + +
+JS template - Click here to expand the rendered result... +Open it in full page + +[examples/examples_js_default/html_in_description.html](examples/examples_js_default/html_in_description.html ':include :type=iframe width=100% height=400px') +
+ + +
+JS Offline template - Click here to expand the rendered result... +Open it in full page + +[examples/examples_js_offline_default/html_in_description.html](examples/examples_js_offline_default/html_in_description.html ':include :type=iframe width=100% height=400px') +
+ + +
+Flat template - Click here to expand the rendered result... +Open it in full page + +[examples/examples_flat_default/html_in_description.html](examples/examples_flat_default/html_in_description.html ':include :type=iframe width=100% height=400px') +
+ + +
+Markdown without badge template - Click here to expand the rendered result... +Open it in github + +[examples/examples_md_default/html_in_description.md](examples/examples_md_default/html_in_description.md ':include') +
+ + +
+Markdown with badges template - Click here to expand the rendered result... +Open it in github + +[examples/examples_md_with_badges/html_in_description.md](examples/examples_md_with_badges/html_in_description.md ':include') +
+ + +
+Nested Markdown without badges template - Click here to expand the rendered result... +Open it in github + +[examples/examples_md_nested_default/html_in_description.md](examples/examples_md_nested_default/html_in_description.md ':include') +
+ + +
+Nested Markdown with badges template - Click here to expand the rendered result... +Open it in github + +[examples/examples_md_nested_with_badges/html_in_description.md](examples/examples_md_nested_with_badges/html_in_description.md ':include') +
+ ## --html_in_patterns-- ### html_in_patterns diff --git a/docs/examples/cases/html_in_description.json b/docs/examples/cases/html_in_description.json new file mode 100644 index 00000000..aec77d0b --- /dev/null +++ b/docs/examples/cases/html_in_description.json @@ -0,0 +1,23 @@ +{ + "$id": "https://example.com/html.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "HTML in descriptions", + "type": "object", + "properties": { + "raw_html": { + "type": "string", + "description": "



A link to example.com", + "title": "Some raw HTML" + }, + "html_in_markdown": { + "type": "string", + "description": "Here is some HTML:\n```html\n



A link to example.com\n```", + "title": "Some HTML in Markdown" + }, + "json_in_markdown": { + "type": "string", + "description": "Here is some JSON:\n```json\n{\n \"property\": \"value\"\n}\n```", + "title": "Some JSON in Markdown" + } + } +} \ No newline at end of file diff --git a/docs/examples/examples_flat_default/Configuration.html b/docs/examples/examples_flat_default/Configuration.html index f6771b73..78157d51 100644 --- a/docs/examples/examples_flat_default/Configuration.html +++ b/docs/examples/examples_flat_default/Configuration.html @@ -42,44 +42,6 @@ -
-
-

- minify Deprecated

-
- -
- - Type: boolean Default: true
- - - - - - - -

[Deprecated]

- - - - - - - - - - - -
-
-

@@ -103,7 +65,8 @@

-

Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly.

+

(HTML outputs only)
+Whether to consider the description as Markdown and render it accordingly.

@@ -119,9 +82,9 @@

-
+
@@ -133,7 +96,7 @@

d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z" /> - allow_html_description

Type: boolean Default: false
+ description_safe_mode
Type: enum (of null or string) Default: "escape"
@@ -141,12 +104,23 @@

-

Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks

+

(HTML outputs only)
+(Only used with description_is_markdown)
+How are HTML tags in descriptions handled. Correspond to the safe_mode option of the markdown2 library.

+
    +
  • "escape": Escape all HTML tags in descriptions
  • +
  • "replace": Replace HTML tags with [HTML_REMOVED]
  • +
  • null: Allow HTML in descriptions
  • +
+
+

Must be one of:

+
  • null
  • "escape"
  • "replace"
+
@@ -394,7 +368,7 @@

@@ -414,7 +388,7 @@

-

Mark a property as deprecated (with a big red badge) if the description contains the string [Deprecated.

+

Mark a property as deprecated (with a big red badge) if the description contains the string [​Deprecated.

@@ -454,7 +428,7 @@

Extract the default value of a property from the description like this: [Default `the_default_value`].

-

The default value from the "default" attribute will be used in priority.

+

The default value from the "default" attribute will be used in priority.

@@ -544,44 +518,6 @@

-

-
- -
-
-

- templates_directory Deprecated

-
- -
- - Type: string
- - - - - - - -

[Deprecated]

- - - - - - - - - - -
@@ -820,7 +756,7 @@

Markdown 2 options for the descriptions. description_is_markdown must be true for this to have any effect.

WARNING
-Adding an extra, even if the value is false, will activate it. For example {"break-on-newline": false} will activate the break-on-newline extra.

+Adding an extra, even if the value is false, will activate it. For example {"break-on-newline": false} will activate the break-on-newline extra.

@@ -1055,7 +991,7 @@

array of column names to display in the properties table.

-

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

+

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

@@ -1194,6 +1130,120 @@

+ + + +
+
+

+ allow_html_description Deprecated

+
+ +
+ + Type: boolean Default: false
+ + + + + + + +

[Deprecated]

+ + + + + + + + + + + +
+
+ +
+
+

+ minify Deprecated

+
+ +
+ + Type: boolean Default: true
+ + + + + + + +

[Deprecated]

+ + + + + + + + + + + +
+
+ +
+
+

+ templates_directory Deprecated

+
+ +
+ + Type: string
+ + + + + + + +

[Deprecated]

+ + + + + + + + + + +
diff --git a/docs/examples/examples_flat_default/array_additionalItems.html b/docs/examples/examples_flat_default/array_additionalItems.html index 49e1ecb7..51b2d56f 100644 --- a/docs/examples/examples_flat_default/array_additionalItems.html +++ b/docs/examples/examples_flat_default/array_additionalItems.html @@ -354,7 +354,7 @@

-

This is not a valid JSON Schema, but let's do it anyway.

+

This is not a valid JSON Schema, but let's do it anyway.

diff --git a/docs/examples/examples_flat_default/basic.html b/docs/examples/examples_flat_default/basic.html index 7e4d7618..85a70b92 100644 --- a/docs/examples/examples_flat_default/basic.html +++ b/docs/examples/examples_flat_default/basic.html @@ -56,7 +56,7 @@

-

The person's first name.

+

The person's first name.

@@ -94,7 +94,7 @@

-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_flat_default/broken_ref.html b/docs/examples/examples_flat_default/broken_ref.html index baadd217..bdbcf7f2 100644 --- a/docs/examples/examples_flat_default/broken_ref.html +++ b/docs/examples/examples_flat_default/broken_ref.html @@ -56,7 +56,7 @@

-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_flat_default/empty_property_name.html b/docs/examples/examples_flat_default/empty_property_name.html index 01205b1d..dd2cb2af 100644 --- a/docs/examples/examples_flat_default/empty_property_name.html +++ b/docs/examples/examples_flat_default/empty_property_name.html @@ -56,7 +56,7 @@

-

I don't know why you would want an empty property 🤷

+

I don't know why you would want an empty property 🤷

diff --git a/docs/examples/examples_flat_default/html_in_description.html b/docs/examples/examples_flat_default/html_in_description.html new file mode 100644 index 00000000..0ed8204b --- /dev/null +++ b/docs/examples/examples_flat_default/html_in_description.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + HTML in descriptions + +

HTML in descriptions

+ + Type: object
+ + + + + + + + + + + + + + + + + + + +
+
+

+ raw_html

+
+ +
+ + Type: string
+ + + + + + + +

<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>

+ + + + + + + + + + + +
+
+ +
+ + +
+ + Type: string
+ + + + + + + +

Here is some HTML:

+ +
+
<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>
+
+
+ + + + + + + + + + + +
+
+ +
+ + +
+ + Type: string
+ + + + + + + +

Here is some JSON:

+ +
+
{
+  "property": "value"
+}
+
+
+ + + + + + + + + + + +
+
+ + + \ No newline at end of file diff --git a/docs/examples/examples_flat_default/long_description.html b/docs/examples/examples_flat_default/long_description.html index 731e8dd9..0880255e 100644 --- a/docs/examples/examples_flat_default/long_description.html +++ b/docs/examples/examples_flat_default/long_description.html @@ -56,7 +56,7 @@

-

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

+

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

diff --git a/docs/examples/examples_flat_default/multiple_types.html b/docs/examples/examples_flat_default/multiple_types.html index 14c626e6..e567640b 100644 --- a/docs/examples/examples_flat_default/multiple_types.html +++ b/docs/examples/examples_flat_default/multiple_types.html @@ -56,7 +56,7 @@

-

The person's first name.

+

The person's first name.

@@ -94,7 +94,7 @@

-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_flat_default/pattern_properties.html b/docs/examples/examples_flat_default/pattern_properties.html index 49276404..556f0c7f 100644 --- a/docs/examples/examples_flat_default/pattern_properties.html +++ b/docs/examples/examples_flat_default/pattern_properties.html @@ -56,7 +56,7 @@

-

The person's first name.

+

The person's first name.

@@ -94,7 +94,7 @@

-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_flat_default/ref_with_tabs.html b/docs/examples/examples_flat_default/ref_with_tabs.html index 4f628168..164fb002 100644 --- a/docs/examples/examples_flat_default/ref_with_tabs.html +++ b/docs/examples/examples_flat_default/ref_with_tabs.html @@ -439,7 +439,7 @@

@@ -1417,7 +1417,7 @@

-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -1525,7 +1525,7 @@

-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -2254,7 +2254,7 @@

-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -3416,7 +3416,7 @@

-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -3981,7 +3981,7 @@

@@ -4959,7 +4959,7 @@

-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -5067,7 +5067,7 @@

-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -5796,7 +5796,7 @@

-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -6958,7 +6958,7 @@

-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -7554,7 +7554,7 @@

@@ -8532,7 +8532,7 @@

-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -8640,7 +8640,7 @@

-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -9369,7 +9369,7 @@

-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -10531,7 +10531,7 @@

-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -11096,7 +11096,7 @@

@@ -12074,7 +12074,7 @@

-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -12182,7 +12182,7 @@

-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -12911,7 +12911,7 @@

-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -14073,7 +14073,7 @@

-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

diff --git a/docs/examples/examples_flat_default/references_url.html b/docs/examples/examples_flat_default/references_url.html index 273cba2c..158edfa3 100644 --- a/docs/examples/examples_flat_default/references_url.html +++ b/docs/examples/examples_flat_default/references_url.html @@ -55,7 +55,7 @@

-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_flat_default/with_examples.html b/docs/examples/examples_flat_default/with_examples.html index a9b16ceb..28b62416 100644 --- a/docs/examples/examples_flat_default/with_examples.html +++ b/docs/examples/examples_flat_default/with_examples.html @@ -56,7 +56,7 @@

-

the person's first name

+

the person's first name

@@ -100,7 +100,7 @@

-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_flat_default/with_special_chars.html b/docs/examples/examples_flat_default/with_special_chars.html index 268479ad..c65f2e06 100644 --- a/docs/examples/examples_flat_default/with_special_chars.html +++ b/docs/examples/examples_flat_default/with_special_chars.html @@ -132,7 +132,7 @@

-

L'âge en années qui doit être plus grand ou égal à 0.

+

L'âge en années qui doit être plus grand ou égal à 0.

diff --git a/docs/examples/examples_js_default/Configuration.html b/docs/examples/examples_js_default/Configuration.html index fb568eeb..13f542dc 100644 --- a/docs/examples/examples_js_default/Configuration.html +++ b/docs/examples/examples_js_default/Configuration.html @@ -44,40 +44,6 @@ -
-
-
-

- -

-
- -
-
- - Type: boolean Default: true
-

[Deprecated]

-
- - - - - - -
-
-
-
@@ -100,7 +66,8 @@

/> description_is_markdown

Type: boolean Default: true
-

Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly.

+

(HTML outputs only)
+Whether to consider the description as Markdown and render it accordingly.

@@ -112,18 +79,18 @@

-
+
-
+

- +

-
+
Type: boolean Default: false
-

Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks

-
+ description_safe_mode
Type: enum (of null or string) Default: "escape"
+
+

(HTML outputs only)
+(Only used with description_is_markdown)
+How are HTML tags in descriptions handled. Correspond to the safe_mode option of the markdown2 library.

+ +
    +
  • "escape": Escape all HTML tags in descriptions
  • +
  • "replace": Replace HTML tags with [HTML_REMOVED]
  • +
  • null: Allow HTML in descriptions
  • +
+ +
+
+ +
+

Must be one of:

+
  • null
  • "escape"
  • "replace"
+
@@ -376,7 +361,7 @@

+ aria-expanded="" aria-controls="deprecated_from_description" onclick="setAnchor('#deprecated_from_description')">deprecated_from_description

@@ -393,7 +378,7 @@

/> deprecated_from_description

Type: boolean Default: false
-

Mark a property as deprecated (with a big red badge) if the description contains the string [Deprecated.

+

Mark a property as deprecated (with a big red badge) if the description contains the string [​Deprecated.

@@ -429,7 +414,7 @@

default_from_description

Type: boolean Default: false

Extract the default value of a property from the description like this: [Default `the_default_value`].

-

The default value from the "default" attribute will be used in priority.

+

The default value from the "default" attribute will be used in priority.

@@ -507,40 +492,6 @@

-

-
-
-
-
-
-
-

- -

-
- -
-
- - Type: string
-

[Deprecated]

-
- - - - - -
@@ -774,7 +725,7 @@

Markdown 2 options for the descriptions. description_is_markdown must be true for this to have any effect.

WARNING
-Adding an extra, even if the value is false, will activate it. For example {&#34;break-on-newline&#34;: false} will activate the break-on-newline extra.

+Adding an extra, even if the value is false, will activate it. For example {"break-on-newline": false} will activate the break-on-newline extra.

@@ -993,7 +944,7 @@

properties_table_columns

Type: array of enum (of string)

array of column names to display in the properties table.

-

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

+

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

@@ -1111,6 +1062,108 @@

+ + + + +
+
+
+

+ +

+
+ +
+
+ + Type: boolean Default: false
+

[Deprecated]

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: boolean Default: true
+

[Deprecated]

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: string
+

[Deprecated]

+
+ + + + + +
diff --git a/docs/examples/examples_js_default/array_additionalItems.html b/docs/examples/examples_js_default/array_additionalItems.html index 0e693e7b..a7bf7247 100644 --- a/docs/examples/examples_js_default/array_additionalItems.html +++ b/docs/examples/examples_js_default/array_additionalItems.html @@ -285,7 +285,7 @@

/> arrayEmpty

Type: array
-

This is not a valid JSON Schema, but let's do it anyway.

+

This is not a valid JSON Schema, but let's do it anyway.

diff --git a/docs/examples/examples_js_default/basic.html b/docs/examples/examples_js_default/basic.html index 6265c39a..a5789621 100644 --- a/docs/examples/examples_js_default/basic.html +++ b/docs/examples/examples_js_default/basic.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_default/broken_ref.html b/docs/examples/examples_js_default/broken_ref.html index 2bf15d93..77145c5f 100644 --- a/docs/examples/examples_js_default/broken_ref.html +++ b/docs/examples/examples_js_default/broken_ref.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_js_default/empty_property_name.html b/docs/examples/examples_js_default/empty_property_name.html index 555632fe..53419643 100644 --- a/docs/examples/examples_js_default/empty_property_name.html +++ b/docs/examples/examples_js_default/empty_property_name.html @@ -50,7 +50,7 @@

/> Type: string
-

I don't know why you would want an empty property 🤷

+

I don't know why you would want an empty property 🤷

diff --git a/docs/examples/examples_js_default/html_in_description.html b/docs/examples/examples_js_default/html_in_description.html new file mode 100644 index 00000000..33e3e7b8 --- /dev/null +++ b/docs/examples/examples_js_default/html_in_description.html @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + HTML in descriptions + +
+ + +
+ +

HTML in descriptions

Type: object
+ + + + + + + +
+
+
+

+ +

+
+ +
+
+ +

Some raw HTML

Type: string
+

<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Some HTML in Markdown

Type: string
+
+

Here is some HTML:

+ +
+
<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>
+
+
+ +
+
+ +
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Some JSON in Markdown

Type: string
+
+

Here is some JSON:

+ +
+
{
+  "property": "value"
+}
+
+
+ +
+
+ +
+ + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/examples/examples_js_default/long_description.html b/docs/examples/examples_js_default/long_description.html index 081f9cee..a8ed1619 100644 --- a/docs/examples/examples_js_default/long_description.html +++ b/docs/examples/examples_js_default/long_description.html @@ -51,7 +51,7 @@

it_s_hard_to_explainType: string
-

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

+

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

diff --git a/docs/examples/examples_js_default/multiple_types.html b/docs/examples/examples_js_default/multiple_types.html index 67fe3500..2b137c87 100644 --- a/docs/examples/examples_js_default/multiple_types.html +++ b/docs/examples/examples_js_default/multiple_types.html @@ -50,7 +50,7 @@

/> firstName

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastNameType: string or null
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_default/pattern_properties.html b/docs/examples/examples_js_default/pattern_properties.html index 7f128039..6c486d49 100644 --- a/docs/examples/examples_js_default/pattern_properties.html +++ b/docs/examples/examples_js_default/pattern_properties.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_default/ref_with_tabs.html b/docs/examples/examples_js_default/ref_with_tabs.html index 3ff957e1..1fdeb928 100644 --- a/docs/examples/examples_js_default/ref_with_tabs.html +++ b/docs/examples/examples_js_default/ref_with_tabs.html @@ -403,7 +403,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -1323,7 +1323,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -1427,7 +1427,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -2107,7 +2107,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -3194,7 +3194,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -3698,7 +3698,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -4618,7 +4618,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -4722,7 +4722,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -5402,7 +5402,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -6489,7 +6489,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -7039,7 +7039,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -7959,7 +7959,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -8063,7 +8063,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -8743,7 +8743,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -9830,7 +9830,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -10334,7 +10334,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -11254,7 +11254,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -11358,7 +11358,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -12038,7 +12038,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -13125,7 +13125,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

diff --git a/docs/examples/examples_js_default/references_url.html b/docs/examples/examples_js_default/references_url.html index b194fd23..da145225 100644 --- a/docs/examples/examples_js_default/references_url.html +++ b/docs/examples/examples_js_default/references_url.html @@ -49,7 +49,7 @@

/> firstNameType: string
-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_js_default/with_examples.html b/docs/examples/examples_js_default/with_examples.html index 5e359de3..cbc27b3f 100644 --- a/docs/examples/examples_js_default/with_examples.html +++ b/docs/examples/examples_js_default/with_examples.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

the person's first name

+

the person's first name

@@ -90,7 +90,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_default/with_special_chars.html b/docs/examples/examples_js_default/with_special_chars.html index 5aad1bd3..0ec13920 100644 --- a/docs/examples/examples_js_default/with_special_chars.html +++ b/docs/examples/examples_js_default/with_special_chars.html @@ -118,7 +118,7 @@

/> âgeType: integer
-

L'âge en années qui doit être plus grand ou égal à 0.

+

L'âge en années qui doit être plus grand ou égal à 0.

diff --git a/docs/examples/examples_js_offline_default/Configuration.html b/docs/examples/examples_js_offline_default/Configuration.html index 065d15ac..1abd9bd6 100644 --- a/docs/examples/examples_js_offline_default/Configuration.html +++ b/docs/examples/examples_js_offline_default/Configuration.html @@ -44,40 +44,6 @@ -
-
-
-

- -

-
- -
-
- - Type: boolean Default: true
-

[Deprecated]

-
- - - - - - -
-
-
-
@@ -100,7 +66,8 @@

/> description_is_markdown

Type: boolean Default: true
-

Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly.

+

(HTML outputs only)
+Whether to consider the description as Markdown and render it accordingly.

@@ -112,18 +79,18 @@

-
+
-
+

- +

-
+
Type: boolean Default: false
-

Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks

-
+ description_safe_mode
Type: enum (of null or string) Default: "escape"
+
+

(HTML outputs only)
+(Only used with description_is_markdown)
+How are HTML tags in descriptions handled. Correspond to the safe_mode option of the markdown2 library.

+ +
    +
  • "escape": Escape all HTML tags in descriptions
  • +
  • "replace": Replace HTML tags with [HTML_REMOVED]
  • +
  • null: Allow HTML in descriptions
  • +
+ +
+
+ +
+

Must be one of:

+
  • null
  • "escape"
  • "replace"
+
@@ -376,7 +361,7 @@

+ aria-expanded="" aria-controls="deprecated_from_description" onclick="setAnchor('#deprecated_from_description')">deprecated_from_description

@@ -393,7 +378,7 @@

/> deprecated_from_description

Type: boolean Default: false
-

Mark a property as deprecated (with a big red badge) if the description contains the string [Deprecated.

+

Mark a property as deprecated (with a big red badge) if the description contains the string [​Deprecated.

@@ -429,7 +414,7 @@

default_from_description

Type: boolean Default: false

Extract the default value of a property from the description like this: [Default `the_default_value`].

-

The default value from the "default" attribute will be used in priority.

+

The default value from the "default" attribute will be used in priority.

@@ -507,40 +492,6 @@

-

-
-
-
-
-
-
-

- -

-
- -
-
- - Type: string
-

[Deprecated]

-
- - - - - -
@@ -774,7 +725,7 @@

Markdown 2 options for the descriptions. description_is_markdown must be true for this to have any effect.

WARNING
-Adding an extra, even if the value is false, will activate it. For example {&#34;break-on-newline&#34;: false} will activate the break-on-newline extra.

+Adding an extra, even if the value is false, will activate it. For example {"break-on-newline": false} will activate the break-on-newline extra.

@@ -993,7 +944,7 @@

properties_table_columns

Type: array of enum (of string)

array of column names to display in the properties table.

-

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

+

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description']

@@ -1111,6 +1062,108 @@

+ + + + +
+
+
+

+ +

+
+ +
+
+ + Type: boolean Default: false
+

[Deprecated]

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: boolean Default: true
+

[Deprecated]

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: string
+

[Deprecated]

+
+ + + + + +
diff --git a/docs/examples/examples_js_offline_default/array_additionalItems.html b/docs/examples/examples_js_offline_default/array_additionalItems.html index a310e4b5..0f07a333 100644 --- a/docs/examples/examples_js_offline_default/array_additionalItems.html +++ b/docs/examples/examples_js_offline_default/array_additionalItems.html @@ -285,7 +285,7 @@

/> arrayEmpty

Type: array
-

This is not a valid JSON Schema, but let's do it anyway.

+

This is not a valid JSON Schema, but let's do it anyway.

diff --git a/docs/examples/examples_js_offline_default/basic.html b/docs/examples/examples_js_offline_default/basic.html index feb6aa17..537d1a54 100644 --- a/docs/examples/examples_js_offline_default/basic.html +++ b/docs/examples/examples_js_offline_default/basic.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_offline_default/broken_ref.html b/docs/examples/examples_js_offline_default/broken_ref.html index 79cf5c90..172c6bba 100644 --- a/docs/examples/examples_js_offline_default/broken_ref.html +++ b/docs/examples/examples_js_offline_default/broken_ref.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_js_offline_default/empty_property_name.html b/docs/examples/examples_js_offline_default/empty_property_name.html index e44b1f9b..03a4669a 100644 --- a/docs/examples/examples_js_offline_default/empty_property_name.html +++ b/docs/examples/examples_js_offline_default/empty_property_name.html @@ -50,7 +50,7 @@

/> Type: string
-

I don't know why you would want an empty property 🤷

+

I don't know why you would want an empty property 🤷

diff --git a/docs/examples/examples_js_offline_default/html_in_description.html b/docs/examples/examples_js_offline_default/html_in_description.html new file mode 100644 index 00000000..b2e791c9 --- /dev/null +++ b/docs/examples/examples_js_offline_default/html_in_description.html @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + HTML in descriptions + +
+ + +
+ +

HTML in descriptions

Type: object
+ + + + + + + +
+
+
+

+ +

+
+ +
+
+ +

Some raw HTML

Type: string
+

<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>

+
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Some HTML in Markdown

Type: string
+
+

Here is some HTML:

+ +
+
<br/><br/><br/><br/><a href="https://example.com">A link to example.com</a>
+
+
+ +
+
+ +
+ + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ +

Some JSON in Markdown

Type: string
+
+

Here is some JSON:

+ +
+
{
+  "property": "value"
+}
+
+
+ +
+
+ +
+ + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/docs/examples/examples_js_offline_default/long_description.html b/docs/examples/examples_js_offline_default/long_description.html index 4127c948..143e9a58 100644 --- a/docs/examples/examples_js_offline_default/long_description.html +++ b/docs/examples/examples_js_offline_default/long_description.html @@ -51,7 +51,7 @@

it_s_hard_to_explainType: string
-

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

+

This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ?

diff --git a/docs/examples/examples_js_offline_default/multiple_types.html b/docs/examples/examples_js_offline_default/multiple_types.html index 46861dd7..fe53fe45 100644 --- a/docs/examples/examples_js_offline_default/multiple_types.html +++ b/docs/examples/examples_js_offline_default/multiple_types.html @@ -50,7 +50,7 @@

/> firstName

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastNameType: string or null
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_offline_default/pattern_properties.html b/docs/examples/examples_js_offline_default/pattern_properties.html index 72c2cd89..f06c4fce 100644 --- a/docs/examples/examples_js_offline_default/pattern_properties.html +++ b/docs/examples/examples_js_offline_default/pattern_properties.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

The person's first name.

+

The person's first name.

@@ -84,7 +84,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_offline_default/ref_with_tabs.html b/docs/examples/examples_js_offline_default/ref_with_tabs.html index 90a4a5cf..b9517823 100644 --- a/docs/examples/examples_js_offline_default/ref_with_tabs.html +++ b/docs/examples/examples_js_offline_default/ref_with_tabs.html @@ -403,7 +403,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -1323,7 +1323,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -1427,7 +1427,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -2107,7 +2107,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -3194,7 +3194,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -3698,7 +3698,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -4618,7 +4618,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -4722,7 +4722,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -5402,7 +5402,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -6489,7 +6489,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -7039,7 +7039,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -7959,7 +7959,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -8063,7 +8063,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -8743,7 +8743,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -9830,7 +9830,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

@@ -10334,7 +10334,7 @@

/> Algorithm

Algorithm

Type: enum (of string)
-

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

+

Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of "EdDSA".

Must be one of:

  • "RS256"
  • "RS384"
  • "RS512"
  • "PS256"
  • "PS384"
  • "PS512"
  • "ES256"
  • "ES384"
  • "ES512"
  • "Ed25519"
  • "Ed448"
  • "HS256"
  • "HS384"
  • "HS512"
@@ -11254,7 +11254,7 @@

/> x

Coordinate

Type: string
-

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

+

EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-521", the decoded argument must be 66 bytes.

@@ -11358,7 +11358,7 @@

/> y

Coordinate

Type: string
-

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

+

EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "P-256", the decoded argument must be 32 bytes.

@@ -12038,7 +12038,7 @@

/> x

Coordinate

Type: string
-

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

+

EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the "crv" parameter. For example, if the value of "crv" is "Ed25519", the decoded argument must be 32 bytes.

@@ -13125,7 +13125,7 @@

/> excludes

Excludes

Type: array of string
-

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

+

Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the "excludes" property itself, must also be excluded from the signature process. Since both the "excludes" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.

diff --git a/docs/examples/examples_js_offline_default/references_url.html b/docs/examples/examples_js_offline_default/references_url.html index 3c81aec2..80f1990c 100644 --- a/docs/examples/examples_js_offline_default/references_url.html +++ b/docs/examples/examples_js_offline_default/references_url.html @@ -49,7 +49,7 @@

/> firstNameType: string
-

The person's first name.

+

The person's first name.

diff --git a/docs/examples/examples_js_offline_default/with_examples.html b/docs/examples/examples_js_offline_default/with_examples.html index 3accabfb..9898eb6c 100644 --- a/docs/examples/examples_js_offline_default/with_examples.html +++ b/docs/examples/examples_js_offline_default/with_examples.html @@ -50,7 +50,7 @@

/> firstName

Person

Type: string
-

the person's first name

+

the person's first name

@@ -90,7 +90,7 @@

/> lastName

Person

Type: string
-

The person's last name.

+

The person's last name.

diff --git a/docs/examples/examples_js_offline_default/with_special_chars.html b/docs/examples/examples_js_offline_default/with_special_chars.html index cf0ce23b..b6cf12a9 100644 --- a/docs/examples/examples_js_offline_default/with_special_chars.html +++ b/docs/examples/examples_js_offline_default/with_special_chars.html @@ -118,7 +118,7 @@

/> âgeType: integer
-

L'âge en années qui doit être plus grand ou égal à 0.

+

L'âge en années qui doit être plus grand ou égal à 0.

diff --git a/docs/examples/examples_md_default/Configuration.md b/docs/examples/examples_md_default/Configuration.md index 4c70208f..881b4d9d 100644 --- a/docs/examples/examples_md_default/Configuration.md +++ b/docs/examples/examples_md_default/Configuration.md @@ -1,33 +1,34 @@ # JSON Schema for Humans configuration file -- [1. ~~ Property `JSON Schema for Humans configuration file > minify`~~](#minify) -- [2. Property `JSON Schema for Humans configuration file > description_is_markdown`](#description_is_markdown) -- [3. Property `JSON Schema for Humans configuration file > allow_html_description`](#allow_html_description) -- [4. Property `JSON Schema for Humans configuration file > expand_buttons`](#expand_buttons) -- [5. Property `JSON Schema for Humans configuration file > show_breadcrumbs`](#show_breadcrumbs) -- [6. Property `JSON Schema for Humans configuration file > collapse_long_descriptions`](#collapse_long_descriptions) -- [7. Property `JSON Schema for Humans configuration file > collapse_long_examples`](#collapse_long_examples) -- [8. Property `JSON Schema for Humans configuration file > link_to_reused_ref`](#link_to_reused_ref) -- [9. Property `JSON Schema for Humans configuration file > recursive_detection_depth`](#recursive_detection_depth) -- [10. ~~ Property `JSON Schema for Humans configuration file > deprecated_from_description`~~](#deprecated_from_description) -- [11. Property `JSON Schema for Humans configuration file > default_from_description`](#default_from_description) -- [12. Property `JSON Schema for Humans configuration file > copy_css`](#copy_css) -- [13. Property `JSON Schema for Humans configuration file > copy_js`](#copy_js) -- [14. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory) -- [15. Property `JSON Schema for Humans configuration file > template_name`](#template_name) -- [16. Property `JSON Schema for Humans configuration file > custom_template_path`](#custom_template_path) -- [17. Property `JSON Schema for Humans configuration file > show_toc`](#show_toc) -- [18. Property `JSON Schema for Humans configuration file > examples_as_yaml`](#examples_as_yaml) -- [19. Property `JSON Schema for Humans configuration file > old_anchor_links`](#old_anchor_links) -- [20. Property `JSON Schema for Humans configuration file > markdown_options`](#markdown_options) -- [21. Property `JSON Schema for Humans configuration file > template_md_options`](#template_md_options) - - [21.1. Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image`](#template_md_options_badge_as_image) - - [21.2. Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers`](#template_md_options_show_heading_numbers) - - [21.3. Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions`](#template_md_options_show_array_restrictions) - - [21.4. Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns`](#template_md_options_properties_table_columns) - - [21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#template_md_options_properties_table_columns_items) -- [22. Property `JSON Schema for Humans configuration file > with_footer`](#with_footer) -- [23. Property `JSON Schema for Humans configuration file > footer_show_time`](#footer_show_time) +- [1. Property `JSON Schema for Humans configuration file > description_is_markdown`](#description_is_markdown) +- [2. Property `JSON Schema for Humans configuration file > description_safe_mode`](#description_safe_mode) +- [3. Property `JSON Schema for Humans configuration file > expand_buttons`](#expand_buttons) +- [4. Property `JSON Schema for Humans configuration file > show_breadcrumbs`](#show_breadcrumbs) +- [5. Property `JSON Schema for Humans configuration file > collapse_long_descriptions`](#collapse_long_descriptions) +- [6. Property `JSON Schema for Humans configuration file > collapse_long_examples`](#collapse_long_examples) +- [7. Property `JSON Schema for Humans configuration file > link_to_reused_ref`](#link_to_reused_ref) +- [8. Property `JSON Schema for Humans configuration file > recursive_detection_depth`](#recursive_detection_depth) +- [9. Property `JSON Schema for Humans configuration file > deprecated_from_description`](#deprecated_from_description) +- [10. Property `JSON Schema for Humans configuration file > default_from_description`](#default_from_description) +- [11. Property `JSON Schema for Humans configuration file > copy_css`](#copy_css) +- [12. Property `JSON Schema for Humans configuration file > copy_js`](#copy_js) +- [13. Property `JSON Schema for Humans configuration file > template_name`](#template_name) +- [14. Property `JSON Schema for Humans configuration file > custom_template_path`](#custom_template_path) +- [15. Property `JSON Schema for Humans configuration file > show_toc`](#show_toc) +- [16. Property `JSON Schema for Humans configuration file > examples_as_yaml`](#examples_as_yaml) +- [17. Property `JSON Schema for Humans configuration file > old_anchor_links`](#old_anchor_links) +- [18. Property `JSON Schema for Humans configuration file > markdown_options`](#markdown_options) +- [19. Property `JSON Schema for Humans configuration file > template_md_options`](#template_md_options) + - [19.1. Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image`](#template_md_options_badge_as_image) + - [19.2. Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers`](#template_md_options_show_heading_numbers) + - [19.3. Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions`](#template_md_options_show_array_restrictions) + - [19.4. Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns`](#template_md_options_properties_table_columns) + - [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#template_md_options_properties_table_columns_items) +- [20. Property `JSON Schema for Humans configuration file > with_footer`](#with_footer) +- [21. Property `JSON Schema for Humans configuration file > footer_show_time`](#footer_show_time) +- [22. ~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~](#allow_html_description) +- [23. ~~ Property `JSON Schema for Humans configuration file > minify`~~](#minify) +- [24. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory) **Title:** JSON Schema for Humans configuration file @@ -45,44 +46,34 @@ Configuration parameters can be provided in several ways: - On the CLI using a config file `--config-file config.json` - From code, by providing a GenerationConfiguration object to the called generation method. -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------------- | ------- | ---------------- | ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [minify](#minify ) | No | boolean | [Deprecated] | - | [Deprecated] | -| - [description_is_markdown](#description_is_markdown ) | No | boolean | No | - | Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. | -| - [allow_html_description](#allow_html_description ) | No | boolean | No | - | Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks | -| - [expand_buttons](#expand_buttons ) | No | boolean | No | - | Add an \`Expand all\` and a \`Collapse all\` button at the top of the generated documentation. | -| - [show_breadcrumbs](#show_breadcrumbs ) | No | boolean | No | - | For each property, show the relative place of that property in the schema. | -| - [collapse_long_descriptions](#collapse_long_descriptions ) | No | boolean | No | - | If a description is considered big, show only the beginning and add a \`Read more\` button. | -| - [collapse_long_examples](#collapse_long_examples ) | No | boolean | No | - | If an example is considered big, collapse it, it can be displayed with a \`Show\` option. | -| - [link_to_reused_ref](#link_to_reused_ref ) | No | boolean | No | - | If several \`$ref\` points to the same definition, only render the documentation for this definition the first time. All other occurrences are replaced by an anchor link to the first occurrence. The first occurrence is the one that is the least nested from the top of the schema and appears first in that nesting level.

*Note*: If this option is off and the schema contains recursive definitions, the generation will crash! | -| - [recursive_detection_depth](#recursive_detection_depth ) | No | integer | No | - | *Advanced option*
If \`link_to_reused_ref\` is false and a \`$ref\` in the schema refers to a parent of itself, we would get a \`RecursionError\` trying to render the documentation. To avoid this, each reference is checked for circular references.

This option determines the number of times to recursively follow definitions looking for a circular reference.

In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. | -| - [deprecated_from_description](#deprecated_from_description ) | No | boolean | [Deprecated] | - | Mark a property as deprecated (with a big red badge) if the description contains the string \`[Deprecated\`. | -| - [default_from_description](#default_from_description ) | No | boolean | No | - | Extract the default value of a property from the description like this: \`\`[Default \`the_default_value\`]\`\`.

The default value from the "default" attribute will be used in priority. | -| - [copy_css](#copy_css ) | No | boolean | No | - | Copy \`schema_doc.css\` to the same directory as \`RESULT_FILE\` after generation. | -| - [copy_js](#copy_js ) | No | boolean | No | - | Copy \`schema_doc.min.js\` to the same directory as \`RESULT_FILE\` after generation.

This file contains the logic for the anchor links. | -| - [templates_directory](#templates_directory ) | No | string | [Deprecated] | - | [Deprecated] | -| - [template_name](#template_name ) | No | enum (of string) | No | - | The name of the built-in template to use to render the documentation.

\`js\` is the default and uses javascript for anchor links, collapsible sections and tabs.

\`js_offline\` is identical to \`js\` except that all CSS, fonts and JavaScript are bundled for offline use.

\`flat\` uses no javascript, but has no interactivity.

\`md\` is the markdown template.

\`md_nested\` is the markdown template with collapsible nested sections. | -| - [custom_template_path](#custom_template_path ) | No | string | No | - | Path to a custom Jinja2 template file.

There can be multiple files to split the template, but this path should be the entry point.

If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. | -| - [show_toc](#show_toc ) | No | boolean | No | - | Whether to render table of contents. | -| - [examples_as_yaml](#examples_as_yaml ) | No | boolean | No | - | Whether to display examples as YAML instead of JSON | -| - [old_anchor_links](#old_anchor_links ) | No | boolean | No | - | Generate HTML ids for anchor links without special characters (keep only letters, digits, \`_\`, and \`-\`).

This is the old behaviour and is only needed for browsers that do not support HTML 5. | -| - [markdown_options](#markdown_options ) | No | object | No | - | [Markdown 2 options](https://github.com/trentm/python-markdown2/wiki/Extras) for the descriptions. \`description_is_markdown\` must be true for this to have any effect.

**WARNING**
Adding an extra, even if the value is false, will activate it. For example \`{"break-on-newline": false}\` will activate the \`break-on-newline\` extra. | -| - [template_md_options](#template_md_options ) | No | object | No | - | specific options to md template | -| - [with_footer](#with_footer ) | No | boolean | No | - | Whether to show the footer linking to the library repo and with the generation datetime | -| - [footer_show_time](#footer_show_time ) | No | boolean | No | - | Whether the footer should display the generation time | - -## 1. ~~ Property `JSON Schema for Humans configuration file > minify`~~ - -| | | -| -------------- | ------------ | -| **Type** | `boolean` | -| **Required** | No | -| **Deprecated** | [Deprecated] | -| **Default** | `true` | - -**Description:** [Deprecated] - -## 2. Property `JSON Schema for Humans configuration file > description_is_markdown` +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| -------------------------------------------------------------- | ------- | ------------------------ | ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [description_is_markdown](#description_is_markdown ) | No | boolean | No | - | (HTML outputs only)
Whether to consider the description as Markdown and render it accordingly. | +| - [description_safe_mode](#description_safe_mode ) | No | enum (of null or string) | No | - | (HTML outputs only)
(Only used with \`description_is_markdown\`)
How are HTML tags in descriptions handled. Correspond to the \`safe_mode\` option of the markdown2 library.

- "escape": Escape all HTML tags in descriptions
- "replace": Replace HTML tags with \`[HTML_REMOVED]\`
- null: Allow HTML in descriptions | +| - [expand_buttons](#expand_buttons ) | No | boolean | No | - | Add an \`Expand all\` and a \`Collapse all\` button at the top of the generated documentation. | +| - [show_breadcrumbs](#show_breadcrumbs ) | No | boolean | No | - | For each property, show the relative place of that property in the schema. | +| - [collapse_long_descriptions](#collapse_long_descriptions ) | No | boolean | No | - | If a description is considered big, show only the beginning and add a \`Read more\` button. | +| - [collapse_long_examples](#collapse_long_examples ) | No | boolean | No | - | If an example is considered big, collapse it, it can be displayed with a \`Show\` option. | +| - [link_to_reused_ref](#link_to_reused_ref ) | No | boolean | No | - | If several \`$ref\` points to the same definition, only render the documentation for this definition the first time. All other occurrences are replaced by an anchor link to the first occurrence. The first occurrence is the one that is the least nested from the top of the schema and appears first in that nesting level.

*Note*: If this option is off and the schema contains recursive definitions, the generation will crash! | +| - [recursive_detection_depth](#recursive_detection_depth ) | No | integer | No | - | *Advanced option*
If \`link_to_reused_ref\` is false and a \`$ref\` in the schema refers to a parent of itself, we would get a \`RecursionError\` trying to render the documentation. To avoid this, each reference is checked for circular references.

This option determines the number of times to recursively follow definitions looking for a circular reference.

In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. | +| - [deprecated_from_description](#deprecated_from_description ) | No | boolean | No | - | Mark a property as deprecated (with a big red badge) if the description contains the string \`[​Deprecated\`. | +| - [default_from_description](#default_from_description ) | No | boolean | No | - | Extract the default value of a property from the description like this: \`\`[Default \`the_default_value\`]\`\`.

The default value from the "default" attribute will be used in priority. | +| - [copy_css](#copy_css ) | No | boolean | No | - | Copy \`schema_doc.css\` to the same directory as \`RESULT_FILE\` after generation. | +| - [copy_js](#copy_js ) | No | boolean | No | - | Copy \`schema_doc.min.js\` to the same directory as \`RESULT_FILE\` after generation.

This file contains the logic for the anchor links. | +| - [template_name](#template_name ) | No | enum (of string) | No | - | The name of the built-in template to use to render the documentation.

\`js\` is the default and uses javascript for anchor links, collapsible sections and tabs.

\`js_offline\` is identical to \`js\` except that all CSS, fonts and JavaScript are bundled for offline use.

\`flat\` uses no javascript, but has no interactivity.

\`md\` is the markdown template.

\`md_nested\` is the markdown template with collapsible nested sections. | +| - [custom_template_path](#custom_template_path ) | No | string | No | - | Path to a custom Jinja2 template file.

There can be multiple files to split the template, but this path should be the entry point.

If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. | +| - [show_toc](#show_toc ) | No | boolean | No | - | Whether to render table of contents. | +| - [examples_as_yaml](#examples_as_yaml ) | No | boolean | No | - | Whether to display examples as YAML instead of JSON | +| - [old_anchor_links](#old_anchor_links ) | No | boolean | No | - | Generate HTML ids for anchor links without special characters (keep only letters, digits, \`_\`, and \`-\`).

This is the old behaviour and is only needed for browsers that do not support HTML 5. | +| - [markdown_options](#markdown_options ) | No | object | No | - | [Markdown 2 options](https://github.com/trentm/python-markdown2/wiki/Extras) for the descriptions. \`description_is_markdown\` must be true for this to have any effect.

**WARNING**
Adding an extra, even if the value is false, will activate it. For example \`{"break-on-newline": false}\` will activate the \`break-on-newline\` extra. | +| - [template_md_options](#template_md_options ) | No | object | No | - | specific options to md template | +| - [with_footer](#with_footer ) | No | boolean | No | - | Whether to show the footer linking to the library repo and with the generation datetime | +| - [footer_show_time](#footer_show_time ) | No | boolean | No | - | Whether the footer should display the generation time | +| - [allow_html_description](#allow_html_description ) | No | boolean | [Deprecated] | - | [Deprecated] | +| - [minify](#minify ) | No | boolean | [Deprecated] | - | [Deprecated] | +| - [templates_directory](#templates_directory ) | No | string | [Deprecated] | - | [Deprecated] | + +## 1. Property `JSON Schema for Humans configuration file > description_is_markdown` | | | | ------------ | --------- | @@ -90,19 +81,31 @@ Configuration parameters can be provided in several ways: | **Required** | No | | **Default** | `true` | -**Description:** Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. +**Description:** (HTML outputs only) +Whether to consider the description as Markdown and render it accordingly. -## 3. Property `JSON Schema for Humans configuration file > allow_html_description` +## 2. Property `JSON Schema for Humans configuration file > description_safe_mode` -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | -| **Default** | `false` | +| | | +| ------------ | -------------------------- | +| **Type** | `enum (of null or string)` | +| **Required** | No | +| **Default** | `"escape"` | + +**Description:** (HTML outputs only) +(Only used with `description_is_markdown`) +How are HTML tags in descriptions handled. Correspond to the `safe_mode` option of the markdown2 library. + +- "escape": Escape all HTML tags in descriptions +- "replace": Replace HTML tags with `[HTML_REMOVED]` +- null: Allow HTML in descriptions -**Description:** Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks +Must be one of: +* null +* "escape" +* "replace" -## 4. Property `JSON Schema for Humans configuration file > expand_buttons` +## 3. Property `JSON Schema for Humans configuration file > expand_buttons` | | | | ------------ | --------- | @@ -112,7 +115,7 @@ Configuration parameters can be provided in several ways: **Description:** Add an `Expand all` and a `Collapse all` button at the top of the generated documentation. -## 5. Property `JSON Schema for Humans configuration file > show_breadcrumbs` +## 4. Property `JSON Schema for Humans configuration file > show_breadcrumbs` | | | | ------------ | --------- | @@ -122,7 +125,7 @@ Configuration parameters can be provided in several ways: **Description:** For each property, show the relative place of that property in the schema. -## 6. Property `JSON Schema for Humans configuration file > collapse_long_descriptions` +## 5. Property `JSON Schema for Humans configuration file > collapse_long_descriptions` | | | | ------------ | --------- | @@ -132,7 +135,7 @@ Configuration parameters can be provided in several ways: **Description:** If a description is considered big, show only the beginning and add a `Read more` button. -## 7. Property `JSON Schema for Humans configuration file > collapse_long_examples` +## 6. Property `JSON Schema for Humans configuration file > collapse_long_examples` | | | | ------------ | --------- | @@ -142,7 +145,7 @@ Configuration parameters can be provided in several ways: **Description:** If an example is considered big, collapse it, it can be displayed with a `Show` option. -## 8. Property `JSON Schema for Humans configuration file > link_to_reused_ref` +## 7. Property `JSON Schema for Humans configuration file > link_to_reused_ref` | | | | ------------ | --------- | @@ -154,7 +157,7 @@ Configuration parameters can be provided in several ways: *Note*: If this option is off and the schema contains recursive definitions, the generation will crash! -## 9. Property `JSON Schema for Humans configuration file > recursive_detection_depth` +## 8. Property `JSON Schema for Humans configuration file > recursive_detection_depth` | | | | ------------ | --------- | @@ -169,18 +172,17 @@ This option determines the number of times to recursively follow definitions loo In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. -## 10. ~~ Property `JSON Schema for Humans configuration file > deprecated_from_description`~~ +## 9. Property `JSON Schema for Humans configuration file > deprecated_from_description` -| | | -| -------------- | ------------ | -| **Type** | `boolean` | -| **Required** | No | -| **Deprecated** | [Deprecated] | -| **Default** | `false` | +| | | +| ------------ | --------- | +| **Type** | `boolean` | +| **Required** | No | +| **Default** | `false` | -**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`. +**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[​Deprecated`. -## 11. Property `JSON Schema for Humans configuration file > default_from_description` +## 10. Property `JSON Schema for Humans configuration file > default_from_description` | | | | ------------ | --------- | @@ -192,7 +194,7 @@ In other words, if a schema has a deeply nested element that refers to itself, t The default value from the "default" attribute will be used in priority. -## 12. Property `JSON Schema for Humans configuration file > copy_css` +## 11. Property `JSON Schema for Humans configuration file > copy_css` | | | | ------------ | --------- | @@ -202,7 +204,7 @@ The default value from the "default" attribute will be used in priority. **Description:** Copy `schema_doc.css` to the same directory as `RESULT_FILE` after generation. -## 13. Property `JSON Schema for Humans configuration file > copy_js` +## 12. Property `JSON Schema for Humans configuration file > copy_js` | | | | ------------ | --------- | @@ -214,17 +216,7 @@ The default value from the "default" attribute will be used in priority. This file contains the logic for the anchor links. -## 14. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~ - -| | | -| -------------- | ------------ | -| **Type** | `string` | -| **Required** | No | -| **Deprecated** | [Deprecated] | - -**Description:** [Deprecated] - -## 15. Property `JSON Schema for Humans configuration file > template_name` +## 13. Property `JSON Schema for Humans configuration file > template_name` | | | | ------------ | ------------------ | @@ -251,7 +243,7 @@ Must be one of: * "md" * "md_nested" -## 16. Property `JSON Schema for Humans configuration file > custom_template_path` +## 14. Property `JSON Schema for Humans configuration file > custom_template_path` | | | | ------------ | -------- | @@ -265,7 +257,7 @@ There can be multiple files to split the template, but this path should be the e If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. -## 17. Property `JSON Schema for Humans configuration file > show_toc` +## 15. Property `JSON Schema for Humans configuration file > show_toc` | | | | ------------ | --------- | @@ -275,7 +267,7 @@ If no output file is specified, the extension of the template file will be used **Description:** Whether to render table of contents. -## 18. Property `JSON Schema for Humans configuration file > examples_as_yaml` +## 16. Property `JSON Schema for Humans configuration file > examples_as_yaml` | | | | ------------ | --------- | @@ -285,7 +277,7 @@ If no output file is specified, the extension of the template file will be used **Description:** Whether to display examples as YAML instead of JSON -## 19. Property `JSON Schema for Humans configuration file > old_anchor_links` +## 17. Property `JSON Schema for Humans configuration file > old_anchor_links` | | | | ------------ | --------- | @@ -297,7 +289,7 @@ If no output file is specified, the extension of the template file will be used This is the old behaviour and is only needed for browsers that do not support HTML 5. -## 20. Property `JSON Schema for Humans configuration file > markdown_options` +## 18. Property `JSON Schema for Humans configuration file > markdown_options` | | | | ------------------------- | ------------------------------------------------------------------------------------------------------- | @@ -324,7 +316,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br } ``` -## 21. Property `JSON Schema for Humans configuration file > template_md_options` +## 19. Property `JSON Schema for Humans configuration file > template_md_options` | | | | ------------------------- | ------------------------------------------------------------------------- | @@ -341,7 +333,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | - [show_array_restrictions](#template_md_options_show_array_restrictions ) | No | boolean | No | - | if true generate array restrictions section.

if false, do not generate | | - [properties_table_columns](#template_md_options_properties_table_columns ) | No | array of enum (of string) | No | - | array of column names to display in the properties table.

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description'] | -### 21.1. Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image` +### 19.1. Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image` | | | | ------------ | --------- | @@ -353,7 +345,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, use text instead -### 21.2. Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers` +### 19.2. Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers` | | | | ------------ | --------- | @@ -365,7 +357,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, do not generate heading numbers -### 21.3. Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions` +### 19.3. Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions` | | | | ------------ | --------- | @@ -377,7 +369,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, do not generate -### 21.4. Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns` +### 19.4. Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns` | | | | ------------ | --------------------------- | @@ -400,7 +392,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | ------------------------------------------------------------------------------------- | ----------- | | [properties_table_columns items](#template_md_options_properties_table_columns_items) | - | -#### 21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items +#### 19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items | | | | ------------ | ------------------ | @@ -415,7 +407,7 @@ Must be one of: * "Definition" * "Title/Description" -## 22. Property `JSON Schema for Humans configuration file > with_footer` +## 20. Property `JSON Schema for Humans configuration file > with_footer` | | | | ------------ | --------- | @@ -425,7 +417,7 @@ Must be one of: **Description:** Whether to show the footer linking to the library repo and with the generation datetime -## 23. Property `JSON Schema for Humans configuration file > footer_show_time` +## 21. Property `JSON Schema for Humans configuration file > footer_show_time` | | | | ------------ | --------- | @@ -435,5 +427,37 @@ Must be one of: **Description:** Whether the footer should display the generation time +## 22. ~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~ + +| | | +| -------------- | ------------ | +| **Type** | `boolean` | +| **Required** | No | +| **Deprecated** | [Deprecated] | +| **Default** | `false` | + +**Description:** [Deprecated] + +## 23. ~~ Property `JSON Schema for Humans configuration file > minify`~~ + +| | | +| -------------- | ------------ | +| **Type** | `boolean` | +| **Required** | No | +| **Deprecated** | [Deprecated] | +| **Default** | `true` | + +**Description:** [Deprecated] + +## 24. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~ + +| | | +| -------------- | ------------ | +| **Type** | `string` | +| **Required** | No | +| **Deprecated** | [Deprecated] | + +**Description:** [Deprecated] + ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/docs/examples/examples_md_default/html_in_description.md b/docs/examples/examples_md_default/html_in_description.md new file mode 100644 index 00000000..3c9a9cfc --- /dev/null +++ b/docs/examples/examples_md_default/html_in_description.md @@ -0,0 +1,63 @@ +# HTML in descriptions + +- [1. Property `HTML in descriptions > raw_html`](#raw_html) +- [2. Property `HTML in descriptions > html_in_markdown`](#html_in_markdown) +- [3. Property `HTML in descriptions > json_in_markdown`](#json_in_markdown) + +**Title:** HTML in descriptions + +| | | +| ------------------------- | ------------------------------------------------------------------------- | +| **Type** | `object` | +| **Required** | No | +| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | + +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ---------------------------------------- | ------- | ------ | ---------- | ---------- | --------------------- | +| - [raw_html](#raw_html ) | No | string | No | - | Some raw HTML | +| - [html_in_markdown](#html_in_markdown ) | No | string | No | - | Some HTML in Markdown | +| - [json_in_markdown](#json_in_markdown ) | No | string | No | - | Some JSON in Markdown | + +## 1. Property `HTML in descriptions > raw_html` + +**Title:** Some raw HTML + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:**



A link to example.com + +## 2. Property `HTML in descriptions > html_in_markdown` + +**Title:** Some HTML in Markdown + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Here is some HTML: +```html +



A link to example.com +``` + +## 3. Property `HTML in descriptions > json_in_markdown` + +**Title:** Some JSON in Markdown + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Here is some JSON: +```json +{ + "property": "value" +} +``` + +---------------------------------------------------------------------------------------------------------------------------- +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/docs/examples/examples_md_nested_default/Configuration.md b/docs/examples/examples_md_nested_default/Configuration.md index 3f290445..2666f652 100644 --- a/docs/examples/examples_md_nested_default/Configuration.md +++ b/docs/examples/examples_md_nested_default/Configuration.md @@ -1,33 +1,34 @@ # JSON Schema for Humans configuration file -- [1. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify) -- [2. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown](#description_is_markdown) -- [3. [Optional] Property JSON Schema for Humans configuration file > allow_html_description](#allow_html_description) -- [4. [Optional] Property JSON Schema for Humans configuration file > expand_buttons](#expand_buttons) -- [5. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs](#show_breadcrumbs) -- [6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions](#collapse_long_descriptions) -- [7. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples](#collapse_long_examples) -- [8. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref](#link_to_reused_ref) -- [9. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth](#recursive_detection_depth) -- [10. [Optional]~~ Property JSON Schema for Humans configuration file > deprecated_from_description~~](#deprecated_from_description) -- [11. [Optional] Property JSON Schema for Humans configuration file > default_from_description](#default_from_description) -- [12. [Optional] Property JSON Schema for Humans configuration file > copy_css](#copy_css) -- [13. [Optional] Property JSON Schema for Humans configuration file > copy_js](#copy_js) -- [14. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory) -- [15. [Optional] Property JSON Schema for Humans configuration file > template_name](#template_name) -- [16. [Optional] Property JSON Schema for Humans configuration file > custom_template_path](#custom_template_path) -- [17. [Optional] Property JSON Schema for Humans configuration file > show_toc](#show_toc) -- [18. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml](#examples_as_yaml) -- [19. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links](#old_anchor_links) -- [20. [Optional] Property JSON Schema for Humans configuration file > markdown_options](#markdown_options) -- [21. [Optional] Property JSON Schema for Humans configuration file > template_md_options](#template_md_options) - - [21.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image](#template_md_options_badge_as_image) - - [21.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers](#template_md_options_show_heading_numbers) - - [21.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions](#template_md_options_show_array_restrictions) - - [21.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns](#template_md_options_properties_table_columns) - - [21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2) -- [22. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer) -- [23. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time) +- [1. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown](#description_is_markdown) +- [2. [Optional] Property JSON Schema for Humans configuration file > description_safe_mode](#description_safe_mode) +- [3. [Optional] Property JSON Schema for Humans configuration file > expand_buttons](#expand_buttons) +- [4. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs](#show_breadcrumbs) +- [5. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions](#collapse_long_descriptions) +- [6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples](#collapse_long_examples) +- [7. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref](#link_to_reused_ref) +- [8. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth](#recursive_detection_depth) +- [9. [Optional] Property JSON Schema for Humans configuration file > deprecated_from_description](#deprecated_from_description) +- [10. [Optional] Property JSON Schema for Humans configuration file > default_from_description](#default_from_description) +- [11. [Optional] Property JSON Schema for Humans configuration file > copy_css](#copy_css) +- [12. [Optional] Property JSON Schema for Humans configuration file > copy_js](#copy_js) +- [13. [Optional] Property JSON Schema for Humans configuration file > template_name](#template_name) +- [14. [Optional] Property JSON Schema for Humans configuration file > custom_template_path](#custom_template_path) +- [15. [Optional] Property JSON Schema for Humans configuration file > show_toc](#show_toc) +- [16. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml](#examples_as_yaml) +- [17. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links](#old_anchor_links) +- [18. [Optional] Property JSON Schema for Humans configuration file > markdown_options](#markdown_options) +- [19. [Optional] Property JSON Schema for Humans configuration file > template_md_options](#template_md_options) + - [19.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image](#template_md_options_badge_as_image) + - [19.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers](#template_md_options_show_heading_numbers) + - [19.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions](#template_md_options_show_array_restrictions) + - [19.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns](#template_md_options_properties_table_columns) + - [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2) +- [20. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer) +- [21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time) +- [22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description) +- [23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify) +- [24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory) **Title:** JSON Schema for Humans configuration file @@ -47,26 +48,7 @@ Configuration parameters can be provided in several ways:
- 1. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~ - - -
- -| | | -| -------------- | ------------ | -| **Type** | `boolean` | -| **Required** | No | -| **Deprecated** | [Deprecated] | -| **Default** | `true` | - -**Description:** [Deprecated] - -
-
- -
- - 2. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown + 1. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown
@@ -77,32 +59,44 @@ Configuration parameters can be provided in several ways: | **Required** | No | | **Default** | `true` | -**Description:** Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. +**Description:** (HTML outputs only) +Whether to consider the description as Markdown and render it accordingly.
- 3. [Optional] Property JSON Schema for Humans configuration file > allow_html_description + 2. [Optional] Property JSON Schema for Humans configuration file > description_safe_mode
-| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | -| **Default** | `false` | +| | | +| ------------ | -------------------------- | +| **Type** | `enum (of null or string)` | +| **Required** | No | +| **Default** | `"escape"` | + +**Description:** (HTML outputs only) +(Only used with `description_is_markdown`) +How are HTML tags in descriptions handled. Correspond to the `safe_mode` option of the markdown2 library. -**Description:** Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks +- "escape": Escape all HTML tags in descriptions +- "replace": Replace HTML tags with `[HTML_REMOVED]` +- null: Allow HTML in descriptions + +Must be one of: +* null +* "escape" +* "replace"
- 4. [Optional] Property JSON Schema for Humans configuration file > expand_buttons + 3. [Optional] Property JSON Schema for Humans configuration file > expand_buttons
@@ -120,7 +114,7 @@ Configuration parameters can be provided in several ways:
- 5. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs + 4. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs
@@ -138,7 +132,7 @@ Configuration parameters can be provided in several ways:
- 6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions + 5. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions
@@ -156,7 +150,7 @@ Configuration parameters can be provided in several ways:
- 7. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples + 6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples
@@ -174,7 +168,7 @@ Configuration parameters can be provided in several ways:
- 8. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref + 7. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref
@@ -194,7 +188,7 @@ Configuration parameters can be provided in several ways:
- 9. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth + 8. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth
@@ -217,26 +211,25 @@ In other words, if a schema has a deeply nested element that refers to itself, t
- 10. [Optional]~~ Property JSON Schema for Humans configuration file > deprecated_from_description~~ + 9. [Optional] Property JSON Schema for Humans configuration file > deprecated_from_description
-| | | -| -------------- | ------------ | -| **Type** | `boolean` | -| **Required** | No | -| **Deprecated** | [Deprecated] | -| **Default** | `false` | +| | | +| ------------ | --------- | +| **Type** | `boolean` | +| **Required** | No | +| **Default** | `false` | -**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`. +**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[​Deprecated`.
- 11. [Optional] Property JSON Schema for Humans configuration file > default_from_description + 10. [Optional] Property JSON Schema for Humans configuration file > default_from_description
@@ -256,7 +249,7 @@ The default value from the "default" attribute will be used in priority.
- 12. [Optional] Property JSON Schema for Humans configuration file > copy_css + 11. [Optional] Property JSON Schema for Humans configuration file > copy_css
@@ -274,7 +267,7 @@ The default value from the "default" attribute will be used in priority.
- 13. [Optional] Property JSON Schema for Humans configuration file > copy_js + 12. [Optional] Property JSON Schema for Humans configuration file > copy_js
@@ -294,25 +287,7 @@ This file contains the logic for the anchor links.
- 14. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~ - - -
- -| | | -| -------------- | ------------ | -| **Type** | `string` | -| **Required** | No | -| **Deprecated** | [Deprecated] | - -**Description:** [Deprecated] - -
-
- -
- - 15. [Optional] Property JSON Schema for Humans configuration file > template_name + 13. [Optional] Property JSON Schema for Humans configuration file > template_name
@@ -347,7 +322,7 @@ Must be one of:
- 16. [Optional] Property JSON Schema for Humans configuration file > custom_template_path + 14. [Optional] Property JSON Schema for Humans configuration file > custom_template_path
@@ -369,7 +344,7 @@ If no output file is specified, the extension of the template file will be used
- 17. [Optional] Property JSON Schema for Humans configuration file > show_toc + 15. [Optional] Property JSON Schema for Humans configuration file > show_toc
@@ -387,7 +362,7 @@ If no output file is specified, the extension of the template file will be used
- 18. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml + 16. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml
@@ -405,7 +380,7 @@ If no output file is specified, the extension of the template file will be used
- 19. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links + 17. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links
@@ -425,7 +400,7 @@ This is the old behaviour and is only needed for browsers that do not support HT
- 20. [Optional] Property JSON Schema for Humans configuration file > markdown_options + 18. [Optional] Property JSON Schema for Humans configuration file > markdown_options
@@ -460,7 +435,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21. [Optional] Property JSON Schema for Humans configuration file > template_md_options + 19. [Optional] Property JSON Schema for Humans configuration file > template_md_options
@@ -475,7 +450,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image + 19.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image
@@ -495,7 +470,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers + 19.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers
@@ -515,7 +490,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions + 19.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions
@@ -535,7 +510,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns + 19.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns
@@ -561,7 +536,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | ------------------------------------------------------------------------------------- | ----------- | | [properties_table_columns items](#template_md_options_properties_table_columns_items) | - | -#### 21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items +#### 19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items | | | | ------------ | ------------------ | @@ -584,7 +559,7 @@ Must be one of:
- 22. [Optional] Property JSON Schema for Humans configuration file > with_footer + 20. [Optional] Property JSON Schema for Humans configuration file > with_footer
@@ -602,7 +577,7 @@ Must be one of:
- 23. [Optional] Property JSON Schema for Humans configuration file > footer_show_time + 21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time
@@ -618,5 +593,61 @@ Must be one of:
+
+ + 22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~ + + +
+ +| | | +| -------------- | ------------ | +| **Type** | `boolean` | +| **Required** | No | +| **Deprecated** | [Deprecated] | +| **Default** | `false` | + +**Description:** [Deprecated] + +
+
+ +
+ + 23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~ + + +
+ +| | | +| -------------- | ------------ | +| **Type** | `boolean` | +| **Required** | No | +| **Deprecated** | [Deprecated] | +| **Default** | `true` | + +**Description:** [Deprecated] + +
+
+ +
+ + 24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~ + + +
+ +| | | +| -------------- | ------------ | +| **Type** | `string` | +| **Required** | No | +| **Deprecated** | [Deprecated] | + +**Description:** [Deprecated] + +
+
+ ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) \ No newline at end of file diff --git a/docs/examples/examples_md_nested_default/html_in_description.md b/docs/examples/examples_md_nested_default/html_in_description.md new file mode 100644 index 00000000..ed09277a --- /dev/null +++ b/docs/examples/examples_md_nested_default/html_in_description.md @@ -0,0 +1,81 @@ +# HTML in descriptions + +- [1. [Optional] Property HTML in descriptions > raw_html](#raw_html) +- [2. [Optional] Property HTML in descriptions > html_in_markdown](#html_in_markdown) +- [3. [Optional] Property HTML in descriptions > json_in_markdown](#json_in_markdown) + +**Title:** HTML in descriptions + +| | | +| ------------------------- | ------------------------------------------------------------------------- | +| **Type** | `object` | +| **Required** | No | +| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | + +
+ + 1. [Optional] Property HTML in descriptions > raw_html + + +
+ +**Title:** Some raw HTML + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:**



A link to example.com + +
+
+ +
+ + 2. [Optional] Property HTML in descriptions > html_in_markdown + + +
+ +**Title:** Some HTML in Markdown + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Here is some HTML: +```html +



A link to example.com +``` + +
+
+ +
+ + 3. [Optional] Property HTML in descriptions > json_in_markdown + + +
+ +**Title:** Some JSON in Markdown + +| | | +| ------------ | -------- | +| **Type** | `string` | +| **Required** | No | + +**Description:** Here is some JSON: +```json +{ + "property": "value" +} +``` + +
+
+ +---------------------------------------------------------------------------------------------------------------------------- +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/Configuration.html b/docs/examples/examples_md_nested_with_badges/Configuration.html deleted file mode 100644 index 337b220b..00000000 --- a/docs/examples/examples_md_nested_with_badges/Configuration.html +++ /dev/null @@ -1,360 +0,0 @@ -# JSON Schema for Humans configuration file - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `minify`](#minify) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `description_is_markdown`](#description_is_markdown) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `expand_buttons`](#expand_buttons) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `show_breadcrumbs`](#show_breadcrumbs) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `collapse_long_descriptions`](#collapse_long_descriptions) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `link_to_reused_ref`](#link_to_reused_ref) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `recursive_detection_depth`](#recursive_detection_depth) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `deprecated_from_description`](#deprecated_from_description) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `default_from_description`](#default_from_description) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `copy_css`](#copy_css) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `copy_js`](#copy_js) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `templates_directory`](#templates_directory) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `template_name`](#template_name) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `markdown_options`](#markdown_options) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `template_md_options`](#template_md_options) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `badge_as_image`](#template_md_options_badge_as_image) - -**Title:** JSON Schema for Humans configuration file - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Choose how to generate JSON Schema for Humans documentation file. - -Configuration parameters can be provided in several ways: - -- On the CLI using `--config parameter_name=value` (example: `--config template_name=flat`) -- On the CLI using a config file `--config-file config.json` -- From code, by providing a GenerationConfiguration object to the called generation method. - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `minify` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** Minify the output HTML document. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `description_is_markdown` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** Whether to consider the description as markdown and render it accordingly. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `expand_buttons` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `false` | -| | | - -**Description:** Add an `Expand all` and a `Collapse all` button at the top of the generated documentation. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `show_breadcrumbs` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** For each property, show the relative place of that property in the schema. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `collapse_long_descriptions` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** If a description is considered big, show only the beginning and add a `Read more` button. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `link_to_reused_ref` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** If several `$ref` points to the same definition, only render the documentation for this definition the first time. All other occurrences are replaced by an anchor link to the first occurrence. The first occurrence is the one that is the least nested from the top of the schema and appears first in that nesting level. - -*Note*: If this option is off and the schema contains recursive definitions, the generation will crash! - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `recursive_detection_depth` - - -
- -| Type | `integer` | -| ----------- | --------- | -| **Default** | `25` | -| | | - -**Description:** *Advanced option* -If `link_to_reused_ref` is false and a `$ref` in the schema refers to a parent of itself, we would get a `RecursionError` trying to render the documentation. To avoid this, each reference is checked for circular references. - -This option determines the number of times to recursively follow definitions looking for a circular reference. - -In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `deprecated_from_description` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `false` | -| | | - -**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `default_from_description` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `false` | -| | | - -**Description:** Extract the default value of a property from the description like this: ``[Default `the_default_value`]``. - -The default value from the "default" attribute will be used in priority. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `copy_css` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** Copy `schema_doc.css` to the same directory as `RESULT_FILE` after generation. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `copy_js` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `true` | -| | | - -**Description:** Copy `schema_doc.min.js` to the same directory as `RESULT_FILE` after generation. - -This file contains the logic for the anchor links. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `templates_directory` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The file system path to the directory containing templates, with a default of the `templates` directory within the library source code. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `template_name` - - -
- -| Type | `enum (of string)` | -| ----------- | ------------------ | -| **Default** | `"js"` | -| | | - -**Description:** The name of the set of templates to use to render the documentation. - -`js` is the default and uses javascript for anchor links, collapsible sections and tabs. `flat` uses no javascript, but has no interactivity. - -Must be one of: -* "flat" -* "js" -* "md" - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `markdown_options` - - -
- -| Type | `object` | -| ------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Default** | `{"fenced-code-blocks": {"break-on-newline": true, "cssclass": "highlight jumbotron", "tables": null}, "tables": null}` | -| | | - -**Description:** [Markdown 2 options](https://github.com/trentm/python-markdown2/wiki/Extras) for the descriptions. `description_is_markdown` must be true for this to have any effect. - -**WARNING** -Adding an extra, even if the value is false, will activate it. For example `{"break-on-newline": false}` will activate the `break-on-newline` extra. - -**Example:** - -```json -{ - "fenced-code-blocks": { - "cssclass": "highlight jumbotron" - }, - "tables": null, - "break-on-newline": true, - "cuddled-lists": true -} -``` - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `template_md_options` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** specific options to md template - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `badge_as_image` - - -
- -| Type | `boolean` | -| ----------- | --------- | -| **Default** | `false` | -| | | - -**Description:** if true generate badges(eg: optional, required) using embedded image (https://img.shields.io). - - if false, use text instead - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/Configuration.md b/docs/examples/examples_md_nested_with_badges/Configuration.md index e6985f73..0f4786b0 100644 --- a/docs/examples/examples_md_nested_with_badges/Configuration.md +++ b/docs/examples/examples_md_nested_with_badges/Configuration.md @@ -1,33 +1,34 @@ # JSON Schema for Humans configuration file -- [1. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify) -- [2. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown](#description_is_markdown) -- [3. [Optional] Property JSON Schema for Humans configuration file > allow_html_description](#allow_html_description) -- [4. [Optional] Property JSON Schema for Humans configuration file > expand_buttons](#expand_buttons) -- [5. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs](#show_breadcrumbs) -- [6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions](#collapse_long_descriptions) -- [7. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples](#collapse_long_examples) -- [8. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref](#link_to_reused_ref) -- [9. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth](#recursive_detection_depth) -- [10. [Optional]~~ Property JSON Schema for Humans configuration file > deprecated_from_description~~](#deprecated_from_description) -- [11. [Optional] Property JSON Schema for Humans configuration file > default_from_description](#default_from_description) -- [12. [Optional] Property JSON Schema for Humans configuration file > copy_css](#copy_css) -- [13. [Optional] Property JSON Schema for Humans configuration file > copy_js](#copy_js) -- [14. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory) -- [15. [Optional] Property JSON Schema for Humans configuration file > template_name](#template_name) -- [16. [Optional] Property JSON Schema for Humans configuration file > custom_template_path](#custom_template_path) -- [17. [Optional] Property JSON Schema for Humans configuration file > show_toc](#show_toc) -- [18. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml](#examples_as_yaml) -- [19. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links](#old_anchor_links) -- [20. [Optional] Property JSON Schema for Humans configuration file > markdown_options](#markdown_options) -- [21. [Optional] Property JSON Schema for Humans configuration file > template_md_options](#template_md_options) - - [21.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image](#template_md_options_badge_as_image) - - [21.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers](#template_md_options_show_heading_numbers) - - [21.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions](#template_md_options_show_array_restrictions) - - [21.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns](#template_md_options_properties_table_columns) - - [21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2) -- [22. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer) -- [23. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time) +- [1. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown](#description_is_markdown) +- [2. [Optional] Property JSON Schema for Humans configuration file > description_safe_mode](#description_safe_mode) +- [3. [Optional] Property JSON Schema for Humans configuration file > expand_buttons](#expand_buttons) +- [4. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs](#show_breadcrumbs) +- [5. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions](#collapse_long_descriptions) +- [6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples](#collapse_long_examples) +- [7. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref](#link_to_reused_ref) +- [8. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth](#recursive_detection_depth) +- [9. [Optional] Property JSON Schema for Humans configuration file > deprecated_from_description](#deprecated_from_description) +- [10. [Optional] Property JSON Schema for Humans configuration file > default_from_description](#default_from_description) +- [11. [Optional] Property JSON Schema for Humans configuration file > copy_css](#copy_css) +- [12. [Optional] Property JSON Schema for Humans configuration file > copy_js](#copy_js) +- [13. [Optional] Property JSON Schema for Humans configuration file > template_name](#template_name) +- [14. [Optional] Property JSON Schema for Humans configuration file > custom_template_path](#custom_template_path) +- [15. [Optional] Property JSON Schema for Humans configuration file > show_toc](#show_toc) +- [16. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml](#examples_as_yaml) +- [17. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links](#old_anchor_links) +- [18. [Optional] Property JSON Schema for Humans configuration file > markdown_options](#markdown_options) +- [19. [Optional] Property JSON Schema for Humans configuration file > template_md_options](#template_md_options) + - [19.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image](#template_md_options_badge_as_image) + - [19.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers](#template_md_options_show_heading_numbers) + - [19.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions](#template_md_options_show_array_restrictions) + - [19.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns](#template_md_options_properties_table_columns) + - [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2) +- [20. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer) +- [21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time) +- [22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description) +- [23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify) +- [24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory) **Title:** JSON Schema for Humans configuration file @@ -46,25 +47,7 @@ Configuration parameters can be provided in several ways:
- 1. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~ - - -
- -| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `boolean` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | -| **Default** | `true` | - -**Description:** [Deprecated] - -
-
- -
- - 2. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown + 1. [Optional] Property JSON Schema for Humans configuration file > description_is_markdown
@@ -74,31 +57,43 @@ Configuration parameters can be provided in several ways: | **Type** | `boolean` | | **Default** | `true` | -**Description:** Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. +**Description:** (HTML outputs only) +Whether to consider the description as Markdown and render it accordingly.
- 3. [Optional] Property JSON Schema for Humans configuration file > allow_html_description + 2. [Optional] Property JSON Schema for Humans configuration file > description_safe_mode
-| | | -| ----------- | --------- | -| **Type** | `boolean` | -| **Default** | `false` | +| | | +| ----------- | -------------------------- | +| **Type** | `enum (of null or string)` | +| **Default** | `"escape"` | + +**Description:** (HTML outputs only) +(Only used with `description_is_markdown`) +How are HTML tags in descriptions handled. Correspond to the `safe_mode` option of the markdown2 library. -**Description:** Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks +- "escape": Escape all HTML tags in descriptions +- "replace": Replace HTML tags with `[HTML_REMOVED]` +- null: Allow HTML in descriptions + +Must be one of: +* null +* "escape" +* "replace"
- 4. [Optional] Property JSON Schema for Humans configuration file > expand_buttons + 3. [Optional] Property JSON Schema for Humans configuration file > expand_buttons
@@ -115,7 +110,7 @@ Configuration parameters can be provided in several ways:
- 5. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs + 4. [Optional] Property JSON Schema for Humans configuration file > show_breadcrumbs
@@ -132,7 +127,7 @@ Configuration parameters can be provided in several ways:
- 6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions + 5. [Optional] Property JSON Schema for Humans configuration file > collapse_long_descriptions
@@ -149,7 +144,7 @@ Configuration parameters can be provided in several ways:
- 7. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples + 6. [Optional] Property JSON Schema for Humans configuration file > collapse_long_examples
@@ -166,7 +161,7 @@ Configuration parameters can be provided in several ways:
- 8. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref + 7. [Optional] Property JSON Schema for Humans configuration file > link_to_reused_ref
@@ -185,7 +180,7 @@ Configuration parameters can be provided in several ways:
- 9. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth + 8. [Optional] Property JSON Schema for Humans configuration file > recursive_detection_depth
@@ -207,25 +202,24 @@ In other words, if a schema has a deeply nested element that refers to itself, t
- 10. [Optional]~~ Property JSON Schema for Humans configuration file > deprecated_from_description~~ + 9. [Optional] Property JSON Schema for Humans configuration file > deprecated_from_description
-| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `boolean` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | -| **Default** | `false` | +| | | +| ----------- | --------- | +| **Type** | `boolean` | +| **Default** | `false` | -**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`. +**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[​Deprecated`.
- 11. [Optional] Property JSON Schema for Humans configuration file > default_from_description + 10. [Optional] Property JSON Schema for Humans configuration file > default_from_description
@@ -244,7 +238,7 @@ The default value from the "default" attribute will be used in priority.
- 12. [Optional] Property JSON Schema for Humans configuration file > copy_css + 11. [Optional] Property JSON Schema for Humans configuration file > copy_css
@@ -261,7 +255,7 @@ The default value from the "default" attribute will be used in priority.
- 13. [Optional] Property JSON Schema for Humans configuration file > copy_js + 12. [Optional] Property JSON Schema for Humans configuration file > copy_js
@@ -280,24 +274,7 @@ This file contains the logic for the anchor links.
- 14. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~ - - -
- -| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `string` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - -**Description:** [Deprecated] - -
-
- -
- - 15. [Optional] Property JSON Schema for Humans configuration file > template_name + 13. [Optional] Property JSON Schema for Humans configuration file > template_name
@@ -331,7 +308,7 @@ Must be one of:
- 16. [Optional] Property JSON Schema for Humans configuration file > custom_template_path + 14. [Optional] Property JSON Schema for Humans configuration file > custom_template_path
@@ -352,7 +329,7 @@ If no output file is specified, the extension of the template file will be used
- 17. [Optional] Property JSON Schema for Humans configuration file > show_toc + 15. [Optional] Property JSON Schema for Humans configuration file > show_toc
@@ -369,7 +346,7 @@ If no output file is specified, the extension of the template file will be used
- 18. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml + 16. [Optional] Property JSON Schema for Humans configuration file > examples_as_yaml
@@ -386,7 +363,7 @@ If no output file is specified, the extension of the template file will be used
- 19. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links + 17. [Optional] Property JSON Schema for Humans configuration file > old_anchor_links
@@ -405,7 +382,7 @@ This is the old behaviour and is only needed for browsers that do not support HT
- 20. [Optional] Property JSON Schema for Humans configuration file > markdown_options + 18. [Optional] Property JSON Schema for Humans configuration file > markdown_options
@@ -439,7 +416,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21. [Optional] Property JSON Schema for Humans configuration file > template_md_options + 19. [Optional] Property JSON Schema for Humans configuration file > template_md_options
@@ -453,7 +430,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image + 19.1. [Optional] Property JSON Schema for Humans configuration file > template_md_options > badge_as_image
@@ -472,7 +449,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers + 19.2. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_heading_numbers
@@ -491,7 +468,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions + 19.3. [Optional] Property JSON Schema for Humans configuration file > template_md_options > show_array_restrictions
@@ -510,7 +487,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br
- 21.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns + 19.4. [Optional] Property JSON Schema for Humans configuration file > template_md_options > properties_table_columns
@@ -535,7 +512,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | ------------------------------------------------------------------------------------- | ----------- | | [properties_table_columns items](#template_md_options_properties_table_columns_items) | - | -#### 21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items +#### 19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items | | | | -------- | ------------------ | @@ -557,7 +534,7 @@ Must be one of:
- 22. [Optional] Property JSON Schema for Humans configuration file > with_footer + 20. [Optional] Property JSON Schema for Humans configuration file > with_footer
@@ -574,7 +551,7 @@ Must be one of:
- 23. [Optional] Property JSON Schema for Humans configuration file > footer_show_time + 21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time
@@ -589,5 +566,58 @@ Must be one of:
+
+ + 22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~ + + +
+ +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `boolean` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | +| **Default** | `false` | + +**Description:** [Deprecated] + +
+
+ +
+ + 23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~ + + +
+ +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `boolean` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | +| **Default** | `true` | + +**Description:** [Deprecated] + +
+
+ +
+ + 24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~ + + +
+ +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `string` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | + +**Description:** [Deprecated] + +
+
+ ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/additional_properties.html b/docs/examples/examples_md_nested_with_badges/additional_properties.html deleted file mode 100644 index 2b5f295b..00000000 --- a/docs/examples/examples_md_nested_with_badges/additional_properties.html +++ /dev/null @@ -1,117 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `subType1`](#subType1) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `subProp1`](#subType1_subProp1) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `subType2`](#subType2) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `subProp2`](#subType2_subProp2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `additionalProperties`](#additionalProperties) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `propA`](#additionalProperties_propA) - -**Title:** Person - -| Type | `object` | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Should-conform-blue)](#additionalProperties "Each additional property must conform to the following schema") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `subType1` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------ | -| **Additional properties** | [![badge](https://img.shields.io/badge/Not+allowed-red)](# "Additional Properties not allowed.") | -| | | - -**Description:** A sub type with additionalProperties false. - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `subProp1` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `subType2` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** A sub type with additionalProperties true. - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `subProp2` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `additionalProperties` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** additionalProperties schema. - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `propA` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/anyOf_option_names.html b/docs/examples/examples_md_nested_with_badges/anyOf_option_names.html deleted file mode 100644 index 83a49ce5..00000000 --- a/docs/examples/examples_md_nested_with_badges/anyOf_option_names.html +++ /dev/null @@ -1,76 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Required-blue) Property `storage`](#storage) - - [Property `diskDevice`](#storage_anyOf_i0) - - [Property `diskUUID`](#storage_anyOf_i1) - - [Property ``](#storage_anyOf_i2) - - [Property `tmpfs`](#storage_anyOf_i3) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** JSON Schema for an fstab entry - -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `storage` - - -
- -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- -| Any of(Option) | -| ------------------------------- | -| [diskDevice](#storage_anyOf_i0) | -| [diskUUID](#storage_anyOf_i1) | -| [item 2](#storage_anyOf_i2) | -| [tmpfs](#storage_anyOf_i3) | -| | - -### Property `diskDevice` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskDevice | -| | | - -### Property `diskUUID` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskUUID | -| | | - -### Property `` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### Property `tmpfs` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/tmpfs | -| | | - -
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/array.html b/docs/examples/examples_md_nested_with_badges/array.html deleted file mode 100644 index e75d6c97..00000000 --- a/docs/examples/examples_md_nested_with_badges/array.html +++ /dev/null @@ -1,106 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `fruits`](#fruits) - - [items](#autogenerated_heading_2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `vegetables`](#vegetables) - - [items](#autogenerated_heading_3) - - [![badge](https://img.shields.io/badge/Required-blue) Property `veggieName`](#vegetables_items_veggieName) - - [![badge](https://img.shields.io/badge/Required-blue) Property `veggieLike`](#vegetables_items_veggieLike) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** A schema with an array - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `fruits` - - -
- -| Type | `array of string` | -| ---- | ----------------- | -| | | - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#fruits_items) | - | -| | | - -### items - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `vegetables` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [veggie](#vegetables_items) | - | -| | | - -### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/veggie | -| | | - -
- - -#### ![badge](https://img.shields.io/badge/Required-blue) Property `veggieName` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The name of the vegetable. - -
-
- -
- - -#### ![badge](https://img.shields.io/badge/Required-blue) Property `veggieLike` - - -
- -| Type | `boolean` | -| ---- | --------- | -| | | - -**Description:** Do I like this vegetable? - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/array_additionalItems.html b/docs/examples/examples_md_nested_with_badges/array_additionalItems.html deleted file mode 100644 index d501cb4a..00000000 --- a/docs/examples/examples_md_nested_with_badges/array_additionalItems.html +++ /dev/null @@ -1,154 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `address`](#address) - - [a number](#autogenerated_heading_2) - - [Auto generated title](#autogenerated_heading_3) - - [again a string](#autogenerated_heading_4) - - [finally an enum](#autogenerated_heading_5) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `addressLines`](#addressLines) - - [Auto generated title](#autogenerated_heading_6) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `arrayEmpty`](#arrayEmpty) - - [items](#autogenerated_heading_7) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** A little food fun - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `address` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -| Each item of this array must be | Description | -| ------------------------------------ | -------------------- | -| [a number](#address_items_i0) | - | -| [item 1](#address_items_i1) | followed by a string | -| [again a string](#address_items_i2) | - | -| [finally an enum](#address_items_i3) | - | -| | | - -### a number - -**Title:** a number - -| Type | `number` | -| ---- | -------- | -| | | - -### Auto generated title - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** followed by a string - -### again a string - -**Title:** again a string - -| Type | `enum (of string)` | -| ---- | ------------------ | -| | | - -Must be one of: -* "Street" -* "Avenue" -* "Boulevard" - -### finally an enum - -**Title:** finally an enum - -| Type | `enum (of string)` | -| ---- | ------------------ | -| | | - -Must be one of: -* "NW" -* "NE" -* "SW" -* "SE" - -**Example:** - -```json -[ - 1600, - "Pennsylvania", - "Avenue", - "NW", - "Washington" -] -``` - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `addressLines` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -**Description:** list of address lines - -| Each item of this array must be | Description | -| -------------------------------- | ----------- | -| [item 0](#addressLines_items_i0) | - | -| | | - -### Auto generated title - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `arrayEmpty` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#arrayEmpty_items) | - | -| | | - -### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/array_advanced.html b/docs/examples/examples_md_nested_with_badges/array_advanced.html deleted file mode 100644 index bf3f08ca..00000000 --- a/docs/examples/examples_md_nested_with_badges/array_advanced.html +++ /dev/null @@ -1,80 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `fruits`](#fruits) - - [items](#autogenerated_heading_2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `vegetables`](#vegetables) - - [items](#autogenerated_heading_3) - - [At least one of the items must be](#autogenerated_heading_4) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** A little food fun - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `fruits` - - -
- -| Type | `array of string` | -| ---- | ----------------- | -| | | - -**Description:** 5 to 8 fruits that you like - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#fruits_items) | - | -| | | - -### items - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `vegetables` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#vegetables_items) | - | -| | | - -### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### At least one of the items must be - -| Type | `const` | -| ---- | ------- | -| | | - -Specific value: `"eggplant"` - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/basic.html b/docs/examples/examples_md_nested_with_badges/basic.html deleted file mode 100644 index 1a3971a4..00000000 --- a/docs/examples/examples_md_nested_with_badges/basic.html +++ /dev/null @@ -1,122 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`](#lastName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `age`](#age) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `driverLicenseId`](#driverLicenseId) - - [Property `no driver licence`](#driverLicenseId_allOf_i0) - - [Property `driver licence id`](#driverLicenseId_allOf_i1) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's first name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's last name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `age` - - -
- -**Title:** Person - -| Type | `integer` | -| ---- | --------- | -| | | - -**Description:** Age in years which must be equal to or greater than zero. - -| Restrictions | | -| ------------ | ------ | -| **Minimum** | ≥ 0 | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `driverLicenseId` - - -
- -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- -| All of(Requirement) | -| ---------------------------------------------- | -| [no driver licence](#driverLicenseId_allOf_i0) | -| [driver licence id](#driverLicenseId_allOf_i1) | -| | - -### Property `no driver licence` - -**Title:** no driver licence - -| Type | `null` | -| ---- | ------ | -| | | - -### Property `driver licence id` - -**Title:** driver licence id - -| Type | `string` | -| ---- | -------- | -| | | - -
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/break_on_newline.html b/docs/examples/examples_md_nested_with_badges/break_on_newline.html deleted file mode 100644 index 79f30e4e..00000000 --- a/docs/examples/examples_md_nested_with_badges/break_on_newline.html +++ /dev/null @@ -1,31 +0,0 @@ -# Hello - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `property1`](#property1) - -**Title:** Hello - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `property1` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Line1 -Line2 - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/circular.html b/docs/examples/examples_md_nested_with_badges/circular.html deleted file mode 100644 index 77663d14..00000000 --- a/docs/examples/examples_md_nested_with_badges/circular.html +++ /dev/null @@ -1,50 +0,0 @@ -# Circular reference Schema - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `person`](#person) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `a1`](#person_a1) - -**Title:** Circular reference Schema - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `person` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/a | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `a1` - - -
- -| Type | `string` | -| -------------- | ------------------ | -| **Default** | `"Default from c"` | -| **Defined in** | #/definitions/b | -| | | - -**Description:** Description from b - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/combining_not.html b/docs/examples/examples_md_nested_with_badges/combining_not.html deleted file mode 100644 index a54ae3e8..00000000 --- a/docs/examples/examples_md_nested_with_badges/combining_not.html +++ /dev/null @@ -1,36 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Required-blue) Property `not_a_string`](#not_a_string) - - [Must **not** be](#autogenerated_heading_2) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Test schema with a not - -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `not_a_string` - - -
- -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### Must **not** be - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/combining_oneOf.html b/docs/examples/examples_md_nested_with_badges/combining_oneOf.html deleted file mode 100644 index 2e843d8a..00000000 --- a/docs/examples/examples_md_nested_with_badges/combining_oneOf.html +++ /dev/null @@ -1,77 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Required-blue) Property `storage`](#storage) - - [Property `diskDevice`](#storage_oneOf_i0) - - [Property `diskUUID`](#storage_oneOf_i1) - - [Property `nfs`](#storage_oneOf_i2) - - [Property `tmpfs`](#storage_oneOf_i3) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** JSON Schema for an fstab entry - -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `storage` - - -
- -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- -| One of(Option) | -| ------------------------------- | -| [diskDevice](#storage_oneOf_i0) | -| [diskUUID](#storage_oneOf_i1) | -| [nfs](#storage_oneOf_i2) | -| [tmpfs](#storage_oneOf_i3) | -| | - -### Property `diskDevice` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskDevice | -| | | - -### Property `diskUUID` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskUUID | -| | | - -### Property `nfs` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/nfs | -| | | - -### Property `tmpfs` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/tmpfs | -| | | - -
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/conditional_subschema.html b/docs/examples/examples_md_nested_with_badges/conditional_subschema.html deleted file mode 100644 index a27bd595..00000000 --- a/docs/examples/examples_md_nested_with_badges/conditional_subschema.html +++ /dev/null @@ -1,106 +0,0 @@ -# Schema Docs - -- [If (country = "United States of America")](#autogenerated_heading_2) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code`](#then_postal_code) -- [Else (i.e. country != "United States of America")](#autogenerated_heading_3) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code`](#else_postal_code) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `street_address`](#street_address) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `country`](#country) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -## If (country = "United States of America") - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```[0-9]{5}(-[0-9]{4})?``` [Test](https://regex101.com/?regex=%5B0-9%5D%7B5%7D%28-%5B0-9%5D%7B4%7D%29%3F) | -| | | - -
-
- -## Else (i.e. country != "United States of America") - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```[A-Z][0-9][A-Z] [0-9][A-Z][0-9]``` [Test](https://regex101.com/?regex=%5BA-Z%5D%5B0-9%5D%5BA-Z%5D+%5B0-9%5D%5BA-Z%5D%5B0-9%5D) | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `street_address` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `country` - - -
- -| Type | `enum (of string)` | -| ---- | ------------------ | -| | | - -Must be one of: -* "United States of America" -* "Canada" - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/conditional_subschema_no_else.html b/docs/examples/examples_md_nested_with_badges/conditional_subschema_no_else.html deleted file mode 100644 index c7ac1286..00000000 --- a/docs/examples/examples_md_nested_with_badges/conditional_subschema_no_else.html +++ /dev/null @@ -1,172 +0,0 @@ -# Schema Docs - -- [Property ``](#allOf_i0) - - [If (country = "United States of America")](#autogenerated_heading_2) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code`](#allOf_i0_then_postal_code) -- [Property ``](#allOf_i1) - - [If (country = "Canada")](#autogenerated_heading_3) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code`](#allOf_i1_then_postal_code) -- [Property ``](#allOf_i2) - - [If (country = "Netherlands")](#autogenerated_heading_4) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code`](#allOf_i2_then_postal_code) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `street_address`](#street_address) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `country`](#country) - -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- -| All of(Requirement) | -| ------------------- | -| [item 0](#allOf_i0) | -| [item 1](#allOf_i1) | -| [item 2](#allOf_i2) | -| | - -## Property `` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### If (country = "United States of America") - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```[0-9]{5}(-[0-9]{4})?``` [Test](https://regex101.com/?regex=%5B0-9%5D%7B5%7D%28-%5B0-9%5D%7B4%7D%29%3F) | -| | | - -
-
- -## Property `` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### If (country = "Canada") - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```[A-Z][0-9][A-Z] [0-9][A-Z][0-9]``` [Test](https://regex101.com/?regex=%5BA-Z%5D%5B0-9%5D%5BA-Z%5D+%5B0-9%5D%5BA-Z%5D%5B0-9%5D) | -| | | - -
-
- -## Property `` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -### If (country = "Netherlands") - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `postal_code` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```[0-9]{4} [A-Z]{2}``` [Test](https://regex101.com/?regex=%5B0-9%5D%7B4%7D+%5BA-Z%5D%7B2%7D) | -| | | - -
-
- -
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `street_address` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `country` - - -
- -| Type | `enum (of string)` | -| ---- | ------------------ | -| | | - -Must be one of: -* "United States of America" -* "Canada" -* "Netherlands" - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/defaults.html b/docs/examples/examples_md_nested_with_badges/defaults.html deleted file mode 100644 index 2e43996c..00000000 --- a/docs/examples/examples_md_nested_with_badges/defaults.html +++ /dev/null @@ -1,52 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `a`](#a) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `b`](#b) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `a` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Default** | `"Default from a"` | -| **Defined in** | #/definitions/common | -| | | - -**Description:** Description of a - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `b` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Default** | `"Default from b"` | -| **Same definition as** | `[a](#a)` | -| | | - -**Description:** A common description - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/deprecated.html b/docs/examples/examples_md_nested_with_badges/deprecated.html deleted file mode 100644 index 38e5068d..00000000 --- a/docs/examples/examples_md_nested_with_badges/deprecated.html +++ /dev/null @@ -1,68 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow)~~ Property `deprecated1`~~](#deprecated1) -- [![badge](https://img.shields.io/badge/Optional-yellow)~~ Property `deprecated2`~~](#deprecated2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `not_deprecated`](#not_deprecated) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Test schema with deprecated in description - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)~~ Property `deprecated1`~~ - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Deprecated** | ![badge](https://img.shields.io/badge/Deprecated-red) | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** [Deprecated] - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)~~ Property `deprecated2`~~ - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Deprecated** | ![badge](https://img.shields.io/badge/Deprecated-red) | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** [Deprecated - Use `not_deprecated` instead] - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `not_deprecated` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/description_from_ref.html b/docs/examples/examples_md_nested_with_badges/description_from_ref.html deleted file mode 100644 index aa965478..00000000 --- a/docs/examples/examples_md_nested_with_badges/description_from_ref.html +++ /dev/null @@ -1,53 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `name`](#name) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `alignment`](#alignment) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------ | -| **Additional properties** | [![badge](https://img.shields.io/badge/Not+allowed-red)](# "Additional Properties not allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `name` - - -
- -| Type | `string` | -| -------------- | --------------------------- | -| **Defined in** | #/definitions/filled_string | -| | | - -**Description:** a filled string - -| Restrictions | | -| -------------- | - | -| **Min length** | 1 | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `alignment` - - -
- -| Type | `string` | -| ---------------------- | --------------- | -| **Same definition as** | `[name](#name)` | -| | | - -**Description:** a filled string - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/description_markdown.html b/docs/examples/examples_md_nested_with_badges/description_markdown.html deleted file mode 100644 index ac3664bf..00000000 --- a/docs/examples/examples_md_nested_with_badges/description_markdown.html +++ /dev/null @@ -1,15 +0,0 @@ -# Delivery Schema - -**Title:** Delivery Schema - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** DOC -* List 1 -* List 2 - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/description_with_ref.html b/docs/examples/examples_md_nested_with_badges/description_with_ref.html deleted file mode 100644 index 0b719df4..00000000 --- a/docs/examples/examples_md_nested_with_badges/description_with_ref.html +++ /dev/null @@ -1,68 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Required-blue) Property `outer`](#outer) - - [![badge](https://img.shields.io/badge/Required-blue) Property `inner`](#outer_inner) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `outer2`](#outer2) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------ | -| **Additional properties** | [![badge](https://img.shields.io/badge/Not+allowed-red)](# "Additional Properties not allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `outer` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/inner schema | -| | | - -**Description:** We should see this - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `inner` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** inner description - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `outer2` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[outer](#outer)` | -| | | - -**Description:** We should see this too - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/geo.html b/docs/examples/examples_md_nested_with_badges/geo.html deleted file mode 100644 index 8d0d1257..00000000 --- a/docs/examples/examples_md_nested_with_badges/geo.html +++ /dev/null @@ -1,58 +0,0 @@ -# Longitude and Latitude Values - -- [![badge](https://img.shields.io/badge/Required-blue) Property `latitude`](#latitude) -- [![badge](https://img.shields.io/badge/Required-blue) Property `longitude`](#longitude) - -**Title:** Longitude and Latitude Values - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** A geographical coordinate. - -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `latitude` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -| Restrictions | | -| ------------ | -------- | -| **Minimum** | ≥ -90 | -| **Maximum** | ≤ 90 | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Required-blue) Property `longitude` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -| Restrictions | | -| ------------ | --------- | -| **Minimum** | ≥ -180 | -| **Maximum** | ≤ 180 | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/html_in_description.md b/docs/examples/examples_md_nested_with_badges/html_in_description.md new file mode 100644 index 00000000..90d7c297 --- /dev/null +++ b/docs/examples/examples_md_nested_with_badges/html_in_description.md @@ -0,0 +1,77 @@ +# HTML in descriptions + +- [1. [Optional] Property HTML in descriptions > raw_html](#raw_html) +- [2. [Optional] Property HTML in descriptions > html_in_markdown](#html_in_markdown) +- [3. [Optional] Property HTML in descriptions > json_in_markdown](#json_in_markdown) + +**Title:** HTML in descriptions + +| | | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| **Type** | `object` | +| **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | + +
+ + 1. [Optional] Property HTML in descriptions > raw_html + + +
+ +**Title:** Some raw HTML + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:**



A link to example.com + +
+
+ +
+ + 2. [Optional] Property HTML in descriptions > html_in_markdown + + +
+ +**Title:** Some HTML in Markdown + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:** Here is some HTML: +```html +



A link to example.com +``` + +
+
+ +
+ + 3. [Optional] Property HTML in descriptions > json_in_markdown + + +
+ +**Title:** Some JSON in Markdown + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:** Here is some JSON: +```json +{ + "property": "value" +} +``` + +
+
+ +---------------------------------------------------------------------------------------------------------------------------- +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/html_in_patterns.html b/docs/examples/examples_md_nested_with_badges/html_in_patterns.html deleted file mode 100644 index d3b98b30..00000000 --- a/docs/examples/examples_md_nested_with_badges/html_in_patterns.html +++ /dev/null @@ -1,13 +0,0 @@ -# Schema Docs - -| Type | `string` | -| ---- | -------- | -| | | - -| Restrictions | | -| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^(<>\|<>)$``` [Test](https://regex101.com/?regex=%5E%28%3C%3Cvariable%3A%28%5B-%2B%2F%2A0-9A-Za-z_%5D%2B%29%3E%3E%7C%3C%3Cauto%3E%3E%29%24) | -| | | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/long_description.html b/docs/examples/examples_md_nested_with_badges/long_description.html deleted file mode 100644 index 54f0f9c2..00000000 --- a/docs/examples/examples_md_nested_with_badges/long_description.html +++ /dev/null @@ -1,30 +0,0 @@ -# Long description - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `it_s_hard_to_explain`](#it_s_hard_to_explain) - -**Title:** Long description - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `it_s_hard_to_explain` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** This property is really complicated. To explain it we need a whole lot of text, I'm telling you. It all started in 1919 when the children were playing outside and not with computers like kids these days. At the time, I thought to myself "I should create a JSON Schema with a property that is really hard to explain". I did not know what a JSON schema was, in fact I was not alive at the time, but that's what happened, trust me. Anyway this property represents your dreams, but like if your dreams was the reality, but not really. I told you it was hard to explain... In case this is not long enough, here is a Fable of La Fontaine: Rien ne sert de courir ; il faut partir à point. Le Lièvre et la Tortue en sont un témoignage. Gageons, dit celle-ci, que vous n'atteindrez point Sitôt que moi ce but. — Sitôt ? Êtes-vous sage ? Repartit l'animal léger. Ma commère, il vous faut purger Avec quatre grains d'ellébore. — Sage ou non, je parie encore. Ainsi fut fait : et de tous deux On mit près du but les enjeux : Savoir quoi, ce n'est pas l'affaire, Ni de quel juge l'on convint. Notre Lièvre n'avait que quatre pas à faire ; J'entends de ceux qu'il fait lorsque prêt d'être atteint Il s'éloigne des chiens, les renvoie aux Calendes, Et leur fait arpenter les landes. Ayant, dis-je, du temps de reste pour brouter, Pour dormir, et pour écouter D'où vient le vent, il laisse la Tortue Aller son train de Sénateur. Elle part, elle s'évertue ; Elle se hâte avec lenteur. Lui cependant méprise une telle victoire, Tient la gageure à peu de gloire, Croit qu'il y va de son honneur De partir tard. Il broute, il se repose, Il s'amuse à toute autre chose Qu'à la gageure. À la fin quand il vit Que l'autre touchait presque au bout de la carrière, Il partit comme un trait ; mais les élans qu'il fit Furent vains : la Tortue arriva la première. Eh bien ! lui cria-t-elle, avais-je pas raison ? De quoi vous sert votre vitesse ? Moi, l'emporter ! et que serait-ce Si vous portiez une maison ? - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/multiple_types.html b/docs/examples/examples_md_nested_with_badges/multiple_types.html deleted file mode 100644 index 0a1bbff8..00000000 --- a/docs/examples/examples_md_nested_with_badges/multiple_types.html +++ /dev/null @@ -1,89 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`](#lastName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `age`](#age) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anything`](#anything) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's first name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName` - - -
- -| Type | `string or null` | -| ---- | ---------------- | -| | | - -**Description:** The person's last name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `age` - - -
- -| Type | `integer or number` | -| ---- | ------------------- | -| | | - -**Description:** Age in years which must be equal to or greater than zero. - -| Restrictions | | -| ------------ | ------ | -| **Minimum** | ≥ 0 | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anything` - - -
- -| Type | `integer, string, number or null` | -| ---- | --------------------------------- | -| | | - -**Description:** Ay other info you like - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/pattern_properties.html b/docs/examples/examples_md_nested_with_badges/pattern_properties.html deleted file mode 100644 index 25c22846..00000000 --- a/docs/examples/examples_md_nested_with_badges/pattern_properties.html +++ /dev/null @@ -1,116 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`](#lastName) -- [![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `$[a-c][0-9]^`](#pattern1) - - [![badge](https://img.shields.io/badge/Required-blue) Property `rating`](#pattern1_rating) - - [![badge](https://img.shields.io/badge/Required-blue) Property `review`](#pattern1_review) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's first name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's last name. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `$[a-c][0-9]^` -> All property whose name matches the regular expression -```$[a-c][0-9]^``` ([Test](https://regex101.com/?regex=%24%5Ba-c%5D%5B0-9%5D%5E)) -must respect the following conditions - - -
- -**Title:** paperSize - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Review of a paper size. - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `rating` - - -
- -**Title:** Rating - -| Type | `integer` | -| ---- | --------- | -| | | - -**Description:** Numerical rating for paper size. - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `review` - - -
- -**Title:** Review - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Narrative review of the paper size. - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/pattern_properties_html_id.html b/docs/examples/examples_md_nested_with_badges/pattern_properties_html_id.html deleted file mode 100644 index 885e3bb5..00000000 --- a/docs/examples/examples_md_nested_with_badges/pattern_properties_html_id.html +++ /dev/null @@ -1,125 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `not_a_pattern`](#not_a_pattern) - - [![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `.$`](#not_a_pattern_pattern1) -- [![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `.*`](#pattern1) -- [![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `..`](#pattern2) -- [![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `^.`](#pattern3) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `not_a_pattern` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `.$` -> All property whose name matches the regular expression -```.$``` ([Test](https://regex101.com/?regex=.%24)) -must respect the following conditions - - -
- -**Title:** Title 4 - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Description 4 - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `.*` -> All property whose name matches the regular expression -```.*``` ([Test](https://regex101.com/?regex=.%2A)) -must respect the following conditions - - -
- -**Title:** Title 1 - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Description 1 - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `..` -> All property whose name matches the regular expression -```..``` ([Test](https://regex101.com/?regex=..)) -must respect the following conditions - - -
- -**Title:** Title 2 - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Description 2 - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow)Pattern Property `^.` -> All property whose name matches the regular expression -```^.``` ([Test](https://regex101.com/?regex=%5E.)) -must respect the following conditions - - -
- -**Title:** Title 3 - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Description 3 - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/recursive.html b/docs/examples/examples_md_nested_with_badges/recursive.html deleted file mode 100644 index 97a006b9..00000000 --- a/docs/examples/examples_md_nested_with_badges/recursive.html +++ /dev/null @@ -1,66 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `person`](#person) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `children`](#person_children) - - [items](#autogenerated_heading_2) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `person` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/person | -| | | - -**Description:** A human being - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `children` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -**Description:** The children they had - -| Each item of this array must be | Description | -| -------------------------------- | ------------- | -| [person](#person_children_items) | A human being | -| | | - -#### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[person](#person)` | -| | | - -**Description:** A human being - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/recursive_array.html b/docs/examples/examples_md_nested_with_badges/recursive_array.html deleted file mode 100644 index 05eca1d6..00000000 --- a/docs/examples/examples_md_nested_with_badges/recursive_array.html +++ /dev/null @@ -1,80 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `person`](#person) - - [items](#autogenerated_heading_2) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `children`](#person_items_children) - - [items](#autogenerated_heading_3) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `person` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -**Description:** A list of people - -| Each item of this array must be | Description | -| ------------------------------- | ------------- | -| [person](#person_items) | A human being | -| | | - -### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/person | -| | | - -**Description:** A human being - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `children` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -**Description:** The children they had - -| Each item of this array must be | Description | -| -------------------------------------- | ------------- | -| [person](#person_items_children_items) | A human being | -| | | - -#### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[person](#person_items)` | -| | | - -**Description:** A human being - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/recursive_parent_in_definition.html b/docs/examples/examples_md_nested_with_badges/recursive_parent_in_definition.html deleted file mode 100644 index 9d6db2bb..00000000 --- a/docs/examples/examples_md_nested_with_badges/recursive_parent_in_definition.html +++ /dev/null @@ -1,91 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `relationships`](#relationships) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `mother`](#relationships_mother) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `relationships`](#relationships_mother_relationships) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `mother`](#relationships_mother_relationships_mother) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `relationships` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/person/properties/relationships | -| | | - -**Description:** Relationships between this person and others - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `mother` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/person | -| | | - -**Description:** A human being - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `relationships` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Relationships between this person and others - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `mother` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[mother](#relationships_mother)` | -| | | - -**Description:** A human being - -
-
- -
-
- -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/recursive_two_files.html b/docs/examples/examples_md_nested_with_badges/recursive_two_files.html deleted file mode 100644 index 06187220..00000000 --- a/docs/examples/examples_md_nested_with_badges/recursive_two_files.html +++ /dev/null @@ -1,86 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `person`](#person) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `children`](#person_children) - - [items](#autogenerated_heading_2) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `siblings`](#person_siblings) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `person` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/person | -| | | - -**Description:** A human being - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `children` - - -
- -| Type | `array` | -| ---- | ------- | -| | | - -**Description:** The children they had - -| Each item of this array must be | Description | -| -------------------------------- | ------------------------------------------------- | -| [person](#person_children_items) | Person definition from second file. Not the same! | -| | | - -#### items - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[siblings](#person_siblings)` | -| | | - -**Description:** Person definition from second file. Not the same! - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `siblings` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | recursive_two_files2.json#/definitions/person | -| | | - -**Description:** Person definition from second file. Not the same! - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/recursive_two_files2.html b/docs/examples/examples_md_nested_with_badges/recursive_two_files2.html deleted file mode 100644 index 685cbb3e..00000000 --- a/docs/examples/examples_md_nested_with_badges/recursive_two_files2.html +++ /dev/null @@ -1,11 +0,0 @@ -# Person - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/ref_merge.html b/docs/examples/examples_md_nested_with_badges/ref_merge.html deleted file mode 100644 index 423277ed..00000000 --- a/docs/examples/examples_md_nested_with_badges/ref_merge.html +++ /dev/null @@ -1,87 +0,0 @@ -# Test - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `aProperty`](#aProperty) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `aDictPropertyARequired`](#aDictPropertyARequired) - - [![badge](https://img.shields.io/badge/Required-blue) Property `a`](#aDictPropertyARequired_a) - - [![badge](https://img.shields.io/badge/Required-blue) Property `b`](#aDictPropertyARequired_b) - -**Title:** Test - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `aProperty` - - -
- -| Type | `enum (of string)` | -| -------------- | ------------------------- | -| **Default** | `"Default from property"` | -| **Defined in** | #/definitions/aProperty | -| | | - -**Description:** This is the description from the definition - -Must be one of: -* "value1" -* "value2" - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `aDictPropertyARequired` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Default** | `{"a": "a", "b": "b"}` | -| **Defined in** | #/definitions/aDictProperty | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `a` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `b` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/references.html b/docs/examples/examples_md_nested_with_badges/references.html deleted file mode 100644 index 7c4d99cf..00000000 --- a/docs/examples/examples_md_nested_with_badges/references.html +++ /dev/null @@ -1,325 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `a_gift`](#a_gift) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_with_slash`](#anchor_with_slash) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `propertyA`](#anchor_with_slash_propertyA) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_no_slash`](#anchor_no_slash) - - [items](#autogenerated_heading_2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_nested_reference`](#anchor_nested_reference) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_anchor_with_slash`](#same_file_anchor_with_slash) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_anchor_no_slash`](#same_file_anchor_no_slash) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_nested_reference`](#same_file_nested_reference) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_anchor`](#other_file_anchor) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `with_wrap`](#other_file_anchor_with_wrap) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_dot_anchor`](#other_file_dot_anchor) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_dot_dot_anchor`](#other_file_dot_dot_anchor) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_only`](#other_file_only) - - [![badge](https://img.shields.io/badge/Required-blue) Property `not_a_string`](#other_file_only_not_a_string) - - [Must **not** be](#autogenerated_heading_3) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `multi_hierarchy_reference`](#multi_hierarchy_reference) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `propertyA`](#multi_hierarchy_reference_propertyA) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Testing $ref - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `a_gift` - - -
- -| Type | `string` | -| -------------- | ------------------ | -| **Defined in** | #/definitions/gift | -| | | - -**Description:** A gift, or is it? - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_with_slash` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/object_def | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `propertyA` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Description for object_def/items/propertyA - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_no_slash` - - -
- -| Type | `array of string` | -| -------------- | ---------------------- | -| **Defined in** | #definitions/array_def | -| | | - -**Description:** Description for array_def - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#anchor_no_slash_items) | - | -| | | - -### items - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anchor_nested_reference` - - -
- -| Type | `string` | -| -------------- | --------------------------- | -| **Defined in** | #/definitions/reference_def | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_anchor_with_slash` - - -
- -| Type | `string` | -| -------------- | --------------------------------------- | -| **Defined in** | references.json#/definitions/string_def | -| | | - -**Description:** Description for string_def - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_anchor_no_slash` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[anchor_with_slash](#anchor_with_slash)` | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `same_file_nested_reference` - - -
- -| Type | `string` | -| ---------------------- | ----------------------------------------------------- | -| **Same definition as** | `[anchor_nested_reference](#anchor_nested_reference)` | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_anchor` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | with_descriptions.json#/definitions/gift | -| | | - -**Description:** The delivery is a gift, no prices displayed - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `with_wrap` - - -
- -| Type | `boolean` | -| ---- | --------- | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_dot_anchor` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[other_file_anchor](#other_file_anchor)` | -| | | - -**Description:** The delivery is a gift, no prices displayed - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_dot_dot_anchor` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[other_file_anchor](#other_file_anchor)` | -| | | - -**Description:** The delivery is a gift, no prices displayed - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `other_file_only` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | combining_not.json | -| | | - -**Description:** Test schema with a not - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `not_a_string` - - -
- -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -#### Must **not** be - -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `multi_hierarchy_reference` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | reference_schemas/intermediate.json#/properties/cross_file_reference | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `propertyA` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Contents of propertyA in final.json - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/references_url.html b/docs/examples/examples_md_nested_with_badges/references_url.html deleted file mode 100644 index b1d5d96f..00000000 --- a/docs/examples/examples_md_nested_with_badges/references_url.html +++ /dev/null @@ -1,31 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Testing $ref with URL - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName` - - -
- -| Type | `string` | -| -------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| **Defined in** | https://raw.githubusercontent.com/coveooss/json-schema-for-humans/main/docs/examples/cases/basic.json#/properties/firstName | -| | | - -**Description:** The person's first name. - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/references_url_two_levels.html b/docs/examples/examples_md_nested_with_badges/references_url_two_levels.html deleted file mode 100644 index 07d28ce4..00000000 --- a/docs/examples/examples_md_nested_with_badges/references_url_two_levels.html +++ /dev/null @@ -1,73 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `described`](#described) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `name`](#described_name) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `alignment`](#described_alignment) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Testing $ref of a remote $ref - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `described` - - -
- -| Type | `object` | -| ------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | https://raw.githubusercontent.com/coveooss/json-schema-for-humans/main/docs/examples/cases/description_from_ref.json | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `name` - - -
- -| Type | `string` | -| -------------- | --------------------------- | -| **Defined in** | #/definitions/filled_string | -| | | - -**Description:** a filled string - -| Restrictions | | -| -------------- | - | -| **Min length** | 1 | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `alignment` - - -
- -| Type | `string` | -| ---------------------- | ------------------------- | -| **Same definition as** | `[name](#described_name)` | -| | | - -**Description:** a filled string - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/references_url_yaml.html b/docs/examples/examples_md_nested_with_badges/references_url_yaml.html deleted file mode 100644 index 11079ba7..00000000 --- a/docs/examples/examples_md_nested_with_badges/references_url_yaml.html +++ /dev/null @@ -1,78 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `address`](#address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `street_address`](#address_street_address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `city`](#address_city) - - [![badge](https://img.shields.io/badge/Required-blue) Property `state`](#address_state) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Testing $ref with URL with YAML destination - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `address` - - -
- -| Type | `object` | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | https://raw.githubusercontent.com/coveooss/json-schema-for-humans/main/docs/examples/cases/yaml.yaml#/definitions/address | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `street_address` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `city` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `state` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/single_element_allOf.html b/docs/examples/examples_md_nested_with_badges/single_element_allOf.html deleted file mode 100644 index 63d9f79f..00000000 --- a/docs/examples/examples_md_nested_with_badges/single_element_allOf.html +++ /dev/null @@ -1,33 +0,0 @@ -# Schema containing a single-element allOf - -- [Property `my_reference`](#allOf_i0) - -**Title:** Schema containing a single-element allOf - -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Schema containing a single-element allOf - -
- -| All of(Requirement) | -| ------------------------- | -| [my_reference](#allOf_i0) | -| | - -## Property `my_reference` - -| Type | `string` | -| -------------- | -------------------------- | -| **Defined in** | #/definitions/my_reference | -| | | - -**Description:** My string definition - -
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/top_level_array.html b/docs/examples/examples_md_nested_with_badges/top_level_array.html deleted file mode 100644 index 9fba57ea..00000000 --- a/docs/examples/examples_md_nested_with_badges/top_level_array.html +++ /dev/null @@ -1,33 +0,0 @@ -# Array at top level - -- [items](#autogenerated_heading_2) - -**Title:** Array at top level - -| Type | `array of string` | -| ---- | ----------------- | -| | | - -**Description:** Sometimes there are no properties - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#items) | A string | -| | | - -## items - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** A string - -**Example:** - -```json -"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ornare mauris ac neque malesuada sagittis. Curabitur vel blandit tortor, at pharetra lorem. Curabitur rhoncus posuere purus ut fringilla. Aenean ac rhoncus enim. Nullam ac consectetur est. Etiam vel congue tellus, ac fermentum lectus. Sed accumsan diam libero, a tincidunt mauris feugiat vitae. Nulla eu bibendum sem, quis finibus libero. Cras metus augue, aliquam at finibus elementum, mollis sed dui. Nulla quis facilisis tortor, ut sollicitudin nunc. Mauris diam nisi, ullamcorper at dignissim in, mollis ut felis. Fusce in libero facilisis, venenatis quam nec, ultrices leo. Cras tempus tristique leo ultrices pulvinar. Duis et leo quis dolor lacinia sagittis. Etiam rhoncus, nisl nec elementum auctor, enim lectus dignissim ipsum, sed consectetur mi magna eget mauris. Donec nunc augue, lacinia id nunc sit amet, accumsan posuere lorem. Sed orci neque, commodo ac nibh sit amet, euismod lacinia purus. Quisque non suscipit nibh, at auctor odio. Quisque facilisis tellus nunc. Integer interdum augue ut elit dictum eleifend. Integer bibendum convallis nisl, ut iaculis ligula vehicula et. Nunc ac diam vel arcu fringilla ullamcorper. " -``` - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/top_level_combining.html b/docs/examples/examples_md_nested_with_badges/top_level_combining.html deleted file mode 100644 index 4cc96112..00000000 --- a/docs/examples/examples_md_nested_with_badges/top_level_combining.html +++ /dev/null @@ -1,62 +0,0 @@ -# Combining at top level - -- [Property `diskDevice`](#oneOf_i0) -- [Property `diskUUID`](#oneOf_i1) -- [Property `nfs`](#oneOf_i2) -- [Property `tmpfs`](#oneOf_i3) - -**Title:** Combining at top level - -| Type | `combining` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** For the combine - -
- -| One of(Option) | -| ----------------------- | -| [diskDevice](#oneOf_i0) | -| [diskUUID](#oneOf_i1) | -| [nfs](#oneOf_i2) | -| [tmpfs](#oneOf_i3) | -| | - -## Property `diskDevice` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskDevice | -| | | - -## Property `diskUUID` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/diskUUID | -| | | - -## Property `nfs` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/nfs | -| | | - -## Property `tmpfs` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/tmpfs | -| | | - -
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_default.html b/docs/examples/examples_md_nested_with_badges/with_default.html deleted file mode 100644 index a8316da5..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_default.html +++ /dev/null @@ -1,94 +0,0 @@ -# User Preference - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `favorite_os`](#favorite_os) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `favorite_colors`](#favorite_colors) - - [items](#autogenerated_heading_2) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `desired_number_of_shoes`](#desired_number_of_shoes) - -**Title:** User Preference - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `favorite_os` - - -
- -| Type | `enum (of string)` | -| ----------- | ------------------ | -| **Default** | `"Linux"` | -| | | - -Must be one of: -* "Windows" -* "Mac" -* "Linux" - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `favorite_colors` - - -
- -| Type | `array of enum (of string)` | -| ----------- | --------------------------- | -| **Default** | `["white", "blue"]` | -| | | - -| Each item of this array must be | Description | -| ------------------------------- | ----------- | -| [items](#favorite_colors_items) | - | -| | | - -### items - -| Type | `enum (of string)` | -| ---- | ------------------ | -| | | - -Must be one of: -* "green" -* "blue" -* "orange" -* "red" -* "white" -* "black" - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `desired_number_of_shoes` - - -
- -| Type | `integer` | -| ----------- | --------- | -| **Default** | `2` | -| | | - -| Restrictions | | -| ------------ | ------ | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 2 | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_definitions.html b/docs/examples/examples_md_nested_with_badges/with_definitions.html deleted file mode 100644 index ed1f10e0..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_definitions.html +++ /dev/null @@ -1,110 +0,0 @@ -# Schema Docs - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `billing_address`](#billing_address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `street_address`](#billing_address_street_address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `city`](#billing_address_city) - - [![badge](https://img.shields.io/badge/Required-blue) Property `state`](#billing_address_state) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `futureProperty`](#billing_address_futureProperty) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `shipping_address`](#shipping_address) - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `billing_address` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/address | -| | | - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `street_address` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `city` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `state` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Optional-yellow) Property `futureProperty` - - -
- -| Type | `null` | -| ---- | ------ | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `shipping_address` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[billing_address](#billing_address)` | -| | | - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_descriptions.html b/docs/examples/examples_md_nested_with_badges/with_descriptions.html deleted file mode 100644 index e61f04ae..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_descriptions.html +++ /dev/null @@ -1,182 +0,0 @@ -# Delivery Schema - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `shipping_address`](#shipping_address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `street_address`](#shipping_address_street_address) - - [![badge](https://img.shields.io/badge/Required-blue) Property `city`](#shipping_address_city) - - [![badge](https://img.shields.io/badge/Required-blue) Property `state`](#shipping_address_state) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `billing_address`](#billing_address) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `delivery_info`](#delivery_info) - - [Property `classic`](#delivery_info_oneOf_i0) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `price`](#delivery_info_oneOf_i0_price) - - [Property `gift`](#delivery_info_oneOf_i1) - - [![badge](https://img.shields.io/badge/Optional-yellow) Property `with_wrap`](#delivery_info_oneOf_i1_with_wrap) - -**Title:** Delivery Schema - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `shipping_address` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/address | -| | | - -**Description:** Exact address - -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `street_address` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `city` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
- - -### ![badge](https://img.shields.io/badge/Required-blue) Property `state` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -
-
- -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `billing_address` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Same definition as** | `[shipping_address](#shipping_address)` | -| | | - -**Description:** Exact address - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `delivery_info` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/delivery_info | -| | | - -**Description:** Delivery info depending on the delivery type - -
- -| One of(Option) | -| ---------------------------------- | -| [classic](#delivery_info_oneOf_i0) | -| [gift](#delivery_info_oneOf_i1) | -| | - -### Property `classic` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/classic | -| | | - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `price` - - -
- -| Type | `number` | -| ---- | -------- | -| | | - -
-
- -### Property `gift` - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| **Defined in** | #/definitions/gift | -| | | - -**Description:** The delivery is a gift, no prices displayed - -
- - -#### ![badge](https://img.shields.io/badge/Optional-yellow) Property `with_wrap` - - -
- -| Type | `boolean` | -| ---- | --------- | -| | | - -
-
- -
- -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_examples.html b/docs/examples/examples_md_nested_with_badges/with_examples.html deleted file mode 100644 index 6607bffa..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_examples.html +++ /dev/null @@ -1,127 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`](#lastName) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `age`](#age) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `moreInfo`](#moreInfo) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** the person's first name - -**Examples:** - -```json -"Guido" -``` -```json -"BDFL" -``` - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName` - - -
- -**Title:** Person - -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** The person's last name. - -**Example:** - -```json -"Van Rossum" -``` - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `age` - - -
- -**Title:** Person - -| Type | `integer` | -| ---- | --------- | -| | | - -**Description:** Age in years which must be equal to or greater than zero. - -| Restrictions | | -| ------------ | ------ | -| **Minimum** | ≥ 0 | -| | | - -**Example:** - -```json -64 -``` - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `moreInfo` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** Any more info you want as an object - -**Example:** - -```json -{ - "birthplace": "Haarlem, Netherlands", - "favorite_emoji": "🐍", - "motto": "Beautiful is better than ugly.\\nExplicit is better than implicit.\\nSimple is better than complex.\\nComplex is better than complicated.\\nFlat is better than nested.\\nSparse is better than dense.\\nReadability counts.\\nSpecial cases aren't special enough to break the rules.\\nAlthough practicality beats purity.\\nErrors should never pass silently.\\nUnless explicitly silenced.\\nIn the face of ambiguity, refuse the temptation to guess.\\nThere should be one-- and preferably only one --obvious way to do it.\\nAlthough that way may not be obvious at first unless you're Dutch.\\nNow is better than never.\\nAlthough never is often better than *right* now.\\nIf the implementation is hard to explain, it's a bad idea.\\nIf the implementation is easy to explain, it may be a good idea.\\nNamespaces are one honking great idea -- let's do more of those!" -} -``` - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_keywords.html b/docs/examples/examples_md_nested_with_badges/with_keywords.html deleted file mode 100644 index 31eaeb53..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_keywords.html +++ /dev/null @@ -1,200 +0,0 @@ -# Person - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `default`](#default) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `examples`](#examples) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `if`](#if) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `then`](#then) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `else`](#else) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anyOf`](#anyOf) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `allOf`](#allOf) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `not`](#not) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `properties`](#properties) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `patternProperties`](#patternProperties) - -**Title:** Person - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `default` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** default - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `examples` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** examples - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `if` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** if - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `then` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** then - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `else` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** else - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anyOf` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** anyOf - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `allOf` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** allOf - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `not` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** not - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `properties` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** properties - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `patternProperties` - - -
- -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -**Description:** patternProperties - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_nested_with_badges/with_special_chars.html b/docs/examples/examples_md_nested_with_badges/with_special_chars.html deleted file mode 100644 index 7a926f03..00000000 --- a/docs/examples/examples_md_nested_with_badges/with_special_chars.html +++ /dev/null @@ -1,99 +0,0 @@ -# Personne - -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `prénom`](#pr_nom) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `nomDeFamille`](#nomDeFamille) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `âge`](#a_ge) -- [![badge](https://img.shields.io/badge/Optional-yellow) Property `0 de quoi d'autre`](#a0_de_quoi_d_autre) - -**Title:** Personne - -| Type | `object` | -| ------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") | -| | | - -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `prénom` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Le prénom de la personne. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `nomDeFamille` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Description:** Le nom de famille de la personne. - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `âge` - - -
- -| Type | `integer` | -| ---- | --------- | -| | | - -**Description:** L'âge en années qui doit être plus grand ou égal à 0. - -| Restrictions | | -| ------------ | ------ | -| **Minimum** | ≥ 0 | -| | | - -
-
- -
- - -## ![badge](https://img.shields.io/badge/Optional-yellow) Property `0 de quoi d'autre` - - -
- -| Type | `string` | -| ---- | -------- | -| | | - -**Examples:** - -```json -"🖖" -``` -```json -"صباح الخير" -``` -```json -"你好" -``` - -
-
- ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date \ No newline at end of file diff --git a/docs/examples/examples_md_with_badges/Configuration.md b/docs/examples/examples_md_with_badges/Configuration.md index 9f725f92..0ea67ae8 100644 --- a/docs/examples/examples_md_with_badges/Configuration.md +++ b/docs/examples/examples_md_with_badges/Configuration.md @@ -1,33 +1,34 @@ # JSON Schema for Humans configuration file -- [1. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > minify`~~](#minify) -- [2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_is_markdown`](#description_is_markdown) -- [3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > allow_html_description`](#allow_html_description) -- [4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > expand_buttons`](#expand_buttons) -- [5. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_breadcrumbs`](#show_breadcrumbs) -- [6. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_descriptions`](#collapse_long_descriptions) -- [7. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_examples`](#collapse_long_examples) -- [8. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > link_to_reused_ref`](#link_to_reused_ref) -- [9. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > recursive_detection_depth`](#recursive_detection_depth) -- [10. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > deprecated_from_description`~~](#deprecated_from_description) -- [11. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > default_from_description`](#default_from_description) -- [12. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_css`](#copy_css) -- [13. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_js`](#copy_js) -- [14. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory) -- [15. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_name`](#template_name) -- [16. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > custom_template_path`](#custom_template_path) -- [17. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_toc`](#show_toc) -- [18. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > examples_as_yaml`](#examples_as_yaml) -- [19. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > old_anchor_links`](#old_anchor_links) -- [20. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > markdown_options`](#markdown_options) -- [21. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options`](#template_md_options) - - [21.1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image`](#template_md_options_badge_as_image) - - [21.2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers`](#template_md_options_show_heading_numbers) - - [21.3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions`](#template_md_options_show_array_restrictions) - - [21.4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns`](#template_md_options_properties_table_columns) - - [21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#template_md_options_properties_table_columns_items) -- [22. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > with_footer`](#with_footer) -- [23. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > footer_show_time`](#footer_show_time) +- [1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_is_markdown`](#description_is_markdown) +- [2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_safe_mode`](#description_safe_mode) +- [3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > expand_buttons`](#expand_buttons) +- [4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_breadcrumbs`](#show_breadcrumbs) +- [5. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_descriptions`](#collapse_long_descriptions) +- [6. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_examples`](#collapse_long_examples) +- [7. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > link_to_reused_ref`](#link_to_reused_ref) +- [8. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > recursive_detection_depth`](#recursive_detection_depth) +- [9. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > deprecated_from_description`](#deprecated_from_description) +- [10. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > default_from_description`](#default_from_description) +- [11. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_css`](#copy_css) +- [12. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_js`](#copy_js) +- [13. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_name`](#template_name) +- [14. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > custom_template_path`](#custom_template_path) +- [15. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_toc`](#show_toc) +- [16. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > examples_as_yaml`](#examples_as_yaml) +- [17. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > old_anchor_links`](#old_anchor_links) +- [18. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > markdown_options`](#markdown_options) +- [19. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options`](#template_md_options) + - [19.1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image`](#template_md_options_badge_as_image) + - [19.2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers`](#template_md_options_show_heading_numbers) + - [19.3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions`](#template_md_options_show_array_restrictions) + - [19.4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns`](#template_md_options_properties_table_columns) + - [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#template_md_options_properties_table_columns_items) +- [20. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > with_footer`](#with_footer) +- [21. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > footer_show_time`](#footer_show_time) +- [22. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~](#allow_html_description) +- [23. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > minify`~~](#minify) +- [24. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory) **Title:** JSON Schema for Humans configuration file @@ -44,61 +45,64 @@ Configuration parameters can be provided in several ways: - On the CLI using a config file `--config-file config.json` - From code, by providing a GenerationConfiguration object to the called generation method. -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------------- | ------- | ---------------- | ---------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [minify](#minify ) | No | boolean | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | [Deprecated] | -| - [description_is_markdown](#description_is_markdown ) | No | boolean | No | - | Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. | -| - [allow_html_description](#allow_html_description ) | No | boolean | No | - | Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks | -| - [expand_buttons](#expand_buttons ) | No | boolean | No | - | Add an \`Expand all\` and a \`Collapse all\` button at the top of the generated documentation. | -| - [show_breadcrumbs](#show_breadcrumbs ) | No | boolean | No | - | For each property, show the relative place of that property in the schema. | -| - [collapse_long_descriptions](#collapse_long_descriptions ) | No | boolean | No | - | If a description is considered big, show only the beginning and add a \`Read more\` button. | -| - [collapse_long_examples](#collapse_long_examples ) | No | boolean | No | - | If an example is considered big, collapse it, it can be displayed with a \`Show\` option. | -| - [link_to_reused_ref](#link_to_reused_ref ) | No | boolean | No | - | If several \`$ref\` points to the same definition, only render the documentation for this definition the first time. All other occurrences are replaced by an anchor link to the first occurrence. The first occurrence is the one that is the least nested from the top of the schema and appears first in that nesting level.

*Note*: If this option is off and the schema contains recursive definitions, the generation will crash! | -| - [recursive_detection_depth](#recursive_detection_depth ) | No | integer | No | - | *Advanced option*
If \`link_to_reused_ref\` is false and a \`$ref\` in the schema refers to a parent of itself, we would get a \`RecursionError\` trying to render the documentation. To avoid this, each reference is checked for circular references.

This option determines the number of times to recursively follow definitions looking for a circular reference.

In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. | -| - [deprecated_from_description](#deprecated_from_description ) | No | boolean | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | Mark a property as deprecated (with a big red badge) if the description contains the string \`[Deprecated\`. | -| - [default_from_description](#default_from_description ) | No | boolean | No | - | Extract the default value of a property from the description like this: \`\`[Default \`the_default_value\`]\`\`.

The default value from the "default" attribute will be used in priority. | -| - [copy_css](#copy_css ) | No | boolean | No | - | Copy \`schema_doc.css\` to the same directory as \`RESULT_FILE\` after generation. | -| - [copy_js](#copy_js ) | No | boolean | No | - | Copy \`schema_doc.min.js\` to the same directory as \`RESULT_FILE\` after generation.

This file contains the logic for the anchor links. | -| - [templates_directory](#templates_directory ) | No | string | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | [Deprecated] | -| - [template_name](#template_name ) | No | enum (of string) | No | - | The name of the built-in template to use to render the documentation.

\`js\` is the default and uses javascript for anchor links, collapsible sections and tabs.

\`js_offline\` is identical to \`js\` except that all CSS, fonts and JavaScript are bundled for offline use.

\`flat\` uses no javascript, but has no interactivity.

\`md\` is the markdown template.

\`md_nested\` is the markdown template with collapsible nested sections. | -| - [custom_template_path](#custom_template_path ) | No | string | No | - | Path to a custom Jinja2 template file.

There can be multiple files to split the template, but this path should be the entry point.

If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. | -| - [show_toc](#show_toc ) | No | boolean | No | - | Whether to render table of contents. | -| - [examples_as_yaml](#examples_as_yaml ) | No | boolean | No | - | Whether to display examples as YAML instead of JSON | -| - [old_anchor_links](#old_anchor_links ) | No | boolean | No | - | Generate HTML ids for anchor links without special characters (keep only letters, digits, \`_\`, and \`-\`).

This is the old behaviour and is only needed for browsers that do not support HTML 5. | -| - [markdown_options](#markdown_options ) | No | object | No | - | [Markdown 2 options](https://github.com/trentm/python-markdown2/wiki/Extras) for the descriptions. \`description_is_markdown\` must be true for this to have any effect.

**WARNING**
Adding an extra, even if the value is false, will activate it. For example \`{"break-on-newline": false}\` will activate the \`break-on-newline\` extra. | -| - [template_md_options](#template_md_options ) | No | object | No | - | specific options to md template | -| - [with_footer](#with_footer ) | No | boolean | No | - | Whether to show the footer linking to the library repo and with the generation datetime | -| - [footer_show_time](#footer_show_time ) | No | boolean | No | - | Whether the footer should display the generation time | - -## 1. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > minify`~~ - -| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `boolean` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | -| **Default** | `true` | - -**Description:** [Deprecated] - -## 2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_is_markdown` +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| -------------------------------------------------------------- | ------- | ------------------------ | ---------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| - [description_is_markdown](#description_is_markdown ) | No | boolean | No | - | (HTML outputs only)
Whether to consider the description as Markdown and render it accordingly. | +| - [description_safe_mode](#description_safe_mode ) | No | enum (of null or string) | No | - | (HTML outputs only)
(Only used with \`description_is_markdown\`)
How are HTML tags in descriptions handled. Correspond to the \`safe_mode\` option of the markdown2 library.

- "escape": Escape all HTML tags in descriptions
- "replace": Replace HTML tags with \`[HTML_REMOVED]\`
- null: Allow HTML in descriptions | +| - [expand_buttons](#expand_buttons ) | No | boolean | No | - | Add an \`Expand all\` and a \`Collapse all\` button at the top of the generated documentation. | +| - [show_breadcrumbs](#show_breadcrumbs ) | No | boolean | No | - | For each property, show the relative place of that property in the schema. | +| - [collapse_long_descriptions](#collapse_long_descriptions ) | No | boolean | No | - | If a description is considered big, show only the beginning and add a \`Read more\` button. | +| - [collapse_long_examples](#collapse_long_examples ) | No | boolean | No | - | If an example is considered big, collapse it, it can be displayed with a \`Show\` option. | +| - [link_to_reused_ref](#link_to_reused_ref ) | No | boolean | No | - | If several \`$ref\` points to the same definition, only render the documentation for this definition the first time. All other occurrences are replaced by an anchor link to the first occurrence. The first occurrence is the one that is the least nested from the top of the schema and appears first in that nesting level.

*Note*: If this option is off and the schema contains recursive definitions, the generation will crash! | +| - [recursive_detection_depth](#recursive_detection_depth ) | No | integer | No | - | *Advanced option*
If \`link_to_reused_ref\` is false and a \`$ref\` in the schema refers to a parent of itself, we would get a \`RecursionError\` trying to render the documentation. To avoid this, each reference is checked for circular references.

This option determines the number of times to recursively follow definitions looking for a circular reference.

In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. | +| - [deprecated_from_description](#deprecated_from_description ) | No | boolean | No | - | Mark a property as deprecated (with a big red badge) if the description contains the string \`[​Deprecated\`. | +| - [default_from_description](#default_from_description ) | No | boolean | No | - | Extract the default value of a property from the description like this: \`\`[Default \`the_default_value\`]\`\`.

The default value from the "default" attribute will be used in priority. | +| - [copy_css](#copy_css ) | No | boolean | No | - | Copy \`schema_doc.css\` to the same directory as \`RESULT_FILE\` after generation. | +| - [copy_js](#copy_js ) | No | boolean | No | - | Copy \`schema_doc.min.js\` to the same directory as \`RESULT_FILE\` after generation.

This file contains the logic for the anchor links. | +| - [template_name](#template_name ) | No | enum (of string) | No | - | The name of the built-in template to use to render the documentation.

\`js\` is the default and uses javascript for anchor links, collapsible sections and tabs.

\`js_offline\` is identical to \`js\` except that all CSS, fonts and JavaScript are bundled for offline use.

\`flat\` uses no javascript, but has no interactivity.

\`md\` is the markdown template.

\`md_nested\` is the markdown template with collapsible nested sections. | +| - [custom_template_path](#custom_template_path ) | No | string | No | - | Path to a custom Jinja2 template file.

There can be multiple files to split the template, but this path should be the entry point.

If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. | +| - [show_toc](#show_toc ) | No | boolean | No | - | Whether to render table of contents. | +| - [examples_as_yaml](#examples_as_yaml ) | No | boolean | No | - | Whether to display examples as YAML instead of JSON | +| - [old_anchor_links](#old_anchor_links ) | No | boolean | No | - | Generate HTML ids for anchor links without special characters (keep only letters, digits, \`_\`, and \`-\`).

This is the old behaviour and is only needed for browsers that do not support HTML 5. | +| - [markdown_options](#markdown_options ) | No | object | No | - | [Markdown 2 options](https://github.com/trentm/python-markdown2/wiki/Extras) for the descriptions. \`description_is_markdown\` must be true for this to have any effect.

**WARNING**
Adding an extra, even if the value is false, will activate it. For example \`{"break-on-newline": false}\` will activate the \`break-on-newline\` extra. | +| - [template_md_options](#template_md_options ) | No | object | No | - | specific options to md template | +| - [with_footer](#with_footer ) | No | boolean | No | - | Whether to show the footer linking to the library repo and with the generation datetime | +| - [footer_show_time](#footer_show_time ) | No | boolean | No | - | Whether the footer should display the generation time | +| - [allow_html_description](#allow_html_description ) | No | boolean | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | [Deprecated] | +| - [minify](#minify ) | No | boolean | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | [Deprecated] | +| - [templates_directory](#templates_directory ) | No | string | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - | [Deprecated] | + +## 1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_is_markdown` | | | | ----------- | --------- | | **Type** | `boolean` | | **Default** | `true` | -**Description:** Applies to HTML templates only. Whether to consider the description as Markdown and render it accordingly. +**Description:** (HTML outputs only) +Whether to consider the description as Markdown and render it accordingly. -## 3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > allow_html_description` +## 2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > description_safe_mode` -| | | -| ----------- | --------- | -| **Type** | `boolean` | -| **Default** | `false` | +| | | +| ----------- | -------------------------- | +| **Type** | `enum (of null or string)` | +| **Default** | `"escape"` | + +**Description:** (HTML outputs only) +(Only used with `description_is_markdown`) +How are HTML tags in descriptions handled. Correspond to the `safe_mode` option of the markdown2 library. + +- "escape": Escape all HTML tags in descriptions +- "replace": Replace HTML tags with `[HTML_REMOVED]` +- null: Allow HTML in descriptions -**Description:** Applies to HTML templates only. Don't escape HTML tags in descriptions. Can be needed when description is Markdown and contains already escaped blocks +Must be one of: +* null +* "escape" +* "replace" -## 4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > expand_buttons` +## 3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > expand_buttons` | | | | ----------- | --------- | @@ -107,7 +111,7 @@ Configuration parameters can be provided in several ways: **Description:** Add an `Expand all` and a `Collapse all` button at the top of the generated documentation. -## 5. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_breadcrumbs` +## 4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_breadcrumbs` | | | | ----------- | --------- | @@ -116,7 +120,7 @@ Configuration parameters can be provided in several ways: **Description:** For each property, show the relative place of that property in the schema. -## 6. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_descriptions` +## 5. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_descriptions` | | | | ----------- | --------- | @@ -125,7 +129,7 @@ Configuration parameters can be provided in several ways: **Description:** If a description is considered big, show only the beginning and add a `Read more` button. -## 7. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_examples` +## 6. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > collapse_long_examples` | | | | ----------- | --------- | @@ -134,7 +138,7 @@ Configuration parameters can be provided in several ways: **Description:** If an example is considered big, collapse it, it can be displayed with a `Show` option. -## 8. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > link_to_reused_ref` +## 7. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > link_to_reused_ref` | | | | ----------- | --------- | @@ -145,7 +149,7 @@ Configuration parameters can be provided in several ways: *Note*: If this option is off and the schema contains recursive definitions, the generation will crash! -## 9. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > recursive_detection_depth` +## 8. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > recursive_detection_depth` | | | | ----------- | --------- | @@ -159,17 +163,16 @@ This option determines the number of times to recursively follow definitions loo In other words, if a schema has a deeply nested element that refers to itself, this option may need to be increased. -## 10. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > deprecated_from_description`~~ +## 9. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > deprecated_from_description` -| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `boolean` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | -| **Default** | `false` | +| | | +| ----------- | --------- | +| **Type** | `boolean` | +| **Default** | `false` | -**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[Deprecated`. +**Description:** Mark a property as deprecated (with a big red badge) if the description contains the string `[​Deprecated`. -## 11. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > default_from_description` +## 10. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > default_from_description` | | | | ----------- | --------- | @@ -180,7 +183,7 @@ In other words, if a schema has a deeply nested element that refers to itself, t The default value from the "default" attribute will be used in priority. -## 12. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_css` +## 11. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_css` | | | | ----------- | --------- | @@ -189,7 +192,7 @@ The default value from the "default" attribute will be used in priority. **Description:** Copy `schema_doc.css` to the same directory as `RESULT_FILE` after generation. -## 13. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_js` +## 12. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > copy_js` | | | | ----------- | --------- | @@ -200,16 +203,7 @@ The default value from the "default" attribute will be used in priority. This file contains the logic for the anchor links. -## 14. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > templates_directory`~~ - -| | | -| -------------- | ---------------------------------------------------------- | -| **Type** | `string` | -| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | - -**Description:** [Deprecated] - -## 15. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_name` +## 13. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_name` | | | | ----------- | ------------------ | @@ -235,7 +229,7 @@ Must be one of: * "md" * "md_nested" -## 16. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > custom_template_path` +## 14. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > custom_template_path` | | | | ----------- | -------- | @@ -248,7 +242,7 @@ There can be multiple files to split the template, but this path should be the e If no output file is specified, the extension of the template file will be used to determine the output documentation extension. i.e. if the template is in ./custom_template/content.html, the resulting documentation will have the html extension. -## 17. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_toc` +## 15. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > show_toc` | | | | ----------- | --------- | @@ -257,7 +251,7 @@ If no output file is specified, the extension of the template file will be used **Description:** Whether to render table of contents. -## 18. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > examples_as_yaml` +## 16. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > examples_as_yaml` | | | | ----------- | --------- | @@ -266,7 +260,7 @@ If no output file is specified, the extension of the template file will be used **Description:** Whether to display examples as YAML instead of JSON -## 19. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > old_anchor_links` +## 17. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > old_anchor_links` | | | | ----------- | --------- | @@ -277,7 +271,7 @@ If no output file is specified, the extension of the template file will be used This is the old behaviour and is only needed for browsers that do not support HTML 5. -## 20. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > markdown_options` +## 18. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > markdown_options` | | | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | @@ -303,7 +297,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br } ``` -## 21. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options` +## 19. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options` | | | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | @@ -319,7 +313,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | - [show_array_restrictions](#template_md_options_show_array_restrictions ) | No | boolean | No | - | if true generate array restrictions section.

if false, do not generate | | - [properties_table_columns](#template_md_options_properties_table_columns ) | No | array of enum (of string) | No | - | array of column names to display in the properties table.

if empty, the default is ['Property','Pattern','Type','Deprecated','Definition','Title/Description'] | -### 21.1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image` +### 19.1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > badge_as_image` | | | | ----------- | --------- | @@ -330,7 +324,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, use text instead -### 21.2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers` +### 19.2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_heading_numbers` | | | | ----------- | --------- | @@ -341,7 +335,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, do not generate heading numbers -### 21.3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions` +### 19.3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > show_array_restrictions` | | | | ----------- | --------- | @@ -352,7 +346,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br if false, do not generate -### 21.4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns` +### 19.4. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > template_md_options > properties_table_columns` | | | | -------- | --------------------------- | @@ -374,7 +368,7 @@ Adding an extra, even if the value is false, will activate it. For example `{"br | ------------------------------------------------------------------------------------- | ----------- | | [properties_table_columns items](#template_md_options_properties_table_columns_items) | - | -#### 21.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items +#### 19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items | | | | -------- | ------------------ | @@ -388,7 +382,7 @@ Must be one of: * "Definition" * "Title/Description" -## 22. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > with_footer` +## 20. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > with_footer` | | | | ----------- | --------- | @@ -397,7 +391,7 @@ Must be one of: **Description:** Whether to show the footer linking to the library repo and with the generation datetime -## 23. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > footer_show_time` +## 21. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `JSON Schema for Humans configuration file > footer_show_time` | | | | ----------- | --------- | @@ -406,5 +400,34 @@ Must be one of: **Description:** Whether the footer should display the generation time +## 22. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~ + +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `boolean` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | +| **Default** | `false` | + +**Description:** [Deprecated] + +## 23. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > minify`~~ + +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `boolean` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | +| **Default** | `true` | + +**Description:** [Deprecated] + +## 24. ![Optional](https://img.shields.io/badge/Optional-yellow)~~ Property `JSON Schema for Humans configuration file > templates_directory`~~ + +| | | +| -------------- | ---------------------------------------------------------- | +| **Type** | `string` | +| **Deprecated** | ![Deprecated](https://img.shields.io/badge/Deprecated-red) | + +**Description:** [Deprecated] + ---------------------------------------------------------------------------------------------------------------------------- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/docs/examples/examples_md_with_badges/html_in_description.md b/docs/examples/examples_md_with_badges/html_in_description.md new file mode 100644 index 00000000..157e2d89 --- /dev/null +++ b/docs/examples/examples_md_with_badges/html_in_description.md @@ -0,0 +1,59 @@ +# HTML in descriptions + +- [1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > raw_html`](#raw_html) +- [2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > html_in_markdown`](#html_in_markdown) +- [3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > json_in_markdown`](#json_in_markdown) + +**Title:** HTML in descriptions + +| | | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| **Type** | `object` | +| **Additional properties** | [![Any type: allowed](https://img.shields.io/badge/Any%20type-allowed-green)](# "Additional Properties of any type are allowed.") | + +| Property | Pattern | Type | Deprecated | Definition | Title/Description | +| ---------------------------------------- | ------- | ------ | ---------- | ---------- | --------------------- | +| - [raw_html](#raw_html ) | No | string | No | - | Some raw HTML | +| - [html_in_markdown](#html_in_markdown ) | No | string | No | - | Some HTML in Markdown | +| - [json_in_markdown](#json_in_markdown ) | No | string | No | - | Some JSON in Markdown | + +## 1. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > raw_html` + +**Title:** Some raw HTML + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:**



A link to example.com + +## 2. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > html_in_markdown` + +**Title:** Some HTML in Markdown + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:** Here is some HTML: +```html +



A link to example.com +``` + +## 3. ![Optional](https://img.shields.io/badge/Optional-yellow) Property `HTML in descriptions > json_in_markdown` + +**Title:** Some JSON in Markdown + +| | | +| -------- | -------- | +| **Type** | `string` | + +**Description:** Here is some JSON: +```json +{ + "property": "value" +} +``` + +---------------------------------------------------------------------------------------------------------------------------- +Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) diff --git a/json_schema_for_humans/generation_configuration.py b/json_schema_for_humans/generation_configuration.py index c177f100..759684c1 100644 --- a/json_schema_for_humans/generation_configuration.py +++ b/json_schema_for_humans/generation_configuration.py @@ -37,6 +37,7 @@ class GenerationConfiguration: minify: bool = True description_is_markdown: bool = True allow_html_description: bool = False + description_safe_mode: Optional[str] = "escape" deprecated_from_description: bool = False show_breadcrumbs: bool = True collapse_long_descriptions: bool = True diff --git a/json_schema_for_humans/jinja_filters.py b/json_schema_for_humans/jinja_filters.py index 0ad39c2e..35a59ac8 100644 --- a/json_schema_for_humans/jinja_filters.py +++ b/json_schema_for_humans/jinja_filters.py @@ -6,7 +6,6 @@ import yaml from jinja2 import Environment, pass_environment from markdown2 import Markdown # type: ignore -from markupsafe import Markup from markupsafe import escape as markupsafe_escape from pygments import highlight from pygments.formatters.html import HtmlFormatter @@ -104,13 +103,10 @@ def get_description_literal(env: Environment, description: str) -> str: if match: description = description[match.span(1)[1] :].lstrip() - if description and not config.result_extension == "md": - if not config.allow_html_description: - description = markupsafe_escape(description) - if config.description_is_markdown: - # Markdown templates are expected to already have Markdown descriptions - md: Markdown = env.globals["jsfh_md"] - description = Markup(md.convert(description)) + if description and not config.result_extension == "md" and config.description_is_markdown: + # Markdown templates are expected to already have Markdown descriptions + md: Markdown = env.globals["jsfh_md"] + description = md.convert(description) return description diff --git a/json_schema_for_humans/template_renderer.py b/json_schema_for_humans/template_renderer.py index 353894c2..acf7eb4a 100644 --- a/json_schema_for_humans/template_renderer.py +++ b/json_schema_for_humans/template_renderer.py @@ -26,7 +26,9 @@ def _get_jinja_template(self) -> Template: lstrip_blocks=self.config.template_is_markdown, ) env.globals["jsfh_config"] = self.config - env.globals["jsfh_md"] = markdown2.Markdown(extras=self.config.markdown_options) + env.globals["jsfh_md"] = markdown2.Markdown( + extras=self.config.markdown_options, safe_mode=self.config.description_safe_mode + ) if self.config.template_is_markdown: md_template = MarkdownTemplate(self.config) md_template.register_jinja(env) diff --git a/poetry.lock b/poetry.lock index 328a6f23..6e433f6e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -307,71 +307,72 @@ wavedrom = ["wavedrom"] [[package]] name = "markupsafe" -version = "2.1.5" +version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] [[package]] @@ -836,4 +837,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "6596e9be8a26495928ae7408b7cd2f5cdafa677ff841ef21466e8301031f63e3" +content-hash = "986cac716c62d75043da44bf4acc6e5d0b50b6b4bf28711a2b84085f1ee4cd9b" diff --git a/pyproject.toml b/pyproject.toml index ac219ad9..abca8bc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,6 @@ Pygments = "^2.18.0" pytz = "*" PyYAML = "^6.0.2" requests = "^2.32.3" -MarkupSafe = "^2.1.5" [tool.poetry.scripts] diff --git a/tests/generate_test.py b/tests/generate_test.py index d432f6bf..3c75aabc 100644 --- a/tests/generate_test.py +++ b/tests/generate_test.py @@ -720,5 +720,52 @@ def test_broken_ref() -> None: ) +def test_html_in_description_unsafe() -> None: + soup = generate_case("html_in_description", config=GenerationConfiguration(description_safe_mode=None)) + + description_nodes = soup.find_all(attrs={"class": "description"}) + + assert len(description_nodes) == 3 + + # It should be HTML, so BeautifulSoup should be able to parse it as such + raw_html_node = description_nodes[0] + assert "href" in raw_html_node.find("a").attrs.keys() + + html_in_markdown_node = description_nodes[1] + assert html_in_markdown_node.descendents is None + assert "Here is some HTML" in html_in_markdown_node.text + + json_in_markdown_node = description_nodes[2] + assert "Here is some JSON" in json_in_markdown_node.text + + +def test_html_in_description_escape() -> None: + soup = generate_case("html_in_description", config=GenerationConfiguration(description_safe_mode="escape")) + + description_nodes = soup.find_all(attrs={"class": "description"}) + + assert len(description_nodes) == 3 + + # It should not be HTML + raw_html_node = description_nodes[0] + assert raw_html_node.descendents is None + assert raw_html_node.text == '



A link to example.com\n' + + +def test_html_in_description_replace() -> None: + soup = generate_case("html_in_description", config=GenerationConfiguration(description_safe_mode="replace")) + + description_nodes = soup.find_all(attrs={"class": "description"}) + + assert len(description_nodes) == 3 + + raw_html_node = description_nodes[0] + assert raw_html_node.descendents is None + assert ( + raw_html_node.text + == "[HTML_REMOVED][HTML_REMOVED][HTML_REMOVED][HTML_REMOVED][HTML_REMOVED]A link to example.com[HTML_REMOVED]\n" + ) + + # TODO: test for uniqueItems # TODO: test for contains