Keeping Ballerina REST APIs and OpenAPI Specs in Sync
Learn how Ballerina’s @Service and @Resource annotations let the compiler generate OpenAPI 3.0 docs that stay in sync with your REST implementation.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how Ballerina’s @Service and @Resource annotations let the compiler generate OpenAPI 3.0 docs that stay in sync with your REST implementation.
Ballerina’s built‑in <code>openapi</code> command turns annotated services into a full OpenAPI 3.0 spec and optional client stubs, keeping contracts in sync with the code and speeding up API‑first workflows.
Ballerina’s automatic OpenAPI generation turns your HTTP service into a ready‑to‑use Swagger spec. Learn how to leverage annotations, serve the spec, and validate it in a few simple steps.
See how Ballerina’s http:Client maps JSON payloads directly to records while forcing explicit error handling, reducing boilerplate in integration code.
Ballerina table comprehension syntax lets you filter, project, and order JSON records in-memory without external libraries. A practical example and verification guide.
Configure per-client timeout, retry, and circuit breaker in Ballerina's http:Client to bound latency and absorb transient failures without a service mesh.
Enable HTTP/2 in a Ballerina service by configuring TLS, setting the server protocol to http2, and verifying negotiation with curl and runtime logs. The guide covers prerequisites, step‑by‑step configuration, expected checks, and fallback handling.
Learn how to turn on OpenTelemetry tracing in Ballerina 2201+ services with the built‑in observability module, configure an OTLP exporter, and verify traces in Jaeger.
Decide whether to use Ballerina’s checked error with the ? operator, explicit error checks, or panic when calling external APIs in a microservice, based on latency, observability, and safety constraints.