]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - SPEC.md
fix doc formatting
[pdns-pipe-nmc.git] / SPEC.md
diff --git a/SPEC.md b/SPEC.md
index 5c659b75853cbed01c1c5f7611b8e1152c165383..6c15199777a0839ab943b3b195bc8fb051b870a9 100644 (file)
--- a/SPEC.md
+++ b/SPEC.md
@@ -17,8 +17,9 @@ This specification is implemented by the `pdns-pipe-nmc` program.
 
 ### `DomObj` Object
 
-`DomObj` either a `String` containing a dotted quad (see Note below),
-or a JSON `Map`, with the following attributes, all optional:
+`DomObj` is a data structure that is associated with an FQDN. It is
+either a `String` containing a dotted quad (see Note below), or a
+JSON `Map`, with the following attributes, all optional:
 
 | Key         | Type                                  | Comment                                    |
 |-------------|---------------------------------------|--------------------------------------------|
@@ -188,7 +189,7 @@ Does not translate into any DNS RR. Contains Tor hidden service address.
 
 #### i2p attribute
 
-Does not translate into any DNS RR. Contains an object with three
+Does not translate into any DNS RR. It is a JSON Map with three
 optional String attributes: `"destination"`, `"name"` and `"b32"`.
 
 ```
@@ -318,11 +319,32 @@ the empty element of the `"map"` has been recursively merged into
 the current object.
 
 ```
-"map": { "www": { "alias" : "www.example.com." }
+"map": { "www": { "alias" : "www.example.com" }
        , "www2": { "delegate": "d/example" }
        }
 ```
 
+Note: When a key contains dots ".", it is converted to a nested
+map.  If empty element appears as a result of split, such as when
+a dot is at the beginning or at the end of the key, or there are
+consequitive dots, such elemets are ignored. For example,
+
+```
+"map": { "www.uk": { "alias" : "www.example.co.uk" }
+       , "www..us": { "alias" : "www.example.com" }
+       , "smtp.us.": { "alias" : "smtp.example.com" }
+```
+
+is equivalent to
+
+```
+"map": { "uk": { "map": { "www": { "alias" : "www.example.co.uk" }}}
+       , "us": { "map": { "www": { "alias" : "www.example.com" }
+                        , "smtp": { "alias" : "smtp.example.com" }}
+               }
+       }
+```
+
 #### fingerprint attribute
 
 Does not translate into any DNS RR. Contains a list of TLS