Scope & discovery
These knobs decide the inputs and the surface of the scan: which packages codescan reads, which types become definitions, and how that set is trimmed or merged before anything is rendered.
- Limit what gets scanned — package patterns, working directory, include/exclude filters, tag filters, and dependency handling.
- codescan never invents definitions — a type appears only when it is reachable or registered. Understand reachability and swagger:model so nothing goes missing or appears unexpectedly.
- Scan a shared library with swagger:model discovery, then keep only the definitions actually reachable from your API — the middle ground between “only what routes use” and “every model, used or not”.
- Merge scanned discoveries on top of an existing Swagger document with InputSpec.
- Scan source guarded by Go build constraints by passing build tags to the scanner.