diff mbox series

[3/8] docs: dt: writing-schema: Include the example schema in the doc build

Message ID 20210325164713.1296407-4-robh@kernel.org
State Accepted
Commit 9be21f7358125d7c862bb34915dc0ad2446ffd78
Headers show
Series dt: doc build improvements and kerneldoc addition | expand

Commit Message

Rob Herring (Arm) March 25, 2021, 4:47 p.m. UTC
The example-schema.yaml file serves as documentation, so let's include it
from writing-schema.rst.

Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>

---
 Documentation/devicetree/writing-schema.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.27.0

Comments

Mauro Carvalho Chehab March 25, 2021, 5:52 p.m. UTC | #1
Em Thu, 25 Mar 2021 10:47:08 -0600
Rob Herring <robh@kernel.org> escreveu:

> The example-schema.yaml file serves as documentation, so let's include it

> from writing-schema.rst.

> 

> Cc: Frank Rowand <frowand.list@gmail.com>

> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>


Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>


> Signed-off-by: Rob Herring <robh@kernel.org>

> ---

>  Documentation/devicetree/writing-schema.rst | 11 +++++++++++

>  1 file changed, 11 insertions(+)

> 

> diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst

> index 03e279d8fd6a..be14dbed6081 100644

> --- a/Documentation/devicetree/writing-schema.rst

> +++ b/Documentation/devicetree/writing-schema.rst

> @@ -8,6 +8,8 @@ written in a JSON compatible subset of YAML. YAML is used instead of JSON as it

>  is considered more human readable and has some advantages such as allowing

>  comments (Prefixed with '#').

>  

> +Also see :ref:`example-schema`.

> +

>  Schema Contents

>  ---------------

>  

> @@ -170,3 +172,12 @@ json-schema Resources

>  `JSON-Schema Specifications <http://json-schema.org/>`_

>  

>  `Using JSON Schema Book <http://usingjsonschema.com/>`_

> +

> +.. _example-schema:

> +

> +Annotated Example Schema

> +------------------------

> +

> +Also available as a separate file: :download:`example-schema.yaml`

> +

> +.. literalinclude:: example-schema.yaml




Thanks,
Mauro
diff mbox series

Patch

diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst
index 03e279d8fd6a..be14dbed6081 100644
--- a/Documentation/devicetree/writing-schema.rst
+++ b/Documentation/devicetree/writing-schema.rst
@@ -8,6 +8,8 @@  written in a JSON compatible subset of YAML. YAML is used instead of JSON as it
 is considered more human readable and has some advantages such as allowing
 comments (Prefixed with '#').
 
+Also see :ref:`example-schema`.
+
 Schema Contents
 ---------------
 
@@ -170,3 +172,12 @@  json-schema Resources
 `JSON-Schema Specifications <http://json-schema.org/>`_
 
 `Using JSON Schema Book <http://usingjsonschema.com/>`_
+
+.. _example-schema:
+
+Annotated Example Schema
+------------------------
+
+Also available as a separate file: :download:`example-schema.yaml`
+
+.. literalinclude:: example-schema.yaml