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
2 changes: 1 addition & 1 deletion src/api/v4/federation/mapping/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::policy::Policy;
#[utoipa::path(
post,
path = "/",
operation_id = "/federation/identity_provider/mapping:create",
operation_id = "/federation/mapping:create",
responses(
(status = CREATED, description = "mapping object", body = MappingResponse),
),
Expand Down
2 changes: 1 addition & 1 deletion src/api/v4/federation/mapping/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use crate::policy::Policy;
#[utoipa::path(
delete,
path = "/{id}",
operation_id = "/federation/identity_provider/mapping:delete",
operation_id = "/federation/mapping:delete",
params(
("id" = String, Path, description = "The ID of the attribute mapping")
),
Expand Down
2 changes: 1 addition & 1 deletion src/api/v4/federation/mapping/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::policy::Policy;
#[utoipa::path(
get,
path = "/",
operation_id = "/federation/identity_provider/mapping:list",
operation_id = "/federation/mapping:list",
params(MappingListParameters),
responses(
(status = OK, description = "List of mappings", body = MappingList),
Expand Down
2 changes: 1 addition & 1 deletion src/api/v4/federation/mapping/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::policy::Policy;
#[utoipa::path(
get,
path = "/{id}",
operation_id = "/federation/identity_provider/mapping:show",
operation_id = "/federation/mapping:show",
params(
("id" = String, Path, description = "The ID of the attribute mapping.")
),
Expand Down
2 changes: 1 addition & 1 deletion src/api/v4/federation/mapping/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::policy::Policy;
#[utoipa::path(
put,
path = "/{id}",
operation_id = "/federation/identity_provider/mapping:update",
operation_id = "/federation/mapping:update",
params(
("id" = String, Path, description = "The ID of the attribute mapping.")
),
Expand Down
2 changes: 2 additions & 0 deletions src/api/v4/federation/types/identity_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,11 @@ impl IntoResponse for IdentityProviderList {
#[derive(Clone, Debug, Default, Deserialize, Serialize, IntoParams)]
pub struct IdentityProviderListParameters {
/// Filters the response by IDP name.
#[param(nullable = false)]
pub name: Option<String>,

/// Filters the response by a domain ID.
#[param(nullable = false)]
pub domain_id: Option<String>,
}

Expand Down
10 changes: 9 additions & 1 deletion src/api/v4/federation/types/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ pub struct Mapping {
/// Additional claims that must be present in the token.
#[builder(default)]
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Object)]
pub bound_claims: Option<Value>,

/// List of OIDC scopes.
Expand Down Expand Up @@ -184,7 +185,7 @@ pub struct MappingCreate {
/// Additional claims that must be present in the token.
#[builder(default)]
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(nullable = false)]
#[schema(nullable = false, value_type = Object)]
pub bound_claims: Option<Value>,

/// List of OIDC scopes.
Expand Down Expand Up @@ -236,6 +237,8 @@ pub struct MappingUpdate {

/// Attribute mapping type ([oidc, jwt]).
#[builder(default)]
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(nullable = false)]
pub r#type: Option<MappingType>,

/// List of allowed redirect urls (only for `oidc` type).
Expand Down Expand Up @@ -275,6 +278,7 @@ pub struct MappingUpdate {
/// Additional claims that must be present in the token.
#[builder(default)]
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(nullable = false, value_type = Object)]
pub bound_claims: Option<Value>,

/// List of OIDC scopes.
Expand Down Expand Up @@ -448,15 +452,19 @@ impl IntoResponse for MappingList {
#[derive(Clone, Debug, Default, Deserialize, Serialize, IntoParams)]
pub struct MappingListParameters {
/// Filters the response by IDP name.
#[param(nullable = false)]
pub name: Option<String>,

/// Filters the response by a domain ID.
#[param(nullable = false)]
pub domain_id: Option<String>,

/// Filters the response by a idp ID.
#[param(nullable = false)]
pub idp_id: Option<String>,

/// Filters the response by a mapping type.
#[param(nullable = false)]
pub r#type: Option<MappingType>,
}

Expand Down
Loading