diff --git a/dropshot/src/api_description.rs b/dropshot/src/api_description.rs index 23fd0de1..51380a0d 100644 --- a/dropshot/src/api_description.rs +++ b/dropshot/src/api_description.rs @@ -1,4 +1,4 @@ -// Copyright 2025 Oxide Computer Company +// Copyright 2026 Oxide Computer Company //! Describes the endpoints and handler functions in your API @@ -996,10 +996,16 @@ impl ApiDescription { }, ); openapiv3::Response { - // TODO: perhaps we should require even free-form - // responses to have a description since it's required - // by OpenAPI. - description: "".to_string(), + description: if let Some(description) = + &endpoint.response.description + { + description.clone() + } else { + // TODO: perhaps we should require even free-form + // responses to have a description since it's required + // by OpenAPI. + "".to_string() + }, content, ..Default::default() } diff --git a/dropshot/src/websocket.rs b/dropshot/src/websocket.rs index a2fee96e..e9d5963a 100644 --- a/dropshot/src/websocket.rs +++ b/dropshot/src/websocket.rs @@ -1,4 +1,5 @@ -// Copyright 2023 Oxide Computer Company +// Copyright 2026 Oxide Computer Company + //! Implements websocket upgrades as an Extractor for use in API route handler //! parameters to indicate that the given endpoint is meant to be upgraded to //! a websocket. @@ -6,11 +7,12 @@ //! This exposes a raw upgraded HTTP connection to a user-provided async future, //! which will be spawned to handle the incoming connection. -use crate::api_description::ExtensionMode; +use crate::api_description::{ApiSchemaGenerator, ExtensionMode}; use crate::body::Body; +use crate::handler::HttpHandlerResult; use crate::{ - ApiEndpointBodyContentType, ExclusiveExtractor, ExtractorMetadata, - HttpError, RequestContext, ServerContext, + ApiEndpointBodyContentType, ApiEndpointResponse, ExclusiveExtractor, + ExtractorMetadata, HttpError, HttpResponse, RequestContext, ServerContext, }; use async_trait::async_trait; use base64::Engine; @@ -45,7 +47,39 @@ pub type WebsocketChannelResult = /// [WebsocketUpgrade::handle]'s return type. /// The `#[endpoint]` handler must return the value returned by /// [WebsocketUpgrade::handle]. (This is done for you by `#[channel]`.) -pub type WebsocketEndpointResult = Result, HttpError>; +pub type WebsocketEndpointResult = Result; + +pub struct SwitchingToWebsocket { + accept_key: String, +} + +impl HttpResponse for SwitchingToWebsocket { + fn to_result(self) -> HttpHandlerResult { + Response::builder() + .status(StatusCode::SWITCHING_PROTOCOLS) + .header(header::CONNECTION, "Upgrade") + .header(header::UPGRADE, "websocket") + .header(header::SEC_WEBSOCKET_ACCEPT, self.accept_key) + .body(Body::empty()) + .map_err(Into::into) + } + fn response_metadata() -> ApiEndpointResponse { + const UPGRADE_DESCRIPTION: &str = + "Negotiating protocol upgrade from HTTP/1.1 to WebSocket"; + ApiEndpointResponse { + schema: Some(ApiSchemaGenerator::Static { + schema: Box::new(schemars::schema::Schema::Bool(false)), + dependencies: Default::default(), + }), + headers: vec![], + success: Some(StatusCode::SWITCHING_PROTOCOLS), + description: Some(UPGRADE_DESCRIPTION.to_string()), + } + } + fn status_code(&self) -> StatusCode { + StatusCode::SWITCHING_PROTOCOLS + } +} /// The upgraded connection passed as the last argument to the websocket /// handler function. [`WebsocketConnection::into_inner`] can be used to @@ -257,13 +291,7 @@ impl WebsocketUpgrade { } } }); - Response::builder() - .status(StatusCode::SWITCHING_PROTOCOLS) - .header(header::CONNECTION, "Upgrade") - .header(header::UPGRADE, "websocket") - .header(header::SEC_WEBSOCKET_ACCEPT, accept_key) - .body(Body::empty()) - .map_err(Into::into) + Ok(SwitchingToWebsocket { accept_key }) } } } diff --git a/dropshot/tests/fail/bad_channel17.stderr b/dropshot/tests/fail/bad_channel17.stderr index 24b0d857..d4d10b78 100644 --- a/dropshot/tests/fail/bad_channel17.stderr +++ b/dropshot/tests/fail/bad_channel17.stderr @@ -38,7 +38,7 @@ note: required by a bound in `need_shared_extractor` | ------------------- required by a bound in this function = note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {two_websocket_channels_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future> {two_websocket_channels_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel17.rs:16:1 | 12 | / #[channel { @@ -49,7 +49,7 @@ error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, Webso 16 | async fn two_websocket_channels( | ^^^^^ unsatisfied trait bound | - = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {two_websocket_channels_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future> {two_websocket_channels_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_channel18.stderr b/dropshot/tests/fail/bad_channel18.stderr index d1287c03..50d75c79 100644 --- a/dropshot/tests/fail/bad_channel18.stderr +++ b/dropshot/tests/fail/bad_channel18.stderr @@ -77,7 +77,7 @@ note: required by a bound in `validate_websocket_connection_type` 26 | _query: Query, | ^^^^^ required by this bound in `validate_websocket_connection_type` -error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {websocket_channel_not_last_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future> {websocket_channel_not_last_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel18.rs:23:1 | 19 | / #[channel { @@ -88,7 +88,7 @@ error[E0277]: the trait bound `fn(RequestContext<()>, WebsocketConnection, Webso 23 | async fn websocket_channel_not_last( | ^^^^^ unsatisfied trait bound | - = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {websocket_channel_not_last_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, WebsocketConnection, WebsocketUpgrade) -> impl Future> {websocket_channel_not_last_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_channel19.stderr b/dropshot/tests/fail/bad_channel19.stderr index 54e55d3c..0903f873 100644 --- a/dropshot/tests/fail/bad_channel19.stderr +++ b/dropshot/tests/fail/bad_channel19.stderr @@ -38,7 +38,7 @@ note: required by a bound in `need_shared_extractor` | ------ required by a bound in this function = note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `fn(RequestContext<()>, std::string::String, WebsocketUpgrade) -> impl Future, HttpError>> {non_extractor_as_last_argument_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(RequestContext<()>, std::string::String, WebsocketUpgrade) -> impl Future> {non_extractor_as_last_argument_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel19.rs:23:1 | 19 | / #[channel { @@ -49,7 +49,7 @@ error[E0277]: the trait bound `fn(RequestContext<()>, std::string::String, Webso 23 | async fn non_extractor_as_last_argument( | ^^^^^ unsatisfied trait bound | - = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, std::string::String, WebsocketUpgrade) -> impl Future, HttpError>> {non_extractor_as_last_argument_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, std::string::String, WebsocketUpgrade) -> impl Future> {non_extractor_as_last_argument_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_channel4.stderr b/dropshot/tests/fail/bad_channel4.stderr index 22e0f2fa..d7bb884a 100644 --- a/dropshot/tests/fail/bad_channel4.stderr +++ b/dropshot/tests/fail/bad_channel4.stderr @@ -185,7 +185,7 @@ note: required by a bound in `dropshot::Query` | ^^^^^^^^^^^^^^^^ required by this bound in `Query` = note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel4.rs:20:1 | 16 | / #[channel { @@ -196,7 +196,7 @@ error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query` is not implemented for fn item `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_channel5.stderr b/dropshot/tests/fail/bad_channel5.stderr index a5ba4bbb..3e6d0820 100644 --- a/dropshot/tests/fail/bad_channel5.stderr +++ b/dropshot/tests/fail/bad_channel5.stderr @@ -96,7 +96,7 @@ note: required by a bound in `dropshot::Query` | ^^^^^^^^^^^^^^^^ required by this bound in `Query` = note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel5.rs:22:1 | 18 | / #[channel { @@ -107,7 +107,7 @@ error[E0277]: the trait bound `fn(RequestContext<()>, dropshot::Query` is not implemented for fn item `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(RequestContext<()>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_channel9.stderr b/dropshot/tests/fail/bad_channel9.stderr index 50b11810..6450aabf 100644 --- a/dropshot/tests/fail/bad_channel9.stderr +++ b/dropshot/tests/fail/bad_channel9.stderr @@ -26,7 +26,7 @@ help: the trait `RequestContextArgument` is implemented for `RequestContext` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `channel` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `fn(dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_channel9.rs:23:1 | 19 | / #[channel { @@ -37,7 +37,7 @@ error[E0277]: the trait bound `fn(dropshot::Query, WebsocketUpgrade 23 | async fn bad_channel( | ^^^^^ unsatisfied trait bound | - = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_trait_channel17.stderr b/dropshot/tests/fail/bad_trait_channel17.stderr index f55434e1..1f6c056b 100644 --- a/dropshot/tests/fail/bad_trait_channel17.stderr +++ b/dropshot/tests/fail/bad_trait_channel17.stderr @@ -35,7 +35,7 @@ note: required by a bound in `ApiEndpoint::::new_for_types` | FuncParams: RequestExtractor + 'static, | ^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::::new_for_types` -error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {two_websocket_channels_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future> {two_websocket_channels_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_trait_channel17.rs:15:5 | 10 | #[dropshot::api_description] @@ -48,7 +48,7 @@ error[E0277]: the trait bound `fn(dropshot::RequestContext<` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {two_websocket_channels_adapter::}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future> {two_websocket_channels_adapter::}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_trait_channel18.stderr b/dropshot/tests/fail/bad_trait_channel18.stderr index 1f347ffe..f49a0396 100644 --- a/dropshot/tests/fail/bad_trait_channel18.stderr +++ b/dropshot/tests/fail/bad_trait_channel18.stderr @@ -74,7 +74,7 @@ note: required by a bound in `ApiEndpoint::::new_for_types` | FuncParams: RequestExtractor + 'static, | ^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::::new_for_types` -error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {websocket_channel_not_last_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future> {websocket_channel_not_last_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_trait_channel18.rs:22:5 | 17 | #[dropshot::api_description] @@ -87,7 +87,7 @@ error[E0277]: the trait bound `fn(dropshot::RequestContext<` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future, HttpError>> {websocket_channel_not_last_adapter::}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::WebsocketConnection, WebsocketUpgrade) -> impl Future> {websocket_channel_not_last_adapter::}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_trait_channel19.stderr b/dropshot/tests/fail/bad_trait_channel19.stderr index eafb33b5..ebd41109 100644 --- a/dropshot/tests/fail/bad_trait_channel19.stderr +++ b/dropshot/tests/fail/bad_trait_channel19.stderr @@ -35,7 +35,7 @@ note: required by a bound in `ApiEndpoint::::new_for_types` | FuncParams: RequestExtractor + 'static, | ^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::::new_for_types` -error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, std::string::String, WebsocketUpgrade) -> impl Future, HttpError>> {middle_not_shared_extractor_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, std::string::String, WebsocketUpgrade) -> impl Future> {middle_not_shared_extractor_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_trait_channel19.rs:23:5 | 19 | #[dropshot::api_description] @@ -48,7 +48,7 @@ error[E0277]: the trait bound `fn(dropshot::RequestContext<` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, std::string::String, WebsocketUpgrade) -> impl Future, HttpError>> {middle_not_shared_extractor_adapter::}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, std::string::String, WebsocketUpgrade) -> impl Future> {middle_not_shared_extractor_adapter::}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_trait_channel4.stderr b/dropshot/tests/fail/bad_trait_channel4.stderr index 5b503915..80d1b268 100644 --- a/dropshot/tests/fail/bad_trait_channel4.stderr +++ b/dropshot/tests/fail/bad_trait_channel4.stderr @@ -358,7 +358,7 @@ note: required by a bound in `dropshot::Query` | pub struct Query { | ^^^^^^^^^^^^^^^^ required by this bound in `Query` -error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_trait_channel4.rs:20:5 | 16 | #[dropshot::api_description] @@ -371,7 +371,7 @@ error[E0277]: the trait bound `fn(dropshot::RequestContext<` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter::}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter::}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/fail/bad_trait_channel5.stderr b/dropshot/tests/fail/bad_trait_channel5.stderr index 2b5d9b47..1f108053 100644 --- a/dropshot/tests/fail/bad_trait_channel5.stderr +++ b/dropshot/tests/fail/bad_trait_channel5.stderr @@ -187,7 +187,7 @@ note: required by a bound in `dropshot::Query` | pub struct Query { | ^^^^^^^^^^^^^^^^ required by this bound in `Query` -error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied +error[E0277]: the trait bound `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter::}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied --> tests/fail/bad_trait_channel5.rs:21:5 | 17 | #[dropshot::api_description] @@ -200,7 +200,7 @@ error[E0277]: the trait bound `fn(dropshot::RequestContext<` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future, HttpError>> {bad_channel_adapter::}` + = help: the trait `dropshot::handler::HttpHandlerFunc<_, _, _>` is not implemented for fn item `fn(dropshot::RequestContext<::Context>, dropshot::Query, WebsocketUpgrade) -> impl Future> {bad_channel_adapter::}` note: required by a bound in `ApiEndpoint::::new` --> src/api_description.rs | diff --git a/dropshot/tests/test_openapi.json b/dropshot/tests/test_openapi.json index 9dfaeb02..bf49feec 100644 --- a/dropshot/tests/test_openapi.json +++ b/dropshot/tests/test_openapi.json @@ -328,13 +328,14 @@ ], "operationId": "vzerolower", "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -348,7 +349,7 @@ "operationId": "handler18", "responses": { "200": { - "description": "", + "description": "successful operation", "content": { "*/*": { "schema": {} diff --git a/dropshot/tests/test_openapi_fuller.json b/dropshot/tests/test_openapi_fuller.json index bfc94458..ffc25577 100644 --- a/dropshot/tests/test_openapi_fuller.json +++ b/dropshot/tests/test_openapi_fuller.json @@ -336,13 +336,14 @@ ], "operationId": "vzerolower", "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -356,7 +357,7 @@ "operationId": "handler18", "responses": { "200": { - "description": "", + "description": "successful operation", "content": { "*/*": { "schema": {}