Java client SDK for Config Manager, generated from the OpenAPI specification. The client uses the JDK 11+ HttpClient (native library) so the SDK stays lightweight and avoids extra HTTP client dependencies.
Published Maven coordinates: io.github.arverma:config-manager-java-sdk (Maven Central search).
Generated code is placed under:
com.arverma.configmanager.client.api— API classes (one per OpenAPI tag, e.g.HealthApi,AuthApi,NamespacesApi,ConfigsApi)com.arverma.configmanager.client.model— request/response models
Models and APIs use standard Java collections (java.util.List, java.util.Map, etc.), which map cleanly to Scala via scala.jdk.CollectionConverters (Scala 2.13+) or scala.collection.JavaConverters (older Scala).
Long-form guides for this SDK and its release pipeline:
- OpenAPI to Maven Central: automate Java SDK client generation with GitHub Actions — separate API/SDK repos, OpenAPI Generator in Maven, generated code under
target/, tag-triggered CI. - Publish a Java library to Maven Central with GitHub Actions (2026) — verified namespace on Central, user token, GPG signing,
central-publishing-maven-plugin, and troubleshooting (including keyserver propagation).
After a release is published, add the dependency (no extra <repository> block is needed for Central):
Maven
<dependency>
<groupId>io.github.arverma</groupId>
<artifactId>config-manager-java-sdk</artifactId>
<version>0.1.0</version>
</dependency>Gradle
implementation("io.github.arverma:config-manager-java-sdk:0.1.0")sbt
libraryDependencies += "io.github.arverma" % "config-manager-java-sdk" % "0.1.0"Replace 0.1.0 with the latest release version. Maintainer setup (secrets, GPG, first release) is covered in the Medium guides above.
For local builds, this project expects the Config Manager repo as a sibling directory so the spec resolves at:
../Config Manager/api/openapi.yaml
If your layout differs, override the path when building:
mvn clean install -Dopenapi.spec.path=/absolute/path/to/openapi.yamlThe publish workflow uses the published spec on GitHub (arverma/config-manager) instead of a sibling path.
From this directory:
mvn clean installThat runs openapi-generator-maven-plugin in the generate-sources phase, then compiles the generated sources and installs the JAR to your local Maven repository. The POM uses the revision property (default 0.2.0-SNAPSHOT for development).
import com.arverma.configmanager.client.ApiClient;
import com.arverma.configmanager.client.api.HealthApi;
import com.arverma.configmanager.client.model.Healthz200Response;
public class Example {
public static void main(String[] args) throws Exception {
ApiClient client = new ApiClient(); // default base URI: http://localhost:8080
client.updateBaseUri("http://localhost:8080"); // optional: set explicitly
HealthApi health = new HealthApi(client);
Healthz200Response live = health.healthz();
System.out.println("ok = " + live.getOk());
}
}import com.arverma.configmanager.client.ApiClient
import com.arverma.configmanager.client.api.HealthApi
object Example extends App {
val client = new ApiClient()
client.updateBaseUri("http://localhost:8080")
val health = new HealthApi(client)
val live = health.healthz()
println(s"ok = ${live.getOk}")
}When you read List or Map fields from models, convert in Scala with import scala.jdk.CollectionConverters._ and .asScala on the Java collection.
When the Config Manager API has auth.enabled=true, protected routes require credentials. Pipelines and services should use API keys, not browser OAuth.
Set the Authorization header on every request via ApiClient.setRequestInterceptor:
import com.arverma.configmanager.client.ApiClient;
import com.arverma.configmanager.client.api.NamespacesApi;
ApiClient client = new ApiClient();
client.updateBaseUri("https://config.example.com/api");
client.setRequestInterceptor(builder ->
builder.header("Authorization", "Bearer cm_live_...")
);
NamespacesApi namespaces = new NamespacesApi(client);
namespaces.listNamespaces(null, null);Create API keys with the upstream CLI (config-manager auth create-api-key --name <name>) or bootstrap via Helm secret AUTH_API_KEYS. Full setup: Config Manager auth docs.
Browser Google OAuth and session cookies are for the web UI only; the SDK does not manage cookies.
- Regenerate this SDK (
mvn clean install) after upstream OpenAPI changes (e.g. new auth routes orsecuritySchemes). - Upstream roadmap: RBAC v2 (viewer/developer roles) may add role-aware behavior later; API keys remain the integration path for machine clients.
Besides the JDK, this SDK expects Jackson (JSON) and related libraries on the classpath—the same dependencies declared in this project’s pom.xml. They are pulled in transitively when you depend on this artifact from Maven.
- Local: Regenerate and test with
mvn clean install(ormvn clean generate-sources test) using a sibling checkout or-Dopenapi.spec.path=.... Generated sources live undertarget/(ignored by git). - CI: Pull requests run
.github/workflows/build.yamlagainst Config ManagermainOpenAPI. - Release: Push a tag
vX.Y.Zto run.github/workflows/publish-maven-central.yaml, which deploys to Maven Central. Full setup (Sonatype, GPG, GitHub secrets) is in the Medium guides.
Only required when Config Manager api/openapi.yaml changes in a client-visible way (new routes, models, security, etc.). Server-only changes do not need a new SDK.
- Merge the OpenAPI change into Config Manager
main. - Tag Config Manager
vX.Y.Z(same version you plan for the SDK). - Run
mvn clean installlocally against the new spec and fix any compile issues. - Push tag
vX.Y.Zon this repo — publish useshttps://raw.githubusercontent.com/arverma/config-manager/vX.Y.Z/api/openapi.yamlby default. - Tell consumers to bump their Maven dependency to
X.Y.Z.
To publish from a different OpenAPI URL (e.g. before Config Manager is tagged), set GitHub repo variable OPENAPI_SPEC_URL to the raw spec URL.
Licensed under the Apache License, Version 2.0. See LICENSE for the full license text. Project attribution is in NOTICE.