Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Resource function parameter annotations are missing when we have the quoted identifier in the path #41877

Closed
TharmiganK opened this issue Dec 14, 2023 · 1 comment · Fixed by #41905
Assignees
Labels
Priority/High Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug

Comments

@TharmiganK
Copy link
Contributor

Description

When the resource function has a quoted identifier as a path segment, the annotations on the function parameters are missing in the BResourceMethodType. But I could see the annotation information in the ResourceMethodSymbol. So the issue might be related to runtime.

Steps to Reproduce

Use the following code to reproduce the issue:

import ballerina/http;

public type Location record {
    string name;
    string id;
    string address;
};

service on new http:Listener(9090) {

    resource function post '2023/locations(@http:Payload {mediaType: "application/json"} Location location) {

    }

    resource function post locations(@http:Payload {mediaType: "application/json"} Location location) {

    }
}
  • BResourceMethodType for the resource with the quoted identifier - '2023/locations:
Screenshot 2023-12-14 at 08 34 33
  • BResourceMethodType for the resource without the quoted identifier - locations:
Screenshot 2023-12-14 at 08 15 56
  • ResourceMethodSymbol for the resource with the quoted identifier:
Screenshot 2023-12-14 at 08 39 42

Affected Version(s)

Ballerina SwanLake Update 8

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

@ballerina-bot ballerina-bot added the Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime label Dec 14, 2023
@gabilang gabilang self-assigned this Dec 18, 2023
@gabilang gabilang moved this from BackLog to In Progress in Ballerina Team Main Board Dec 18, 2023
@gabilang gabilang moved this from In Progress to On Hold in Ballerina Team Main Board Jan 5, 2024
@gabilang gabilang moved this from On Hold to In Progress in Ballerina Team Main Board Jan 8, 2024
@gabilang gabilang moved this from In Progress to PR Sent in Ballerina Team Main Board Jan 8, 2024
@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Jan 19, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/High Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants