counterfact
counterfact copied to clipboard
Add Warning to Module Tree if Ambiguous Wildcards Detected
While it is invalid API spec to have two wildcard paths at the same path defined (see issue #1308) it is possible to end up in a state where you have two such as the referenced issue or from just manually creating a second endpoint. The module-tree.ts class has enough logic in place to be aware that more than a single leaf wildcard path has been found for a given path. We should at the least show a console log warning when this is detected to raise awareness to the consumer.
Also maybe send a 500 response when that happens? Fail fast and loud.