Skip to content

Commit

Permalink
add JSON transformers
Browse files Browse the repository at this point in the history
Signed-off-by: PatriceKammognie <[email protected]>
  • Loading branch information
PatriceKammognie committed Jan 29, 2024
1 parent 8eb4a2d commit 5e23fb7
Show file tree
Hide file tree
Showing 11 changed files with 424 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"operation",
"jacksonModules"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"operation": {
"title": "Operation",
"enum": ["marshal", "unmarshal"],
"description": "Type of operation which should be apply"
},
"jacksonModules": {
"title": "Jackson Module",
"enum": [
"com.fasterxml.jackson.datatype.jsr310.JavaTimeModule",
"com.fasterxml.jackson.datatype.eclipsecollections.EclipseCollectionsModule",
"com.fasterxml.jackson.dataformat.xml.JacksonXmlModule",
"com.fasterxml.jackson.dataformat.ion.EnumAsIonSymbolModule",
"com.fasterxml.jackson.dataformat.avro.jsr310.AvroJavaTimeModule",
"com.fasterxml.jackson.dataformat.avro.jsr310.AvroModule",
"com.fasterxml.jackson.module.afterburner.AfterburnerModule",
"com.fasterxml.jackson.module.blackbird.BlackbirdModule",
"com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule",
"com.fasterxml.jackson.module.mrbean.MrBeanModule",
"com.fasterxml.jackson.module.osgi.OsgiJacksonModule",
"com.fasterxml.jackson.module.paramnames.ParameterNamesModule",
"com.fasterxml.jackson.module.paramnames.ParanamerModule",
"com.fasterxml.jackson.module.scala.DefaultScalaModule"
],
"minItems": 1,
"description": "Name of the Jackson Module which should be use"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
34 changes: 34 additions & 0 deletions databridge.camel-paho/src/main/resources/mqttconsumer.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "mqttconsumer.json",
"type": "object",
"required": [
"uniqueId",
"topic"
],
"properties": {
"uniqueId": {
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"serverUrl": {
"type": "string",
"description": "IP or Hostname of the MQTT Broker",
"default": "127.0.0.1",
"pattern": "^([a-z0-9-_\\.]+\\.[a-z]{1,3}|[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})$"
},
"serverPort": {
"description": "Port of the MQTT Broker",
"type": "integer",
"minimum": 0,
"maximum": 65535,
"default": "1884"
},
"topic": {
"type": "string",
"description": "Topic of the variable in the MQTT Broker"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "jsonjacksontransformer.json",
"type": "object",
"required": [
"uniqueId",
"queryPath",
"inputType",
"outputType"
],
"properties": {
"uniqueId": {
"title": "Unique ID",
"type": "string",
"description": "Unique ID to match options",
"pattern": "^[a-z0-9-]+$"
},
"queryPath": {
"title": "Query Path",
"type": "string",
"description": "Path to the JSONata file (relative only!)",
"pattern": "^[a-zA-Z0-9/-\\.\\+]+$"
},
"inputType": {
"title": "Input Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the input"
},
"outputType": {
"title": "Output Type",
"enum": [
"JsonString",
"Jackson"
],
"description": "Type of the output"
}
}
}
Loading

0 comments on commit 5e23fb7

Please sign in to comment.