github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/docs/source/namespace.rst (about) 1 .. _section-namespace: 2 3 ============== 4 Namespace 5 ============== 6 7 You can logically group schemas by creating a single endpoint using this resource. 8 Namespace has the following properties: 9 - id : unique identifier of the namespace 10 - name : name of the namespace 11 - description : description of the namespace 12 - prefix : prefix for the namespace 13 - parent : parent namespace 14 - version : version of the namspace 15 - metadata : arbitrary metadata 16 17 Example namespace 18 19 .. code-block:: yaml 20 21 namespaces: 22 - description: Neutron API 23 id: neutron 24 name: Neutron 25 prefix: neutron 26 - description: Version 2.0 of Neutron API 27 id: neutron_v2 28 metadata: 29 key: value 30 name: Neutron 2.0 31 parent: neutron 32 prefix: v2.0 33 version: "2.0" 34 35 The full prefix of a namespace is a concatenation of prefixes of all its 36 ancestors. Any schema specifying a namespace will have such prefix prepended 37 to URLs specific to that schema. 38 39 Example: If a schema specifies that its namespace is neutron_v2 from the previous 40 example, a prefix of /neutron/v2.0/ will be prepended to its prefix. 41 42 For a top-level namespace ("neutron" from the example above) a root URL is mapped 43 (../neutron/) that lists all child namespaces. For namespaces that have a parent 44 specified ("neutron_v2" from the example above) an access URL is mapped using 45 prefixes from ancestors and its own prefix (../neutron/v2.0) that lists all 46 schemas belonging to the namespace.