Class: Postprocessor
| Defined in: | src/postprocessor.coffee |
Overview
@class Postprocessor
Variables Summary
- supportedRules =
-
['definition', 'enumeration', 'index', 'attribute', 'relation', 'resolvedRelation', 'link', 'meta'] - directMetadata =
-
['title', 'description']
Class Method Summary
- . (String) absoluteReferencePathForClass(className, ctx) Returns absolute reference path for class
Instance Method Summary
- # (void) cleanRefs() Cleans up references
- # (Object) postprocess(data) Processes whole raw output from jison parser to JSON Schema
- # (Object) cleanUpSchema(schema) Removes technical information from schema
- # (Object) processMeta(meta, ctx = {}) Converts meta statement into JSON Schema object definition.
- # (Object) processEnumeration(enumeration, ctx = {}) Bound Converts enumeration into JSON Schema object definition.
- # (Object) processDefinition(klass, ctx = {}) Bound Converts class rule into JSON Schema object definition.
- # (Object) processRule(rule, ctx) Processes passed rule with related method
- # (Object) processRules(rules, ctx = {}) Bound Converts rules for context into JSON Schema object definition.
- # (Object) processIndex(index, ctx = {}) Converts index definition to JSON Schema entry.
- # (Object) processAttribute(property, ctx = {}) Converts property definition to JSON Schema entry.
- # (Object) addPropertyToContext(name, property, ctx) Adds property to specified context
- # (Object) expandPropertyPath(name, property) Expands properties specified with paths to JSON Schema embedded objects
- # (void) registerTypeReference(property, ctx) Registers type reference
- # (void) registerDefinition(definition) Registers definition reference
- # (String|Boolean) findTypeReference(name, ctx) Finds JSON schema reference to specified type in the context
- # (void) resolveTypeReference(property, unresolved) Resolves type reference
- # (Object) resolveTypeReferences(schema) Processes type references for schema
- # (Object) processPropertyType(property, ctx = {}) Processes property type.
- # (Object) processArrayType(property, ctx) Converts array types to proper JSON schema.
- # (Object) processRelation(relation, ctx = {}, addAttribute = true) Converts relation definition to JSON Schema entry.
- # (Object) processResolvedRelation(relation, ctx = {}) Converts resolved relation definition to JSON Schema entry.
- # (Object) processLink(link, ctx = {}) Converts link definition to JSON Schema entry.
Class Method Details
.
(String)
absoluteReferencePathForClass(className, ctx)
Returns absolute reference path for class
Instance Method Details
#
(void)
cleanRefs()
Cleans up references
#
(Object)
postprocess(data)
Processes whole raw output from jison parser to JSON Schema
#
(Object)
cleanUpSchema(schema)
Removes technical information from schema
#
(Object)
processMeta(meta, ctx = {})
Converts meta statement into JSON Schema object definition.
#
(Object)
processEnumeration(enumeration, ctx = {})
Bound
Converts enumeration into JSON Schema object definition.
#
(Object)
processDefinition(klass, ctx = {})
Bound
Converts class rule into JSON Schema object definition.
#
(Object)
processRule(rule, ctx)
Processes passed rule with related method
#
(Object)
processRules(rules, ctx = {})
Bound
Converts rules for context into JSON Schema object definition.
#
(Object)
processIndex(index, ctx = {})
Converts index definition to JSON Schema entry.
#
(Object)
processAttribute(property, ctx = {})
Converts property definition to JSON Schema entry.
#
(Object)
addPropertyToContext(name, property, ctx)
Adds property to specified context
#
(Object)
expandPropertyPath(name, property)
Expands properties specified with paths to JSON Schema embedded objects
#
(void)
registerTypeReference(property, ctx)
Registers type reference
#
(void)
registerDefinition(definition)
Registers definition reference
#
(String|Boolean)
findTypeReference(name, ctx)
Finds JSON schema reference to specified type in the context
#
(void)
resolveTypeReference(property, unresolved)
Resolves type reference
#
(Object)
resolveTypeReferences(schema)
Processes type references for schema
#
(Object)
processPropertyType(property, ctx = {})
Processes property type.
#
(Object)
processArrayType(property, ctx)
Converts array types to proper JSON schema.
#
(Object)
processRelation(relation, ctx = {}, addAttribute = true)
Converts relation definition to JSON Schema entry.
#
(Object)
processResolvedRelation(relation, ctx = {})
Converts resolved relation definition to JSON Schema entry.
#
(Object)
processLink(link, ctx = {})
Converts link definition to JSON Schema entry.