github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/docs/namespace.md (about)

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