This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push: new c40e1bb0 Create fhir-sink.kamelet.yaml c40e1bb0 is described below commit c40e1bb05c9896639e9ecbbac53087d2a6624c3a Author: bramplouvier <bramplouv...@gmail.com> AuthorDate: Fri Dec 16 16:04:30 2022 +0100 Create fhir-sink.kamelet.yaml Implementation of a FHIR sink Kamelet --- kamelets/fhir-sink.kamelet.yaml | 150 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/kamelets/fhir-sink.kamelet.yaml b/kamelets/fhir-sink.kamelet.yaml new file mode 100644 index 00000000..292a2c40 --- /dev/null +++ b/kamelets/fhir-sink.kamelet.yaml @@ -0,0 +1,150 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: fhir-sink + annotations: + camel.apache.org/kamelet.support.level: "Stable" + camel.apache.org/catalog.version: "main-SNAPSHOT" + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTUuMiAzMDAiPjxzdHlsZT48L3N0eWxlPjxnIGlkPSJMYXllcl8yIj48bGluZWFyR3JhZGllbnQgaWQ9IlNWR0lEXzFfIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjYyLjY0NCIgeTE9IjI2OC4yMDEiIHgyPSIzMC43MjEiIHkyPSI4Ny4xNTUiPjxzdG9wIG9mZnNldD0iLjE1NCIgc3RvcC1jb2xvcj0iI2ZmZTQwZSIvPjxzdG9wIG9mZnNldD0iLjkxIiBzdG9wLWNvbG9yPSIjZTEwZTE5Ii8+PC9saW5lYXJHcmFkaWVudD48cGF0aCBkPSJNNzkuNiA3OC [...] + camel.apache.org/provider: "Apache Software Foundation" + camel.apache.org/kamelet.group: "FHIR" + labels: + camel.apache.org/kamelet.type: "sink" +spec: + definition: + title: FHIR Sink + description: |- + Forward data to a Fhir endpoint. + required: + - serverUrl + - methodName + type: object + properties: + apiName: + title: API Name + description: "What kind of operation to perform" + type: string + enum: ["CAPABILITIES", "CREATE", "DELETE", "HISTORY", "LOAD_PAGE", "META", "OPERATION", "PATCH", "READ", "SEARCH", "TRANSACTION", "UPDATE", "VALIDATE"] + methodName: + title: Method Name + description: "What sub operation to use for the selected operation." + type: string + encoding: + title: Encoding + description: "Encoding to use for all request. One of: [JSON] [XML]." + type: string + default: "JSON" + fhirVersion: + title: Fhir Version + description: "The FHIR Version to use." + type: string + enum: ["DSTU2", "DSTU2_HL7ORG", "DSTU2_1", "DSTU3", "R4", "R5"] + default: "R4" + log: + title: Log + description: "Will log every requests and responses." + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false + prettyPrint: + title: Pretty Print + description: "Pretty print all request." + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false + serverUrl: + title: Server URL + description: The FHIR server base URL. + type: string + lazyStartProducer: + title: Lazy Start Producer + description: "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the [...] + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false + proxyHost: + title: Proxy Host + description: The proxy host. + type: string + proxyPassword: + title: Proxy Password + description: The proxy password. + type: string + format: password + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + - urn:camel:group:credentials + proxyPort: + title: Proxy Port + description: The proxy port. + type: integer + proxyUser: + title: Proxy User + description: The proxy username. + type: string + x-descriptors: + - urn:camel:group:credentials + accessToken: + title: Access Token + description: OAuth access token. + type: string + format: password + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + - urn:camel:group:credentials + username: + title: Username + description: Username to use for basic authentication. + type: string + x-descriptors: + - urn:camel:group:credentials + password: + title: Password + description: Password to use for basic authentication. + type: string + format: password + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + - urn:camel:group:credentials + dependencies: + - "camel:fhir" + - "camel:core" + template: + from: + uri: kamelet:source + steps: + - choice: + precondition: true + when: + - simple: "${properties:encoding} =~ 'JSON'" + steps: + - unmarshal: + fhirJson: + fhir-version: "{{fhirVersion}}" + pretty-print: "{{prettyPrint}}" + - simple: "${properties:encoding} =~ 'XML'" + steps: + - unmarshal: + fhirXml: + fhir-version: "{{fhirVersion}}" + pretty-print: "{{prettyPrint}}" + - to: + uri: "fhir://{{apiName}}/{{methodName}}" + parameters: + serverUrl: "{{serverUrl}}" + inBody: "resource" + encoding: "{{encoding}}" + fhirVersion: "{{fhirVersion}}" + log: "{{log}}" + prettyPrint: "{{prettyPrint}}" + lazyStartProducer: "{{lazyStartProducer}}" + proxyHost: "{{?proxyHost}}" + proxyPassword: "{{?proxyPassword}}" + proxyPort: "{{?proxyPort}}" + proxyUser: "{{?proxyUser}}" + accessToken: "{{?accessToken}}" + username: "{{?username}}" + password: "{{?password}}"