Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/scalar-java-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ScalarClient client =
Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:

- `bearerAuth` (env: `BEARER_AUTH`) — Credential for the BearerAuth client option.
- `oAuth2` (env: `SCALAR_OAUTH_TOKEN`) — Authorization code with PKCE (S256), for apps acting on behalf of a Scalar user. Each scope implies the weaker ones.

## Calling operations

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.2.0"
}
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

## [0.2.0](https://github.com/scalar/scalar-java/compare/v0.1.0...v0.2.0) (2026-10-02)


### ⚠ BREAKING CHANGES

* **api:** 10 breaking changes to the SDK surface.
- Removed operation `oAuth.oauthAuthorize` (`GET /v1/oauth/authorize`).
- Removed operation `oAuth.oauthToken` (`POST /v1/oauth/token`).
- Removed operation `oAuth.oauthRevoke` (`POST /v1/oauth/revoke`).
- Removed operation `oAuth.oauthAuthorizationServerMetadata` (`GET /.well-known/oauth-authorization-server`).
- Removed schema `oauth_token`.
- Removed schema `oauth_scope`.
- Removed schema `oauth_error`.
- Removed schema `oauth_token_request`.
- Removed schema `oauth_revoke_request`.
- Removed schema `oauth_authorization_server_metadata`.
* **api:** 4 breaking changes to the SDK surface.
- Property `api_document.tags` type changed from `unknown` to `string`.
- Property `managed_doc_version.tools` type changed from `Array<object>` to `Array<object>`.
- Property `github_project.accessGroups` type changed from `unknown` to `string`.
- Property `docs_project.accessGroups` type changed from `unknown` to `string`.
* **api:** 10 breaking changes to the SDK surface.
- Removed body field `lastKnownVersionSha` from `registry.updateApiDocumentVersion`.
- Removed body field `lastKnownVersionSha` from `registry.createApiDocumentVersion`.
- Response of `schemas.version.create` changed from `uid` to `none`.
- Schema `slug` shape changed.
- Schema `namespace` shape changed.
- Added required property `managed_doc_version.endpointCount`.
- Removed optional property `managed_doc_version.versionSha`.
- Schema `method` shape changed.
- Added required property `github_project.userInfoHookUrl`.
- Added required property `github_project.analyticsEnabled`.

### Features

* **api:** add operation accessGroups.create (+66 more changes) ([443f8c3](https://github.com/scalar/scalar-java/commit/443f8c3daf74a9380e383d3db6632ab0fb339797))
* **api:** initial SDK generation ([d527660](https://github.com/scalar/scalar-java/commit/d5276604fa7864c6a70601236e41a71801ef67ec))
* **api:** remove operation oAuth.oauthAuthorize (+9 more changes) ([8f31264](https://github.com/scalar/scalar-java/commit/8f312641dd13dba604c46eb7e9400410a6fff274))
* **api:** update property api_document.tags (+3 more changes) ([0d0a8f1](https://github.com/scalar/scalar-java/commit/0d0a8f14a335b0ee8fc4b933bfef086d36035621))
* **api:** update SDK surface (15 changes) ([582f867](https://github.com/scalar/scalar-java/commit/582f867e84e41d0046e9b23a6fa8fa38d6d32e62))


### Chores

* **api:** update generated SDK content ([6700dbb](https://github.com/scalar/scalar-java/commit/6700dbb2fa21cb80112573765b623c2a03035960))
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ Pass credentials to the generated client constructor. Environment variables are
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `bearerAuth` | `string \| provider` | - | Credential for the BearerAuth client option. Defaults to BEARER_AUTH. |
| `oAuth2` | `string \| provider` | - | Authorization code with PKCE (S256), for apps acting on behalf of a Scalar user. Each scope implies the weaker ones. Defaults to SCALAR_OAUTH_TOKEN. |

Declared schemes:

- `BearerAuth` bearer token
- `OAuth2` OAuth2/OpenID Connect

<br />

Expand Down Expand Up @@ -248,6 +250,7 @@ ScalarClient client =
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `bearerAuth` | `String` | `System.getenv("BEARER_AUTH")` | Credential for the BearerAuth client option. |
| `oAuth2` | `String` | `System.getenv("SCALAR_OAUTH_TOKEN")` | Authorization code with PKCE (S256), for apps acting on behalf of a Scalar user. Each scope implies the weaker ones. |
| `baseUrl` | `String` | - | Override the default API base URL. |
| `putHeader` | `(String, String) -> Builder` | - | Set a header sent with every request. |
| `putQueryParam` | `(String, String) -> Builder` | - | Set a query parameter sent with every request. |
Expand Down
1 change: 1 addition & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ScalarClient client =
Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:

- `bearerAuth` (env: `BEARER_AUTH`) — Credential for the BearerAuth client option.
- `oAuth2` (env: `SCALAR_OAUTH_TOKEN`) — Authorization code with PKCE (S256), for apps acting on behalf of a Scalar user. Each scope implies the weaker ones.

## Calling operations

Expand Down
100 changes: 100 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Versioning

This SDK is configured with the `manual` versioning policy.

- `manual`: package versions are set explicitly before release.
- `semver`: releases should follow semantic versioning based on API and SDK surface changes.
- `calendar`: releases should use a calendar-derived version chosen by the release workflow or maintainer.

## Branches and releases

This repository follows a three-branch flow, managed by the Scalar platform together
with the generated workflows (which need only the default `GITHUB_TOKEN` — no extra
token required):

- **`scalar-generated`** — pristine generator output. Pushed by the Scalar platform; do
not commit here.
- **`scalar-next`** — generated output merged with this repository's custom code. Commit
your customizations here (directly or via PRs). The Scalar platform merges each
regeneration into this branch and keeps the release PR up to date; merge conflicts
arrive as a PR from `scalar-merge-conflict` for you to resolve.
- **Default branch** — seeded from the first generated snapshot, then only ever receives
released states, each one the merge of a release PR.

Release PRs are opened by the Scalar platform from `scalar-next` against the default
branch — so the PR diff shows the full pending release — and are versioned from
[Conventional Commits](https://www.conventionalcommits.org). Merging a release PR tags the
release, publishes it, and syncs the version bump and changelog back to `scalar-next`.
Pre-1.0, breaking changes bump the minor version.

### Choosing an exact version

To release a specific version — `1.0.0`, a hotfix number, anything the commit history would
not have picked — **edit the release PR title** to the version you want:

```text
release: 1.0.0
```

The `Release PR version` check turns red as soon as you save, because the version in the
title no longer matches the version committed in the PR. The Scalar platform then re-renders
the release PR at your version (changelog, manifest, and every version-bearing file), the
title comes back as `release: 1.0.0`, and the check turns green. **Wait for it to be green
before merging** — merging in between would tag a release whose own files still carry the
old version.

The git-native equivalent, if you would rather not touch the PR: push an empty commit with a
`Release-As` footer to `scalar-next`. This is exactly what the title edit does for you.

```sh
git commit --allow-empty -m "chore: release 1.0.0" -m "Release-As: 1.0.0"
```

### When a release PR does not merge cleanly

Nothing is ever force-pushed automatically: a release PR that conflicts with the default
branch simply cannot be merged, and GitHub disables its merge button. The two causes have
different fixes:

- **The default branch received direct commits** (for example a hotfix) that are not in
`scalar-next`. Land those commits on `scalar-next` (merge the default branch into it, or
cherry-pick), and the refreshed release PR merges cleanly again. Do not force-push —
that would discard the direct commits.
- **The repository was adopted with pre-existing content**, so the default branch shares
no history with `scalar-next`. The Scalar platform adds a checkbox to the release PR
description offering to replace the default branch with this release; checking it
authorizes the platform to force-push the released state over the old content. This is
destructive for anything on the default branch that never reached `scalar-next`, which
is why it requires that explicit opt-in.

### Repository prerequisites

- Branch protection on `scalar-next` and the default branch must allow the Scalar
platform and the `github-actions` bot to push (or be left unprotected); the default
branch only ever advances by merging release PRs, and `scalar-next` receives each
released state back from the release workflow.
- **`scalar-next` must not enable "Require linear history."** The Scalar platform merges each
regeneration into it, and merges a resolved conflict back the same way; the release sync
adds another merge whenever a release PR is squash- or rebase-merged. That setting rejects
all of them.
- No Actions settings changes are required: the generated workflows declare their own
permissions and never create pull requests.
- If this package publishes through OIDC trusted publishing (for example PyPI or npm),
register the trusted publisher on the registry against the **`release-please.yml`**
workflow filename. Merging a release PR publishes from the `publish` job inside that
same workflow run (checked out at the released tag), so the automated path's OIDC
claims name that file — and, because nothing is dispatched, releasing works from any
release branch, not only the repository default branch. `sdk-release.yml` exists for
manual re-publishes at an existing tag; register it as an additional trusted publisher
only if you use it. If the publish job is configured with a deployment environment,
include that environment in the registration too.

### Recommended, not required

Releases work without this; it closes a window where one can go out at the wrong version.

- **If this repository uses auto-merge, make the `Release PR version` check a required status
check.** Auto-merge merges as soon as the checks that are *required* go green, with no
human present — so a check that is not required but still red at that moment stops
nothing, which is exactly the window between retitling a release PR and the platform
re-rendering it.
Loading
Loading