On Thu, Mar 24, 2011 at 04:58, Michael Hunger <michael.hun...@neotechnology.com> wrote: > unfortunately it is not clear what you're asking for.
Sorry about that. The only thing I want in the REST component is a way to identify the data type of the value returned by an extension. > > Is it the discoverable part of the REST API which describes parameters and > return values? > I think the parameter description is generated from the server plugin method > parameter names, types and annotation values. Exactly, but there's no annotations for describing the data type returned. I would like to have this information in order to create the suitable object in Python, not only a dictionary containing the values. > > This is handled by the ExtensionPointRepresentation in the server. I just > looked and it doesn't contain information about the result. > > We will discuss that internally and probably add this information. By now you > are limited to documenting that in the "description" part. OK, I see. Are you planning to add this feature in some moment in the near future? Best regards. > > Cheers > > Michael > > Am 22.03.2011 um 23:29 schrieb Javier de la Rosa: > >> 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 > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Javier de la Rosa http://versae.es _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user