Home Forums Kamanja Forums Problems & Solutions atrribute names are being altered

This topic contains 1 reply, has 1 voice, and was last updated by  Sreenivasulu Pokuri 1 year, 2 months ago.

  • Author
  • #26357 Reply

    mohammed alhourani


    I noticed when defining an Input or output message and when adding it to the Kamanja API that the attribute names of the json definition is being altered and all names are being changed to lower case!

    for example if I have an attribute like this:
    <pre style=”background-color: #ffffff; color: #000000; font-family: ‘DejaVu Sans Mono’; font-size: 9.0pt;”>{
    <span style=”color: #660e7a; font-weight: bold;”>”Name”</span>: <span style=”color: #008000; font-weight: bold;”>”rec_ID”</span>,
    <span style=”color: #660e7a; font-weight: bold;”>”Type”</span>: <span style=”color: #008000; font-weight: bold;”>”System.Int”
    this will be translated into a scala class that have this <span style=”color: #008000; font-weight: bold;”>rec_id
    So when using the functions on the attributes to get back the attribute names, these will be changed to lower case and will break any type of convention the developer expects to enteract with external systesm!

    For example if I want the message definition to also interact with external systems that have rev_ID in them and they are case sensitive, I will not to be able easily to do the mapping inside the Kamanja model, and I need to keep track that rec_ID in message definition is now rec_id in lower case!
    I see this is a problem that the message definition didn’t preserve the contract (field names) between what I’m defining in the meta data and what I expect in the system.
    Any thoughts on this?

  • #26359 Reply

    Sreenivasulu Pokuri


    You need to define “CaseSensitive”: “true”, in container/message json to keep the fields case as it is. By default it is false. Below is example how you can do



    “Container”: {

    “NameSpace”: “com.ligadata.kamanja.samples.containers”,

    “Name”: “Tst”,

    “Version”: “00.01.00”,

    “Description”: “Tst”,

    “CaseSensitive”: “true”,

    “Fixed”: “true”,

    “Fields”: [

    { “Name”: “Name”,               “Type”: “String” },

    { “Name”: “Id”,                 “Type”: “Long”   }





Reply To: atrribute names are being altered
Your information: