Skip to content

API - ability to reset individual mocks without lock/unlock #259

@coryjquirk

Description

@coryjquirk

I'm currently working on an implementation of the Smocker mock server. Thank you for the lovely project that is built so far.

At this time with POST /reset, it seems the only available method to clear an individual mock with an API call is to:

  1. Lock all other mocks besides the one to be cleared
  2. Call POST /reset to clear the singular unlocked mock

Potential feature: Pass in a list of mock IDs as the body for a call to POST /reset to specify which mocks should be cleared. This clears the mock and history of calls associated with specified mock(s).

This could perhaps be implemented similar to how we can pass in a list of mock IDs as a body with POST /mocks/lock and POST /mocks/unlock.

My apologies if this potential feature idea has already been addressed elsewhere. If that's the case, please redirect me to where this work is already being done. I intend on attempting to contribute code for this feature, although I'm new to writing in Go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions