Skip to content

Commit af8098b

Browse files
## Ruby SDK Changes: (#136)
* `open_api_client.users.update()`: `request.body` **Changed** (Breaking ⚠️) * `open_api_client.organizations.update()`: `request.body` **Changed** (Breaking ⚠️) * `open_api_client.organizations.replace_metadata()`: **Added** Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 117c9b8 commit af8098b

29 files changed

Lines changed: 620 additions & 175 deletions

.speakeasy/gen.lock

Lines changed: 90 additions & 38 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ generation:
3131
generateNewTests: true
3232
skipResponseBodyAssertions: false
3333
ruby:
34-
version: 6.0.0
34+
version: 7.0.0
3535
additionalDependencies:
3636
development:
3737
activesupport: ~> 8.0.0

.speakeasy/out.openapi.yaml

Lines changed: 69 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ info:
1818
Each version is identified by its release date, e.g. `2025-04-10`. For more information, please see [Clerk API Versions](https://clerk.com/docs/versioning/available-versions).
1919

2020
Please see https://clerk.com/docs for more information.
21-
version: '2025-11-10'
21+
version: '2026-05-12'
2222
termsOfService: https://clerk.com/terms
2323
license:
2424
name: MIT
@@ -2266,12 +2266,9 @@ paths:
22662266
Both IDs should correspond to verified identifications that belong to the user.
22672267

22682268
You can remove a user's username by setting the username attribute to null or the blank string "".
2269-
This is a destructive action; the identification will be deleted forever.
2270-
Usernames can be removed only if they are optional in your instance settings and there's at least one other identifier which can be used for authentication.
22712269

2272-
This endpoint allows changing a user's password. When passing the `password` parameter directly you have two further options.
2273-
You can ignore the password policy checks for your instance by setting the `skip_password_checks` parameter to `true`.
2274-
You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set `sign_out_of_other_sessions` to `true`.
2270+
As of API version 2026-05-12, this endpoint no longer accepts `public_metadata`, `private_metadata`, or `unsafe_metadata`.
2271+
Use `PATCH /v1/users/{user_id}/metadata` to merge updates into existing metadata, or `PUT /v1/users/{user_id}/metadata` to replace a metadata field entirely.
22752272
tags:
22762273
- Users
22772274
parameters:
@@ -2366,37 +2363,13 @@ paths:
23662363
nullable: true
23672364
totp_secret:
23682365
type: string
2369-
description: |-
2370-
In case TOTP is configured on the instance, you can provide the secret to enable it on the specific user without the need to reset it.
2371-
Please note that currently the supported options are:
2372-
* Period: 30 seconds
2373-
* Code length: 6 digits
2374-
* Algorithm: SHA1
2366+
description: In case TOTP is configured on the instance, you can provide the secret to enable it on the specific user without the need to reset it.
23752367
nullable: true
23762368
backup_codes:
23772369
type: array
23782370
items:
23792371
type: string
2380-
description: |-
2381-
If Backup Codes are configured on the instance, you can provide them to enable it on the specific user without the need to reset them.
2382-
You must provide the backup codes in plain format or the corresponding bcrypt digest.
2383-
public_metadata:
2384-
type: object
2385-
description: Metadata saved on the user, that is visible to both your Frontend and Backend APIs
2386-
additionalProperties: true
2387-
nullable: true
2388-
private_metadata:
2389-
type: object
2390-
description: Metadata saved on the user, that is only visible to your Backend API
2391-
additionalProperties: true
2392-
nullable: true
2393-
unsafe_metadata:
2394-
type: object
2395-
description: |-
2396-
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
2397-
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
2398-
additionalProperties: true
2399-
nullable: true
2372+
description: If Backup Codes are configured on the instance, you can provide them to enable it on the specific user without the need to reset them.
24002373
delete_self_enabled:
24012374
type: boolean
24022375
description: If true, the user can delete themselves with the Frontend API.
@@ -2407,21 +2380,19 @@ paths:
24072380
nullable: true
24082381
legal_accepted_at:
24092382
type: string
2410-
description: A custom timestamp denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`).
2383+
description: A custom timestamp denoting _when_ the user accepted legal requirements, specified in RFC3339 format.
24112384
nullable: true
24122385
skip_legal_checks:
24132386
type: boolean
2414-
description: |-
2415-
When set to `true` all legal checks are skipped.
2416-
It is not recommended to skip legal checks unless you are migrating a user to Clerk.
2387+
description: When set to `true` all legal checks are skipped.
24172388
nullable: true
24182389
create_organizations_limit:
24192390
type: integer
24202391
description: The maximum number of organizations the user can create. 0 means unlimited.
24212392
nullable: true
24222393
created_at:
24232394
type: string
2424-
description: A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`).
2395+
description: A custom date/time denoting _when_ the user signed up to the application.
24252396
nullable: true
24262397
bypass_client_trust:
24272398
type: boolean
@@ -2740,12 +2711,12 @@ paths:
27402711
Replace a user's metadata attributes with the provided values.
27412712

27422713
Unlike `PATCH /v1/users/{user_id}/metadata` (merge semantics), this endpoint
2743-
replaces the supplied metadata columns entirely — the prior contents of each
2744-
supplied column are discarded. Columns omitted from the request body are
2714+
replaces the supplied metadata fields entirely — the prior contents of each
2715+
supplied field are discarded. Fields omitted from the request body are
27452716
left unchanged.
27462717

27472718
Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you
2748-
explicitly intend to overwrite a metadata column wholesale.
2719+
explicitly intend to overwrite a metadata field wholesale.
27492720
tags:
27502721
- Users
27512722
parameters:
@@ -5213,7 +5184,11 @@ paths:
52135184
x-speakeasy-group: organizations
52145185
x-speakeasy-name-override: update
52155186
summary: Update an organization
5216-
description: Updates an existing organization
5187+
description: |-
5188+
Updates an existing organization.
5189+
5190+
As of API version 2026-05-12, this endpoint no longer accepts `public_metadata` or `private_metadata`.
5191+
Use `PATCH /v1/organizations/{organization_id}/metadata` to merge updates into existing metadata, or `PUT /v1/organizations/{organization_id}/metadata` to replace a metadata field entirely.
52175192
tags:
52185193
- Organizations
52195194
parameters:
@@ -5231,16 +5206,6 @@ paths:
52315206
type: object
52325207
additionalProperties: false
52335208
properties:
5234-
public_metadata:
5235-
type: object
5236-
description: Metadata saved on the organization, that is visible to both your frontend and backend.
5237-
additionalProperties: true
5238-
nullable: true
5239-
private_metadata:
5240-
type: object
5241-
description: Metadata saved on the organization that is only visible to your backend.
5242-
additionalProperties: true
5243-
nullable: true
52445209
name:
52455210
type: string
52465211
description: |-
@@ -5275,7 +5240,7 @@ paths:
52755240
'400':
52765241
$ref: '#/components/responses/ClerkErrors'
52775242
'402':
5278-
$ref: '#/components/responses/ResourceNotFound'
5243+
$ref: '#/components/responses/PaymentRequired'
52795244
'403':
52805245
$ref: '#/components/responses/AuthorizationInvalid'
52815246
'404':
@@ -5359,6 +5324,58 @@ paths:
53595324
$ref: '#/components/responses/ResourceNotFound'
53605325
'422':
53615326
$ref: '#/components/responses/UnprocessableEntity'
5327+
put:
5328+
operationId: ReplaceOrganizationMetadata
5329+
x-speakeasy-group: organizations
5330+
x-speakeasy-name-override: replaceMetadata
5331+
summary: Replace metadata for an organization
5332+
description: |-
5333+
Replace an organization's metadata attributes with the provided values.
5334+
Unlike `PATCH /v1/organizations/{organization_id}/metadata` (merge semantics), this
5335+
endpoint replaces the supplied metadata fields entirely — the prior contents of each
5336+
supplied field are discarded. Fields omitted from the request body are left unchanged.
5337+
Prefer the `PATCH` endpoint for partial updates. Use `PUT` only when you explicitly
5338+
intend to overwrite a metadata field wholesale.
5339+
tags:
5340+
- Organizations
5341+
parameters:
5342+
- name: organization_id
5343+
in: path
5344+
description: The ID of the organization whose metadata will be replaced
5345+
required: true
5346+
schema:
5347+
type: string
5348+
requestBody:
5349+
required: true
5350+
content:
5351+
application/json:
5352+
schema:
5353+
type: object
5354+
additionalProperties: false
5355+
properties:
5356+
public_metadata:
5357+
type: object
5358+
description: |-
5359+
Metadata saved on the organization, that is visible to both your frontend and backend.
5360+
The existing value will be replaced entirely with the new object.
5361+
additionalProperties: true
5362+
private_metadata:
5363+
type: object
5364+
description: |-
5365+
Metadata saved on the organization that is only visible to your backend.
5366+
The existing value will be replaced entirely with the new object.
5367+
additionalProperties: true
5368+
responses:
5369+
'200':
5370+
$ref: '#/components/responses/Organization'
5371+
'400':
5372+
$ref: '#/components/responses/ClerkErrors'
5373+
'401':
5374+
$ref: '#/components/responses/AuthenticationInvalid'
5375+
'404':
5376+
$ref: '#/components/responses/ResourceNotFound'
5377+
'422':
5378+
$ref: '#/components/responses/UnprocessableEntity'
53625379
/organizations/{organization_id}/logo:
53635380
put:
53645381
operationId: UploadOrganizationLogo

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
speakeasyVersion: 1.776.0
1+
speakeasyVersion: 1.777.0
22
sources:
33
Clerk-OAS:
44
sourceNamespace: clerk-openapi
5-
sourceRevisionDigest: sha256:99dc8116f1122fbcd9cf349293a25754012ba50809cb46b0e60dc62cf7fadbef
6-
sourceBlobDigest: sha256:c1b039acce1d7c902cd11535bce3cbb9d9af23f83630b98d2654adcdda4b333e
5+
sourceRevisionDigest: sha256:c6a229bb69ebf2262186ed60fddc74f9f2a7f85293bfa31ea112ffc588655142
6+
sourceBlobDigest: sha256:def8f24c263fff53bafbbeb76e3077c209e443ab5c923131292124ae1b50bb40
77
tags:
88
- latest
9-
- "2025-11-10"
9+
- "2026-05-12"
1010
targets:
1111
clerk:
1212
source: Clerk-OAS
1313
sourceNamespace: clerk-openapi
14-
sourceRevisionDigest: sha256:99dc8116f1122fbcd9cf349293a25754012ba50809cb46b0e60dc62cf7fadbef
15-
sourceBlobDigest: sha256:c1b039acce1d7c902cd11535bce3cbb9d9af23f83630b98d2654adcdda4b333e
14+
sourceRevisionDigest: sha256:c6a229bb69ebf2262186ed60fddc74f9f2a7f85293bfa31ea112ffc588655142
15+
sourceBlobDigest: sha256:def8f24c263fff53bafbbeb76e3077c209e443ab5c923131292124ae1b50bb40
1616
codeSamplesNamespace: clerk-oas-ruby-code-samples
17-
codeSamplesRevisionDigest: sha256:c97162ea503cac1553d5d15a2247b4d6557f6335c885ed41098c1302f20e3c4a
17+
codeSamplesRevisionDigest: sha256:9769d5a761903f343360463392d8b7667aae8ded8b2b55ce371da5d708f3bece
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: latest
2121
sources:
2222
Clerk-OAS:
2323
inputs:
24-
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2025-11-10.yml
24+
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2026-05-12.yml
2525
overlays:
2626
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/.speakeasy/bapi/fixes.yml
2727
output: .speakeasy/out.openapi.yaml

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
clerk-sdk-ruby (6.0.0)
4+
clerk-sdk-ruby (7.0.0)
55
base64 (>= 0.2.0, < 1.0)
66
concurrent-ruby (~> 1.3.5)
77
faraday (>= 2.14.1)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ end
575575
* [update](docs/sdks/organizations/README.md#update) - Update an organization
576576
* [delete](docs/sdks/organizations/README.md#delete) - Delete an organization
577577
* [merge_metadata](docs/sdks/organizations/README.md#merge_metadata) - Merge and update metadata for an organization
578+
* [replace_metadata](docs/sdks/organizations/README.md#replace_metadata) - Replace metadata for an organization
578579
* [upload_logo](docs/sdks/organizations/README.md#upload_logo) - Upload a logo for the organization
579580
* [delete_logo](docs/sdks/organizations/README.md#delete_logo) - Delete the organization's logo.
580581
* [get_billing_subscription](docs/sdks/organizations/README.md#get_billing_subscription) - Retrieve an organization's billing subscription

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,14 @@ Based on:
9898
### Generated
9999
- [ruby v6.0.0] .
100100
### Releases
101-
- [Ruby Gems v6.0.0] https://rubygems.org/gems/clerk-sdk-ruby/versions/6.0.0 - .
101+
- [Ruby Gems v6.0.0] https://rubygems.org/gems/clerk-sdk-ruby/versions/6.0.0 - .
102+
103+
## 2026-06-11 19:54:25
104+
### Changes
105+
Based on:
106+
- OpenAPI Doc
107+
- Speakeasy CLI 1.777.0 (2.903.0) https://github.com/speakeasy-api/speakeasy
108+
### Generated
109+
- [ruby v7.0.0] .
110+
### Releases
111+
- [Ruby Gems v7.0.0] https://rubygems.org/gems/clerk-sdk-ruby/versions/7.0.0 - .

clerk-sdk-ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
44

55
Gem::Specification.new do |s|
66
s.name = 'clerk-sdk-ruby'
7-
s.version = '6.0.0'
7+
s.version = '7.0.0'
88
s.platform = Gem::Platform::RUBY
99
s.licenses = ['Apache-2.0']
1010
s.summary = ''
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ReplaceOrganizationMetadataRequest
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
8+
| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization whose metadata will be replaced |
9+
| `body` | [Models::Operations::ReplaceOrganizationMetadataRequestBody](../../models/operations/replaceorganizationmetadatarequestbody.md) | :heavy_check_mark: | N/A |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ReplaceOrganizationMetadataRequestBody
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
8+
| `public_metadata` | Crystalline::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend.<br/>The existing value will be replaced entirely with the new object. |
9+
| `private_metadata` | Crystalline::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend.<br/>The existing value will be replaced entirely with the new object. |

0 commit comments

Comments
 (0)