summaryrefslogtreecommitdiffstats
path: root/src/share/api/README
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/api/README')
-rw-r--r--src/share/api/README27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/share/api/README b/src/share/api/README
new file mode 100644
index 0000000..fa659f6
--- /dev/null
+++ b/src/share/api/README
@@ -0,0 +1,27 @@
+There are several steps needed to document new API command:
+
+1. (optional) run: ./generate-templates cmd1 cmd2...
+ This will go through the list of commands given in arguments
+ and will check if there are corresponding JSON files in name.json
+ If the file is missing, a new JSON will be created using template.
+ If you dislike this generator, you can always use _template.json
+ and copy it over under the name of a new command.
+2. Edit command-name.json. If the command is provided by the daemon
+ out of its own (and not via hook), simply delete the hook entry.
+ If you don't want to provide command syntax (cmd-syntax key),
+ any comments about the syntax (cmd-comment key) or response syntax
+ (resp-syntax) or any comment about response (resp-comment), simply
+ remove those unused keys. The generator will attempt to generate
+ boilerplates for it.
+3. Update api_files.mk. You can also run: ./generate-api-files > api_files.mk
+ or check the update by: ./generate-api-files | diff - api_files.mk
+4. Rebuild User's Guide as usual, run in doc/sphinx folder: make
+
+Files in this directory:
+ - README: this file
+ - _template.json: template used by generate-templates
+ - api-files.mk: list of command files for inclusion in Makefiles
+ (can be build by ./generate-api-files)
+ - generate-templates: script generating new command files from the
+ the template (_template.json)
+ - generate-api-files: script generating api-files.mk