Skip to content

Compilation Error: Unescaped 'type' Keyword in ConnectCustomFieldValue Record in Auto-Generated File using OpenAPI. #8059

Open
@lasithLRI

Description

@lasithLRI

Description

The type keyword in the ConnectCustomFieldValue record definition within types.bal is not escaped, leading to compilation errors. This issue occurs in the generated Ballerina code. All other type keywords escape perfectly.

Image

Steps to Reproduce

  1. Clone the repo
git clone https://github.com/lasithLRI/module-ballerinax-jira.git
cd module-ballerinax-jira
  1. Inspect the pre-generated client:
    types.bal file has already been generated.

  2. (Optional) Regenerate the client:

bal openapi flatten -i docs/spec/openapi.yaml -o docs/spec

bal openapi align -i docs/spec/flattened_openapi.yaml -o docs/spec

bal openapi -i docs/spec/aligned_ballerina_openapi.yaml -o . --mode client
  1. Verify the error:
    Open types.bal, find the ConnectCustomFieldValue record which produces:
error: invalid token 'type'

Version

Ballerina 2201.12.7 (Swan Lake Update 12)

Environment Details (with versions)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions