hab icon indicating copy to clipboard operation
hab copied to clipboard

[Request]: Config context wildcard support

Open MHendricks opened this issue 3 years ago • 0 comments

Description

Need a way to define generic department specific configurations and have them automatically apply to many/all uri's without needing to define the department overrides on every uri configuration.

Solution

Add the ability to specify wildcards for the context of an config.

{
    "name": "Pipeline",
    "context": ["**"],
    ...
}

Setting context to ["**"] would mean that any URI ending with /Pipeline would get this config applied. A single * would match a specific section of the uri, and ** would match multiple uri sections.

Example URI's that would load the above config:

  • Not-Match: example/Pipe
  • Match: example/Pipeline
  • Match: example/uri/with/more/sections/Pipeline
{
    "name": "Pipeline",
    "context": ["not_set", "*", "static", "*"],
    ...
}

You can mix and match wildcards and static values:

  • Match: not_set/example/static/case/Pipeline
  • Match: not_set/example/extra/static/case/Pipeline
  • Match: not_set/example/extra/static/case/case/Pipeline
  • Not-Match: not_set/example/case/Pipeline
  • Not-Match: other/example/static/case/Pipeline

Additional Context

No response

MHendricks avatar Dec 09 '22 22:12 MHendricks