Skip to content
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

chore: Minor tweaks to the HttpRequest definitions #4790

Merged
merged 1 commit into from
Jun 4, 2024
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
6 changes: 4 additions & 2 deletions lib/config/src/app/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub struct HttpRequest {
pub method: Option<String>,

/// Request body as a string.
#[serde(skip_serializing_if = "Option::is_none")]
pub body: Option<String>,

/// Request timeout.
Expand All @@ -21,6 +22,7 @@ pub struct HttpRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
pub expect: Option<HttpRequestExpect>,
}

Expand All @@ -30,8 +32,8 @@ pub struct HttpRequest {
)]
pub struct HttpRequestExpect {
/// Expected HTTP status codes.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub status_codes: Vec<u16>,
#[serde(skip_serializing_if = "Option::is_none")]
pub status_codes: Option<Vec<u16>>,

/// Text that must be present in the response body.
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
1 change: 1 addition & 0 deletions lib/config/src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ pub struct AppConfigCapabilityMapV1 {
pub memory: Option<AppConfigCapabilityMemoryV1>,

/// Enables app bootstrapping with startup snapshots.
#[serde(skip_serializing_if = "Option::is_none")]
pub instaboot: Option<AppConfigCapabilityInstaBootV1>,
}

Expand Down
Loading