pub struct ConformanceConfig {
pub target_url: String,
pub api_key: Option<String>,
pub basic_auth: Option<String>,
pub skip_tls_verify: bool,
pub categories: Option<Vec<String>>,
pub base_path: Option<String>,
pub custom_headers: Vec<(String, String)>,
}Expand description
Configuration for conformance test generation
Fields§
§target_url: StringTarget base URL
api_key: Option<String>API key for security scheme tests
basic_auth: Option<String>Basic auth credentials (user:pass) for security scheme tests
skip_tls_verify: boolSkip TLS verification
categories: Option<Vec<String>>Optional category filter — None means all categories
base_path: Option<String>Optional base path prefix for all generated URLs (e.g., “/api”)
custom_headers: Vec<(String, String)>Custom headers to inject into every conformance request (e.g., auth headers). Each entry is (header_name, header_value). When a custom header matches a spec-derived header name, the custom value replaces the placeholder.
Implementations§
Source§impl ConformanceConfig
impl ConformanceConfig
Sourcepub fn should_include_category(&self, category: &str) -> bool
pub fn should_include_category(&self, category: &str) -> bool
Check if a category should be included based on the filter
Sourcepub fn has_custom_headers(&self) -> bool
pub fn has_custom_headers(&self) -> bool
Returns true if custom headers are configured
Sourcepub fn custom_headers_js_object(&self) -> String
pub fn custom_headers_js_object(&self) -> String
Format custom headers as a JS object literal string
Sourcepub fn effective_base_url(&self) -> String
pub fn effective_base_url(&self) -> String
Returns the effective base URL with base_path appended. Handles trailing/leading slash normalization to avoid double slashes.
Auto Trait Implementations§
impl Freeze for ConformanceConfig
impl RefUnwindSafe for ConformanceConfig
impl Send for ConformanceConfig
impl Sync for ConformanceConfig
impl Unpin for ConformanceConfig
impl UnsafeUnpin for ConformanceConfig
impl UnwindSafe for ConformanceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more