Skip to content

Commit 2e50c2e

Browse files
authored
Wire up edi fileformat into omniparser and update sample, readmes. (#106)
* Wire up edi fileformat into omniparser and update sample, readmes. * fix cli/server cmd sample filename regex * add more comment about ca tz translation
1 parent 105fe14 commit 2e50c2e

File tree

11 files changed

+1011
-11
lines changed

11 files changed

+1011
-11
lines changed

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Take a detailed look at samples here:
1717
- [csv examples](extensions/omniv21/samples/csv)
1818
- [json examples](extensions/omniv21/samples/json)
1919
- [xml examples](extensions/omniv21/samples/xml).
20+
- [edi examples](extensions/omniv21/samples/edi).
2021

2122
## Simple Example (JSON -> JSON Transform)
2223
- Input:
@@ -114,11 +115,8 @@ Take a detailed look at samples here:
114115
## Requirements
115116
- Golang 1.14
116117
117-
This is only needed for `javascript` engine integration. Please raise an issue if you think 1.14 is too high, and
118-
you don't need `javascript` custom_func. Then we may consider moving `javascript` custom_func into a separate
119-
extension repo/package; the rest of the library is just golang 1.12.
120-
121118
## Recent Feature Additions
119+
- Added EDI file format support in omniv2 handler.
122120
- Major restructure/refactoring
123121
- Upgrade omni schema version to `omni.2.1` due a number of incompatible schema changes:
124122
- `'result_type'` -> `'type'`

cli/cmd/serverCmd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ func httpPostTransform(w http.ResponseWriter, r *http.Request) {
150150

151151
var (
152152
sampleDir = "../../extensions/omniv21/samples/"
153-
sampleFormats = []string{"csv", "json", "xml"}
154-
sampleInputFilenamePattern = regexp.MustCompile("^([0-9]+[_a-zA-Z]+)\\.input\\.[a-z]+$")
153+
sampleFormats = []string{"csv", "json", "xml", "edi"}
154+
sampleInputFilenamePattern = regexp.MustCompile("^([0-9]+[_a-zA-Z0-9]+)\\.input\\.[a-z]+$")
155155
)
156156

157157
type sample struct {

extensions/omniv21/samples/csv/csv_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package xml
1+
package csv
22

33
import (
44
"bytes"

0 commit comments

Comments
 (0)