Skip to content
Merged
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
174 changes: 174 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
:showtitle:
:toc: left
:icons: font
:toclevels: 1

= CHANGELOG

== RFD API Changes: v0.13.0 to v0.14.0

=== BREAKING CHANGES

==== 1. User Endpoint Response Type Changes

*Affected Endpoints:*

* `POST /api-user` (create_api_user)
* `POST /api-user/{user_id}` (update_api_user)
* `POST /api-user/{user_id}/group` (add_api_user_to_group)
* `DELETE /api-user/{user_id}/group/{group_id}` (remove_api_user_from_group)

*Change Details:*

These endpoints previously returned `ApiUser_for_RfdPermission` directly:

[source,json]
----
{
"id": "uuid",
"created_at": "timestamp",
"updated_at": "timestamp",
"deleted_at": null,
"groups": ["group-uuid"],
"permissions": { ... }
}
----

Now they return `GetUserResponse_for_RfdPermission`, which wraps the user info:

[source,json]
----
{
"info": {
"id": "uuid",
"created_at": "timestamp",
"updated_at": "timestamp",
"deleted_at": null,
"groups": ["group-uuid"],
"permissions": { ... }
},
"providers": [
{
"id": "provider-uuid",
"user_id": "uuid",
"provider": "github",
"provider_id": "github-id",
"emails": ["email@example.com"],
"display_names": ["Display Name"],
"created_at": "timestamp",
"updated_at": "timestamp",
"deleted_at": null
}
]
}
----

*Breaking Reason:* Client code must be updated to access user data through the `info` property instead of at the root level. The addition of the `providers` array is new information that wasn't previously available in these responses.

*SDK Impact:*

TypeScript (rfd-ts):

[source,typescript]
----
// Before (v0.13.0)
const response: ApiUser_for_RfdPermission = await client.createApiUser({ body });

// After (v0.14.0)
const response: GetUserResponse_for_RfdPermission = await client.createApiUser({ body });
// Access user info: response.info
// Access providers: response.providers
----

Rust (rfd-sdk):

[source,rust]
----
// Before (v0.13.0)
let response: ApiUserForRfdPermission = client.create_api_user().body(body).send().await?;

// After (v0.14.0)
let response: GetUserResponseForRfdPermission = client.create_api_user().body(body).send().await?;
// Access user info: response.info
// Access providers: response.providers
----

'''

=== NON-BREAKING CHANGES

==== 1. New Endpoint: Get Group Members

*Added:* `GET /group-membership/{group_id}` (operation ID: `get_group_members`)

*Description:* Retrieve all members of a specific access group.

*Parameters:*

* `group_id` (path): TypedUuidForAccessGroupId - The group ID to query

*Response:* Array of `GetUserResponse_for_RfdPermission` objects

*SDK Usage:*

TypeScript:

[source,typescript]
----
const members = await client.getGroupMembers({
path: { groupId: 'group-uuid' }
});
----

Rust:

[source,rust]
----
let members = client.get_group_members()
.group_id(group_id)
.send()
.await?;
----

'''

=== Migration Guide

==== For Breaking Changes

If you're using any of these endpoints:

* `POST /api-user` (createApiUser)
* `POST /api-user/{user_id}` (updateApiUser)
* `POST /api-user/{user_id}/group` (addApiUserToGroup)
* `DELETE /api-user/{user_id}/group/{group_id}` (removeApiUserFromGroup)

You must update your code to handle the new response structure:

*TypeScript:*

[source,typescript]
----
// Before
const user = await api.createApiUser({ body: params });
console.log(user.id); // ❌ Will fail in v0.14.0

// After
const response = await api.createApiUser({ body: params });
console.log(response.info.id); // ✅ Correct for v0.14.0
console.log(response.providers); // New data available
----

*Rust:*

[source,rust]
----
// Before
let user = client.create_api_user().body(params).send().await?;
println!("{}", user.id); // ❌ Will fail in v0.14.0

// After
let response = client.create_api_user().body(params).send().await?;
println!("{}", response.info.id); // ✅ Correct for v0.14.0
// Access response.providers for additional data
----
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions rfd-api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://oxide.computer",
"email": "augustus@oxidecomputer.com"
},
"version": "0.13.1"
"version": "0.14.0"
},
"paths": {
"/.well-known/jwks.json": {
Expand Down Expand Up @@ -102,7 +102,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiUser_for_RfdPermission"
"$ref": "#/components/schemas/GetUserResponse_for_RfdPermission"
}
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiUser_for_RfdPermission"
"$ref": "#/components/schemas/GetUserResponse_for_RfdPermission"
}
}
}
Expand Down Expand Up @@ -266,7 +266,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiUser_for_RfdPermission"
"$ref": "#/components/schemas/GetUserResponse_for_RfdPermission"
}
}
}
Expand Down Expand Up @@ -308,7 +308,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiUser_for_RfdPermission"
"$ref": "#/components/schemas/GetUserResponse_for_RfdPermission"
}
}
}
Expand Down Expand Up @@ -761,10 +761,10 @@
"content": {
"application/json": {
"schema": {
"title": "Array_of_ApiUser_for_RfdPermission",
"title": "Array_of_GetUserResponse_for_RfdPermission",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiUser_for_RfdPermission"
"$ref": "#/components/schemas/GetUserResponse_for_RfdPermission"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion rfd-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rfd-api"
version = "0.13.1"
version = "0.14.0"
edition = "2021"
repository = "https://github.com/oxidecomputer/rfd-api"

Expand Down
2 changes: 1 addition & 1 deletion rfd-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rfd-cli"
version = "0.13.1"
version = "0.14.0"
edition = "2021"

[features]
Expand Down
Loading
Loading