Hi all,

I'm ending the support for extensions in the neo4j-rest-interface [1]
and it will be soon available for installing through easy_install and
pip, the Python Package Index, and probably with a new name, I don't
know yet.
But I have just find a little problem, the data type returned is not
revealed in any of params in REST interface. By example, in the
ShortestPath.shortestPath extension the dictionary of properties
received by the client is:
  {u'description': u'Find the shortest path between two nodes.',
   u'extends': u'node',
   u'name': u'shortestPath',
   u'parameters': [{u'description': u'The node to find the shortest path to.',
                    u'name': u'target',
                    u'optional': False,
                    u'type': u'node'},
                   {u'description': u'The relationship types to follow
when searching for the shortest path(s). Order is insignificant, if
omitted all types are followed.',
                    u'name': u'types',
                    u'optional': True,
                    u'type': u'strings'},
                   {u'description': u'The maximum path length to
search for, default value (if omitted) is 4.',
                    u'name': u'depth',
                    u'optional': True,
                    u'type': u'integer'}]}

That's enough to clean and send the parameters to the extension using
the REST interface, but doesn't for creating the returned objects
automatically. Adding a new "returns" in the properties returned
should work, but maybe setting some conventions about the types
returned and sent would be a good idea. Actually the type "strings" is
really a list of strings, a bit confusing.

Until now, the only way to discover the type of returned objects was
to inspect the "self" attribute of the first element, but that doesn't
work in all the cases.

Regards!

-- 
Javier de la Rosa
http://versae.es
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to