You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bal new -t service hello_service
cd hello_service
bal build
bal openapi -i service.bal -o api.yml
Get the below error
[I] [hello_service] bal openapi -i service.bal -o api.yml
ballerina: Oh no, something really went wrong. Bad. Sad.
We appreciate it if you can report the code that broke Ballerina in
https://github.com/ballerina-platform/ballerina-lang/issues with the
log you get below and your sample code.
We thank you for helping make us better.
[2023-05-22 10:37:01,705] SEVERE {b7a.log.crash} - Format specifier '%s'
java.util.MissingFormatArgumentException: Format specifier '%s'
at java.base/java.util.Formatter.format(Formatter.java:2672)
at java.base/java.util.Formatter.format(Formatter.java:2609)
at java.base/java.lang.String.format(String.java:2897)
at io.ballerina.openapi.converter.diagnostic.ExceptionDiagnostic.<init>(ExceptionDiagnostic.java:38)
at io.ballerina.openapi.cmd.OASContractGenerator.generateOAS3DefinitionsAllService(OASContractGenerator.java:137)
at io.ballerina.openapi.cmd.OpenApiCmd.ballerinaToOpenApi(OpenApiCmd.java:231)
at io.ballerina.openapi.cmd.OpenApiCmd.execute(OpenApiCmd.java:195)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at io.ballerina.cli.launcher.Main.main(Main.java:51)
Source (service.bal)
importballerina/http;
# A service representing a network-accessible API# bound to port `9090`.service / onnew http:Listener(9090) {
# A resource for generating greetings# + name - the input string name# + return - string name with hello message or errorresourcefunction get greeting(stringname) returnsstring|error {
// Send a response back to the caller.ifnameis"" {
returnerror("name should not be empty!");
}
return"Hello, "+name;
}
}
Affected Version(s)
MacOs Ventura 13.2.1 M1 (aarch64)
[I] [hello_service] bal version
Ballerina 2201.5.0 (Swan Lake Update 5)
Language specification 2022R4
Update Tool 1.3.14
OS, DB, other environment details and versions
No response
Related area
-> API Docs
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered:
Description
Unable to create an openapi spec as specified in the help docs here
https://ballerina.io/learn/openapi-tool/
Steps to Reproduce
bal new -t service hello_service cd hello_service bal build bal openapi -i service.bal -o api.yml
Get the below error
Source (service.bal)
Affected Version(s)
MacOs Ventura 13.2.1 M1 (aarch64)
OS, DB, other environment details and versions
No response
Related area
-> API Docs
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: