Expose Transformer editing to uploads via open-api endpoint, or via Extensions

Hi there,

I find that it's presently very difficult to expose Transformer development to a CI/CD process due to it being handled exclusively by the Transformer editing window in the relevant window/page (unless I am missing something here, please let me know). It would be really nice to be able to upload this file somehow, perhaps as part of Extensions or some other method of external tool use to expose it to say code review or whatever.

Didn't find what you were looking for?

New post
Was this post helpful?
1 out of 1 found this helpful

Comments

3 comments

  • Hi John,

     

    You can update the transformer code and enable/disable certain transformer functions via the PATCH /v2.0/endpoints/{endpointId}. See the API specification here:

    https://api-trial.cognigy.ai/openapi#patch-/v2.0/endpoints/-endpointId-

    3
  • Hi Anton,

    Thank you for your response, although now that's led to another question. In using that could you just provide say the transformer->transformer string object? or would you need to provide the transformer->transpiledTransformer object as well? What if there is a mismatch in that the transformer object supplied wouldn't convert into the transpiled version?

    I'm still fairly new to typescript, but how could I transpile the default transformer file given that it doesn't look like a common ts or even javascript file?

    0
  • Try saving the endpoint without the transpiled code or with the same code as in the transformer field. See what happens, will the updated transformer work. Just add logging statements to e.g. handleInput to see if the changes are taking effect.

    0

Please sign in to leave a comment.