Bixby Developer Center

Guides
References

restricts-matching

optional

Controls whether matchable resources (such views, strategies, etc.) in the library capsule can be overridden by importing capsules using more specific match patterns.

The restricts-matching block must specify one (and only one) of its child keys:

  • all: the matching restriction applies to all concepts in the library except those specified in the all block with except. This creates a list of concepts for which overriding is explicitly allowed. All other concepts within the library capsule cannot be overridden.

    capsule {
    library {
    restricts-matching {
    all {
    except (AllowedConceptOne)
    except (AllowedConceptTwo)
    }
    }
    }
    }
  • only: the matching restriction only applies to concepts specified in the only block with for. This creates a list of concepts for which overriding is explicitly disallowed. All other concepts within the library capsule can be overridden.

    capsule {
    library {
    restricts-matching {
    only {
    for (DisallowedConceptOne)
    for (DisallowedConceptTwo)
    }
    }
    }
    }

If your library capsule does not include a restricts-matching block, no restrictions will be placed on match overrides. This is the equivalent of specifying an empty only list.

Child Keys

all
optional
Specifies a list of concepts for which overriding is explicitly allowed
only
optional
Specifies a list of concepts for which overriding is explicitly disallowed