chore: refactor all tests by category by mromaszewicz · Pull Request #2260 · oapi-codegen/oapi-codegen

@mromaszewicz @claude

Replace the organically-grown test directory structure (issue-numbered
directories, flat parameter/component tests) with a feature-based taxonomy
that makes coverage visible at a glance.

New structure:
  components/{primitives,objects,nullable,recursive}
  aggregates/{allof,anyof,oneof}
  parameters/{path/{simple,label,matrix},query/{form,deep_object},
              header/simple,cookie/form,content,precedence,encoding}
  externalref/ (multi-package external $ref qualification)

Each directory contains a minimal OpenAPI spec exercising one feature,
a config.yaml, a doc.go with go:generate, committed generated code,
and round-trip tests that instantiate types and verify JSON marshaling.

Key changes:
- Absorb issue-specific directories into feature categories
- Delete old flat test directories (server/, strict-server/, client/,
  schemas/, cookies/, compatibility/, filter/, outputoptions/, etc.)
- Add comprehensive parameter permutation coverage across all
  location x style x explode x value-type combinations
- Fold issue-2113 (external ref in responses) into externalref/
- Add tools.go to keep oapi-codegen/v2 in go.mod for go:generate
  (previously kept alive implicitly by old test imports)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>