Skip to content

Commit 3f5c3f3

Browse files
authored
silo query param for saml_identity_provider_view should be optional (#8136)
1 parent 00d0a38 commit 3f5c3f3

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

nexus/external-api/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ pub trait NexusExternalApi {
498498
async fn saml_identity_provider_view(
499499
rqctx: RequestContext<Self::Context>,
500500
path_params: Path<params::ProviderPath>,
501-
query_params: Query<params::SiloSelector>,
501+
query_params: Query<params::OptionalSiloSelector>,
502502
) -> Result<HttpResponseOk<views::SamlIdentityProvider>, HttpError>;
503503

504504
// TODO: no DELETE for identity providers?

nexus/src/external_api/http_entrypoints.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ impl NexusExternalApi for NexusExternalApiImpl {
706706
async fn saml_identity_provider_view(
707707
rqctx: RequestContext<ApiContext>,
708708
path_params: Path<params::ProviderPath>,
709-
query_params: Query<params::SiloSelector>,
709+
query_params: Query<params::OptionalSiloSelector>,
710710
) -> Result<HttpResponseOk<views::SamlIdentityProvider>, HttpError> {
711711
let apictx = rqctx.context();
712712
let handler = async {
@@ -717,7 +717,7 @@ impl NexusExternalApi for NexusExternalApiImpl {
717717
let query = query_params.into_inner();
718718
let saml_identity_provider_selector =
719719
params::SamlIdentityProviderSelector {
720-
silo: Some(query.silo),
720+
silo: query.silo,
721721
saml_identity_provider: path.provider,
722722
};
723723
let (.., provider) = nexus

openapi/nexus.json

-1
Original file line numberDiff line numberDiff line change
@@ -7523,7 +7523,6 @@
75237523
"in": "query",
75247524
"name": "silo",
75257525
"description": "Name or ID of the silo",
7526-
"required": true,
75277526
"schema": {
75287527
"$ref": "#/components/schemas/NameOrId"
75297528
}

0 commit comments

Comments
 (0)