Closed czechboy0 closed 1 month ago
Depends on https://github.com/apple/swift-openapi-generator/pull/638, so don't review until that lands.
Continuation of #638, broke up into multiple PRs for easier review.
Also a non-functional change, purely a refactoring.
Changed a bunch of TypeMatcher methods from static to being instance methods, which gives them access to the translator context.
Moved a few other methods that depended on the static methods to be extensions on the closest type that already has access to the context.
Now TypeAssigner/TypeMatcher can take runtime configuration, e.g. through feature flags.
All tests still pass.
I'll wait until the other PR lands, but will approve it when it's all rebased.
Okay, ready to go.
Motivation
Depends on https://github.com/apple/swift-openapi-generator/pull/638, so don't review until that lands.
Continuation of #638, broke up into multiple PRs for easier review.
Also a non-functional change, purely a refactoring.
Modifications
Changed a bunch of TypeMatcher methods from static to being instance methods, which gives them access to the translator context.
Moved a few other methods that depended on the static methods to be extensions on the closest type that already has access to the context.
Result
Now TypeAssigner/TypeMatcher can take runtime configuration, e.g. through feature flags.
Test Plan
All tests still pass.