Skip to content

Require route NameOrId optionally for route get endpoint #7997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2025
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 nexus/external-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,7 @@ pub trait NexusExternalApi {
async fn vpc_router_route_view(
rqctx: RequestContext<Self::Context>,
path_params: Path<params::RoutePath>,
query_params: Query<params::RouterSelector>,
query_params: Query<params::OptionalRouterSelector>,
) -> Result<HttpResponseOk<RouterRoute>, HttpError>;

/// Create route
Expand Down
4 changes: 2 additions & 2 deletions nexus/src/external_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5450,7 +5450,7 @@ impl NexusExternalApi for NexusExternalApiImpl {
async fn vpc_router_route_view(
rqctx: RequestContext<ApiContext>,
path_params: Path<params::RoutePath>,
query_params: Query<params::RouterSelector>,
query_params: Query<params::OptionalRouterSelector>,
) -> Result<HttpResponseOk<RouterRoute>, HttpError> {
let apictx = rqctx.context();
let handler = async {
Expand All @@ -5462,7 +5462,7 @@ impl NexusExternalApi for NexusExternalApiImpl {
let route_selector = params::RouteSelector {
project: query.project,
vpc: query.vpc,
router: Some(query.router),
router: query.router,
route: path.route,
};
let (.., route) = nexus
Expand Down
1 change: 0 additions & 1 deletion openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -11005,7 +11005,6 @@
"in": "query",
"name": "router",
"description": "Name or ID of the router",
"required": true,
"schema": {
"$ref": "#/components/schemas/NameOrId"
}
Expand Down
Loading