Is your feature request related to a problem? Please describe.
/api/validate semantically isn't correct for the functionality it holds. It should be used for verifying/parsing a dockerignore.
Describe the solution you'd like
A separate /api/match (or something to that effect) should be used for what /api/validate is currently doing - matching a dockerignore against a set of filepaths.
Describe alternatives you've considered
N/A
Additional context
N/A