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

Openapi tool does not escape in built symbols #5067

Closed
niveathika opened this issue Oct 22, 2023 · 4 comments
Closed

Openapi tool does not escape in built symbols #5067

niveathika opened this issue Oct 22, 2023 · 4 comments

Comments

@niveathika
Copy link
Contributor

niveathika commented Oct 22, 2023

Description:

Thread:
      description: A collection of messages representing a conversation.
      properties:
        historyId:
          description: The ID of the last history record that modified this thread.
          format: uint64
          type: string
        id:
          description: The unique ID of the thread.
          type: string
        messages:
          description: The list of messages in the thread.
          items:
            $ref: "#/components/schemas/Message"
          type: array
        snippet:
          description: A short part of the message text.
          type: string
      type: object

Thread schema will result in a record of name Thread. Here thread is ballerina key symbol.

Screenshot 2023-10-22 at 12 38 45
@lnash94
Copy link
Member

lnash94 commented Oct 23, 2023

Even though the word Thread isn't a keyword in Ballerina, the error redeclared built-in symbol Thread could be seen when declaring variables with this name.
This is the known issue from the Ballerina lang: ballerina-platform/ballerina-lang#22851 and this is the issue we added from the tool to track #5530

@niveathika, Suggest renaming the Thread schema name to another name as a workaround.

@niveathika
Copy link
Contributor Author

To further give context, Thread is not a keyword but a revered word i.e for the implementation this is needed. However there is no way to solve except to rename the variable. This will be a huge task.

@lnash94
Copy link
Member

lnash94 commented Nov 23, 2023

Close this issue with the approval of this ballerina-platform/ballerina-lang#22851.

@lnash94 lnash94 closed this as completed Nov 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Ballerina Team Main Board Nov 23, 2023
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.

@lnash94 lnash94 added the Reason/Other None of the other reasons. label Nov 23, 2023
@lnash94 lnash94 moved this to Done in OpenAPI Tool Roadmap Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants