On Wed, Sep 10, 2014 at 1:23 PM, Stephan Beal <sgb...@googlemail.com> wrote:
> On Wed, Sep 10, 2014 at 7:04 PM, Ron W <ronw.m...@gmail.com> wrote: > >> Is it not possible to define an open-ended list of name-value pairs? >> > > Sure we can, but then we've got a data format nobody can predict, which > doesn't sit well with me (at the API level). Projects A and B might both > define the custom field "foo" and give them different semantics: one being > a list and one being a free-form text field. The JSON API cannot know what > semantics to apply to them, like it can with well-defined (non-custom) > fields. > As best I can determine, Fossil already demands that whomever adds custom fields take responsibility for the customized New Ticket, View Tick and Edit Ticket pages and associated TH1 apply the semantics correctly and consistently. > More off-hand thinking: A new ticket from Jira (or other) would just be a >> "new ticket" request with accompanying field data, including the Jira ID. >> > > Which the JSON API has to then understand, and confirm that your > customized fossil schema can deal with. That flexibility is a huge burden, > in terms of implementation effort, for the JSON bits. Not impossible, just > more effort than i ever felt like putting into it (because i so rarely use > the ticket system). > I think that the most the JSON API would not need to do more than to limit string lengths, map a "JSON Query" into a SQLite query and a "JSON Update" into a SQLite update. Then map the SQLite results into a suitable JSON response. For the query and update operations, I suggest the mapping only because it would limit what commands could be presented to SQLite. I would NOT expose Fossil to "raw" SQLite commands via any web interface. For the response, simply returning the "raw" SQLite response would be acceptable. Any integration that required more than this would allow should either interact with the Fossil CLI or use libfossil.
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users