ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.58k stars 738 forks source link

[Bug]: Getting a runtime error while invoking the client methods for a generated client #42988

Closed ayeshLK closed 1 month ago

ayeshLK commented 2 months ago

Description

We have generated a client for Slack API using the Ballerina OpenAPI tool and when trying to invoke methods in the connector we are getting a runtime error.

Steps to Reproduce

  1. Publish the Slack client [1] to local ballerina central.

  2. Write a small test case using the Slack client.

    import ballerinax/slack;
    
    configurable string token = ?;
    public function main() returns error? {
        slack:Client slack = check new({ auth: {token} });
        var response = check slack->/users\.getPresence();
    }
  3. Following error is thrown.

    error: No such method: $gen$Client&0046$get$users&0046getPresence
        at nivedhtith.test_function.0:main(main.bal:14)

[1] - https://github.com/adibmbrk/module-ballerinax-slack

Affected Version(s)

Ballerina SL 2201.9.0

OS, DB, other environment details and versions

No response

Related area

-> Runtime

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

HindujaB commented 2 months ago

Seems like a bug from https://github.com/ballerina-platform/ballerina-lang/pull/41885 changes.

github-actions[bot] commented 1 month ago

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.