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

[Ballerina OpenAPI] Default to --single-file mode when outside a Ballerina project #7565

Open
SachinAkash01 opened this issue Feb 8, 2025 · 0 comments

Comments

@SachinAkash01
Copy link
Member

Description

The Ballerina packages are identified by a Ballerina.toml file: https://ballerina.io/learn/organize-ballerina-code/#package-structure
If it is not found, the Ballerina files are treated as individual files. So if we try to generate a service implementation outside a Ballerina project from a given OpenAPI contract, the VSCode plugin states types can't be found. In this case, we can generate the service and types as a single file as follows,

bal openapi -i openapi.yaml --mode service --single-file

This issue is created to improve this to detect if the user is in a Ballerina project and default to single file mode if not.

Version

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: BackLog
Development

No branches or pull requests

1 participant