         index.key = index.key.map (field) =>
             # Save keys as properties if they specified in extended format
             if field.type?
-                utils.addAsObjectMember(ctx, 'properties', field.name, @processProperty(field))
+                # Note that field should be wrapped with attribute rule
+                @processAttribute(attribute: field, ctx)
             # We need only attribute names here
             field.name
 

    #
    processRules: (rules, ctx={}) =>
        rules.forEach (rule) =>
            switch rule.rule
                when 'definition'
                    utils.addAsObjectMember(ctx, 'definitions', rule.title, @processClass(rule))
                when 'enumeration'
                    utils.addAsObjectMember(ctx, 'definitions', rule.title, @processEnumeration(rule))
                when 'index'
                    @processIndex(rule, ctx)
                when 'attribute'
                    utils.addAsObjectMember(ctx, 'properties', rule.attribute.name, @processProperty(rule.attribute))
                when 'relation'
                    utils.addAsObjectMember(ctx, 'relations', rule.attribute.name, @processRelation(rule))
                when 'link'
                    utils.addAsObjectMember(ctx, 'links', rule.attribute.name, @processLink(rule))
                else
                    throw new Error("Unrecognized Grypher rule #{rule.rule}.")
        ctx

    #

    # Converts property definition to JSON Schema entry.
    #
    # @param [Object] property raw definition of property
    # @param [Object] ctx context for property
    # @return [Object] property context JSON Schema definition
    #
    processAttribute: (property, ctx={}) ->
        # Add property to context and return context
        utils.addAsObjectMember(ctx, 'properties', property.attribute.name, property.attribute)
        ctx

    #
    # Converts relation definition to JSON Schema entry.
    #
    # @param [Object] relation raw definition of relation
    # @param [Object] ctx context for relation
    # @return [Object] relation context JSON Schema definition
    #
    processRelation: (relation, ctx={}) ->
        # Add relation to context and return context
        utils.addAsObjectMember(ctx, 'relations', relation.attribute.name, relation)
        ctx

    #
    # Converts link definition to JSON Schema entry.
    #
    # @param [Object] link raw definition of link
    # @param [Object] ctx context for link
    # @return [Object] link context JSON Schema definition
    #
    processLink: (link, ctx={}) ->
        # Add link to context and return context
        utils.addAsObjectMember(ctx, 'links', link.attribute.name, link)
        ctx


module.exports = Postprocessor
