From b9c86b93a41cdfbc98d317ef98d8f940d508fe61 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Wed, 12 Jun 2019 16:19:28 +0200 Subject: [PATCH 1/6] Updated README --- README.md | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 99e568b..4d13f0e 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,32 @@ - # xml-component ## Description -This is an open source component for Converting XML to and from JSON on elastic.io platform. -Component to be used on the elastic.io platform, which is able to convert XML to and from JSON. -### Purpose -This component has 3 actions allowing users to pass in either generic but well format XML/JSON string or XML attachment and produces a generic string of the other file type. The output then can be maped and used in other components. - -### How it works. -Before you can deploy any code into elastic.io you must be a registered elastic.io platform user. Please see our home page at http://www.elastic.io to learn how. +Component to convert file types. -### Requirements -Provided XML document (for `XML to JSON`) should be [well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. -You will get an error otherwise. -#### Environment variables -No environment variables need to be set. +### Purpose +Allows users to convert attachments to JSON or XML to and from JSON +This component has 3 actions allowing users to pass in either generic but well format XML/JSON string or XML attachment +and produces a generic string of the other file type. The output then can be maped and used in other components. ## Actions ### XML to JSON Takes XML string and converts it to generic JSON object. -#### Schemas -[input schema](lib/schemas/xmlToJson.in.json) \ -[output schema](lib/schemas/xmlToJson.out.json) - -### JSON to XML -Takes the body of message passed into the component and converts to generic XML string - -#### Schemas -[output schema](lib/schemas/jsonToXml.out.json) - ### XML Attachment to Json -Looks at the json array of attachments passed in to component and converts all XML found to generic JSON object - -#### Input field -**Pattern to Match Files** - enter pattern for filtering files by name or leave this field empty for processing all incoming *.xml files. +Looks at the JSON array of attachments passed in to component and converts all XML that it finds to generic JSON objects +As input, the user can enter a patter pattern for filtering files by name or leave this field empty for processing all +incoming *.xml files. The provided XML document (for `XML to JSON`) should be +[well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. +You will get an error otherwise. -#### Schemas -[output schema](lib/schemas/xmlToJson.out.json) +### JSON to XML +Treats incoming message body as JSON and converts it to a generic XML string. #### Known limitations - - The maximum size of incoming file for processing is 5 MiB. If the size of incoming file will be more than 5 MiB, action will throw error `Attachment *.xml is to large to be processed my XML component. File limit is: 5242880 byte, file given was: * byte.`. + - The maximum size of incoming file for processing is 5 MiB. If the size of incoming file will be more than 5 MiB, + action will throw error `Attachment *.xml is to large to be processed my XML component. File limit is: 5242880 byte, + file given was: * byte.`. - Action does not support local agents due to current platform limitations. ## License From 920194f5c79c376ca1bcfa47578366b795e9b1b8 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Wed, 12 Jun 2019 16:32:12 +0200 Subject: [PATCH 2/6] Spelling and placement fixes --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4d13f0e..4ab44d0 100644 --- a/README.md +++ b/README.md @@ -11,25 +11,27 @@ and produces a generic string of the other file type. The output then can be map ## Actions ### XML to JSON -Takes XML string and converts it to generic JSON object. +Takes XML string and converts it to generic JSON object. The provided XML should be +[well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. +You will get an error otherwise. -### XML Attachment to Json +### XML Attachment to JSON Looks at the JSON array of attachments passed in to component and converts all XML that it finds to generic JSON objects As input, the user can enter a patter pattern for filtering files by name or leave this field empty for processing all -incoming *.xml files. The provided XML document (for `XML to JSON`) should be -[well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. -You will get an error otherwise. +incoming *.xml files. ### JSON to XML Treats incoming message body as JSON and converts it to a generic XML string. -#### Known limitations +## Known limitations - The maximum size of incoming file for processing is 5 MiB. If the size of incoming file will be more than 5 MiB, - action will throw error `Attachment *.xml is to large to be processed my XML component. File limit is: 5242880 byte, + action will throw error `Attachment *.xml is to large to be processed by XML component. File limit is: 5242880 byte, file given was: * byte.`. - - Action does not support local agents due to current platform limitations. + - `XML Attachemnt to JSON` action does not support local agents due to current platform limitations. + + ##Additional Info +Icon made by Freepik from www.flaticon.com ## License Apache-2.0 © [elastic.io GmbH](https://elastic.io) -Icon made by Freepik from www.flaticon.com From 72e29a3703fa75659802f12ad59fd19784fe6a94 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Wed, 12 Jun 2019 17:32:33 +0200 Subject: [PATCH 3/6] Made requested changes --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4ab44d0..51239a0 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,26 @@ -# xml-component +# XML Component ## Description -Component to convert file types. +Component to convert between XML and JSON data. ### Purpose -Allows users to convert attachments to JSON or XML to and from JSON +Allows users to convert XML attachments and strings to and from JSON This component has 3 actions allowing users to pass in either generic but well format XML/JSON string or XML attachment and produces a generic string of the other file type. The output then can be maped and used in other components. +### Requirements +Provided XML document (for `XML to JSON`) should be [well-formed](https://en.wikipedia.org/wiki/Well-formed_document) +in order to be parsed correctly. You will get an error otherwise. + ## Actions ### XML to JSON -Takes XML string and converts it to generic JSON object. The provided XML should be -[well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. -You will get an error otherwise. +Takes XML string and converts it to generic JSON object. ### XML Attachment to JSON -Looks at the JSON array of attachments passed in to component and converts all XML that it finds to generic JSON objects -As input, the user can enter a patter pattern for filtering files by name or leave this field empty for processing all -incoming *.xml files. +Looks at the JSON array of attachments passed in to component and converts all XML that it finds to generic JSON objects +and produces one outbound message per matching attachment. As input, the user can enter a patter pattern for filtering +files by name or leave this field empty for processing all incoming *.xml files. ### JSON to XML Treats incoming message body as JSON and converts it to a generic XML string. From 28c150f3e2791aa68227611553e2f5a6a621a682 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Thu, 13 Jun 2019 09:15:25 +0200 Subject: [PATCH 4/6] Add env vars paragraph --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 51239a0..6ddf66c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ and produces a generic string of the other file type. The output then can be map Provided XML document (for `XML to JSON`) should be [well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly. You will get an error otherwise. +#### Environment variables +No environment variables need to be set. + ## Actions ### XML to JSON From 2d471f381dd73936aec2314e150c389afd20bee8 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Fri, 14 Jun 2019 10:28:45 +0200 Subject: [PATCH 5/6] Updated README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ddf66c..17cdfec 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # XML Component ## Description -Component to convert between XML and JSON data. +elastic.io iPaaS component to convert between XML and JSON data. ### Purpose Allows users to convert XML attachments and strings to and from JSON @@ -34,7 +34,7 @@ Treats incoming message body as JSON and converts it to a generic XML string. file given was: * byte.`. - `XML Attachemnt to JSON` action does not support local agents due to current platform limitations. - ##Additional Info +## Additional Info Icon made by Freepik from www.flaticon.com ## License From 9c524338d96d2cd88f8b97852a0fbcec14c485d3 Mon Sep 17 00:00:00 2001 From: Zain Noor Date: Fri, 14 Jun 2019 10:29:32 +0200 Subject: [PATCH 6/6] Created CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..54f747a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## 1.1.0 (June 24, 2019) + +* Update `README` + +## 1.0.0 (December 29, 2016) + +* Initial release