From a719a27c824ea5e70f5bf6f3c8d13a8c1d6b1bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Wed, 7 May 2014 20:46:15 +0200 Subject: qapi: Add a primitive to include other files from a QAPI schema file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/qapi-code-gen.txt') 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 -- cgit v1.2.3