Skip to content

Commit

Permalink
Add example support to SchemaType
Browse files Browse the repository at this point in the history
  • Loading branch information
steffann committed Jun 22, 2016
1 parent e42bef2 commit 4d9dacf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ZConfig/info.py
Expand Up @@ -317,6 +317,7 @@ def __init__(self, name, keytype, valuetype, datatype, registry, types):
self.valuetype = valuetype
self.handler = None
self.description = None
self.example = None
self.registry = registry
self._children = [] # [(key, info), ...]
self._attrmap = {} # {attribute: info, ...}
Expand Down Expand Up @@ -504,6 +505,7 @@ def createDerivedSchema(base):
base.handler, base.url, base.registry)
new._components.update(base._components)
new.description = base.description
new.example = base.example
new._children[:] = base._children
new._attrmap.update(base._attrmap)
new._keymap.update(base._keymap)
Expand Down
2 changes: 1 addition & 1 deletion ZConfig/schema.py
Expand Up @@ -56,7 +56,7 @@ class BaseParser(xml.sax.ContentHandler):
"description": ["key", "section", "multikey", "multisection",
"sectiontype", "abstracttype",
"schema", "component"],
"example": ["key", "section", "multikey", "multisection"],
"example": ["key", "schema", "section", "multikey", "multisection"],
"metadefault": ["key", "section", "multikey", "multisection"],
"default": ["key", "multikey"],
"import": ["schema", "component"],
Expand Down

0 comments on commit 4d9dacf

Please sign in to comment.