Skip to content

feat: add ability to provide own mock id#304

Closed
malakagl wants to merge 3 commits into
smocker-dev:mainfrom
malakagl:add-ability-to-provide-own-mock-id
Closed

feat: add ability to provide own mock id#304
malakagl wants to merge 3 commits into
smocker-dev:mainfrom
malakagl:add-ability-to-provide-own-mock-id

Conversation

@malakagl

@malakagl malakagl commented Jun 7, 2024

Copy link
Copy Markdown

A solution that will fix. #295

Allows users to define their mock IDs in stubs definitions with mockId.

@gwleclerc

Copy link
Copy Markdown
Collaborator

Thanks for the PR @malakagl! 🙏

We're going to decline this one: client-provided IDs go against a core design choice — PRINCIPLES.md §3.6, IDs are opaque, randomly generated strings; nothing should depend on their shape or generator.

For the actual need in #295: GET /mocks already returns each mock's id under state.id, so you can read the generated IDs after registering your mocks — no need to set them yourself.

Thanks again for contributing!

@gwleclerc gwleclerc closed this Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants