class

Detector::Specification::Apisix

Inherits Detector < Reference < Object

Constants

PAYLOAD_MARKER = /\bupstream_id\b|\bservice_id\b|\bplugins\b|\bupstream\b/
ROUTES_MARKER = /\broutes\b/

Word-bounded guard markers. The accepted shapes require actual routes / uri(uris) plus upstream_id, plugins, an inline upstream mapping, or service_id. Those keys always appear word-bounded in the raw document ("uri": / uri:), so \b keeps the guard a necessary condition while no longer tripping on substrings — the bare includes?("uri") matched "security" and made large OpenAPI JSON specs pay a full redundant parse here on every scan (this detector is non-idempotent). \bupstream\b does not match upstream_id (_ is a word character), and the signature check below still requires upstream to be a mapping, so a prose mention or a scalar value never accepts the file.

URI_MARKER = /\buris?\b/

Instance methods

applicable?(filename : String) : Bool

Registers every APISIX route config path in CodeLocator.

Source
detect(filename : String, file_contents : String) : Bool
Source
idempotent?

Registers every APISIX route config path in CodeLocator.

Source
name

Registers every APISIX route config path in CodeLocator.

Source