Skip to content

Add substitute "{{uuid()}}" with a generated UUID #2

Description

@mantono

Sometimes requests needs to contain certain properties that can/should/must contain unique values on each request, like correlation IDs or idempotence keys. But it would be tiresome to manually regenerate and update these values before each request.

By adding a template variable that could indicate that a UUID should be generated instead of the placeholder, there would be no need to manually update it for each request. Syntax should preferrably something that is not too akward to read/write but neither something that is too likely to have a collision with an actual environment variable (and in case of collision, the user supplied environment variable should take precedence).

Exact format to use needs some additional consideration. Some examples might be;

  • {{UUID()}}
  • {{uuid()}}
  • {{_UUID}}
  • {{_uuid}}

There might also be similar use cases when for example a current date / time / timestamp might need to be provided as a part of a request.

This may be included as an optional feature since it would have an additional dependency on a crate for uuid generation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions