Open JoelProminic opened 1 year ago
Removed Comment that was supposed to be on #14
I have a working script for importing JSON.
Test | Expected | Actual |
---|---|---|
Valid JSON | Documents created | Confirmed |
Invalid JSON | Error detected by jq . |
Confirmed |
Error on Genesis Side | Detect an report error in JSON response | Confirmed |
Target database doesn't exist | Report error from Genesis | BUG: no error triggered |
I did a practical test for #14 and found some limitations:
I found a DateTime format example for the appConfiguration/documents/items/"<item-name>"/"value"
property here here:
- For type "text", must be either a single string or an array of strings.
- For type "number", must be a single number or an array of numbers.
- For type "datetime", must be a date and/or time in one of the following ISO-8601 formats, shown via examples, or an array of such values.
- "20210728T162308,50-04" - 4 digit year, 2 digit month, 2 digit day, "T" delimiter, 2 digit hour, 2 digit minute, 2 digit second, comma delimiter, 2 digit hundredths of seconds, "+" or "-" delimiter for offset from Greenwich Mean Time, 2 digit hour timezone offset from GMT.
- "20210728T162308,50-0330" - as above, followed by 2 digit minute timezone offset from GMT.
- "20210728" - date only - 4 digit year, 2 digit month, 2 digit day.
- "T162308,50" - time only - "T" delimiter, 2 digit hour, 2 digit minute, 2 digit second, comma delimiter, 2 digit hundredths of seconds.
The main difference I see compared to Moonshine-Domino-CRUD
is the addition of "hundredths of seconds". I can test to see if this is required.
To make a response, we can use the Java API: https://help.hcltechsw.com/dom_designer/12.0.0/basic/H_MAKERESPONSE_METHOD_JAVA.html We'll still need a way to lookup the existing document, though.
I would like to be able to automate importing documents into databases on the demo server. Some uses:
I did some tests with Genesis, and I was able to import documents into a database based on JSON. The template is like this:
I want to make a script that will work roughtly like this:
/local/dominodata/JavaAddin/Genesis/json
with the JSON content/local/dominodata/JavaAddin/Genesis/jsonreponse
For the initial version, this will process a single file. Some future improvements: