Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13624

Python OpenAPI client cannot use literals for Variable values

      Environment (Required on creation):

      Camunda BPM Run , 7.15.0, accessed through REST Python client generated by  openapi-generator-cli

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      Steps to reproduce (Required on creation):

       I downloaded the openapi.json file for Camunda 7.15.0
      Using openapi-generator-cli I generated a client for Python.
      However when I am testing the /message API I have a problem when I try to set process variable (Postman example below)

       

      Observed Behavior (Required on creation):

      The client raises an error, because for the "value" I am passing a string "What time is it?" and according to the openapi schema, it expects an object (dictionary):

       

      Expected behavior (Required on creation):

      To be able to send as processVariables values - simple literals like string, int, etc.

      Root Cause (Required on prioritization):

      Solution Ideas (Optional):

      Describe "value"."type" as

      • oneOf (string, integer, ...)
      • the built-in AnyValue supported by OpenAPI

      Hints (Optional):

        This is the controller panel for Smart Panels app

            [CAM-13624] Python OpenAPI client cannot use literals for Variable values

            Hey jaxx,

            thanks for creating this issue and describing it in-depth.

            We will have a look at how to generate a Python OpenAPI client that allows to send literals as well for variable values.
            Please note that due to other commitments and priorities this might take a while.

            In the meantime, if you have any solution ideas and hints from official guides on how to solve this, let us know. This will help tremendously in speeding up the resolution of this issue.

            Best,
            Tobias

            Tobias Metzke-Bernstein added a comment - Hey jaxx , thanks for creating this issue and describing it in-depth. We will have a look at how to generate a Python OpenAPI client that allows to send literals as well for variable values. Please note that due to other commitments and priorities this might take a while. In the meantime, if you have any solution ideas and hints from official guides on how to solve this, let us know. This will help tremendously in speeding up the resolution of this issue. Best, Tobias

            Tobias Metzke-Bernstein added a comment - Forum Link: https://forum.camunda.org/t/how-can-i-send-correlate-a-message-from-external-task-client/28151/

            Hi jaxx,

            we have created CAM-13468 for changing the type of the value attribute to an AnyValue.
            We expect this change to also allow generating a proper Python client.

            I will leave this ticket here as READY.
            As soon as the other ticket is resolved, we can re-test if this works appropriately for the Python client.

            Best,
            Tobias

            Tobias Metzke-Bernstein added a comment - Hi jaxx , we have created CAM-13468 for changing the type of the value attribute to an AnyValue . We expect this change to also allow generating a proper Python client. I will leave this ticket here as READY. As soon as the other ticket is resolved, we can re-test if this works appropriately for the Python client. Best, Tobias

            Hi jaxx,
            the issue should be fixed in the latest SNAPSHOT Release

            Best,
            Anton

            Anton von Weltzien added a comment - Hi jaxx , the issue should be fixed in the latest SNAPSHOT Release Best, Anton

              Unassigned Unassigned
              jaxx Valentin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: