aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2014-05-07 20:46:15 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-08 14:19:58 -0400
commita719a27c824ea5e70f5bf6f3c8d13a8c1d6b1bfe (patch)
tree6510043e8cbf7065c8ea9802f67b91f425820143 /docs
parent33aaad529e7391a9ddc73682415e900950553200 (diff)
qapi: Add a primitive to include other files from a QAPI schema file
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/qapi-code-gen.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index 63b03cf872..051d109c34 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -40,6 +40,17 @@ enumeration types and union types.
Generally speaking, types definitions should always use CamelCase for the type
names. Command names should be all lower case with words separated by a hyphen.
+
+=== Includes ===
+
+The QAPI schema definitions can be modularized using the 'include' directive:
+
+ { 'include': 'path/to/file.json'}
+
+The directive is evaluated recursively, and include paths are relative to the
+file using the directive.
+
+
=== Complex types ===
A complex type is a dictionary containing a single key whose value is a