pub struct AutoGenerator { /* private fields */ }Expand description
Auto-generator for creating mocks from 404s
Implementations§
Source§impl AutoGenerator
impl AutoGenerator
Sourcepub fn new(config: RuntimeDaemonConfig, management_api_url: String) -> Self
pub fn new(config: RuntimeDaemonConfig, management_api_url: String) -> Self
Create a new auto-generator
Sourcepub async fn generate_mock_from_404(
&self,
method: &str,
path: &str,
) -> Result<()>
pub async fn generate_mock_from_404( &self, method: &str, path: &str, ) -> Result<()>
Generate a mock from a 404 response
This is the main entry point that orchestrates all the generation steps:
- Create mock endpoint with intelligent response
- Generate type (TypeScript/JSON schema)
- Generate client stub code
- Add to OpenAPI schema
- Add example response
- Set up basic scenario
Auto Trait Implementations§
impl Freeze for AutoGenerator
impl RefUnwindSafe for AutoGenerator
impl Send for AutoGenerator
impl Sync for AutoGenerator
impl Unpin for AutoGenerator
impl UnwindSafe for AutoGenerator
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
Mutably borrows from an owned value. Read more