📝 Add `Parser.validate` method to perform import-time checks (#1304)
While working on #1275, I realized that proposed
OctetStreamParser is kinda unique,because it must not contain
Body[...] near FileMetadata[...] defintions.Why? Because it only accepts a single stream of bytes, there can't be a body nearby.
So, what should we do for similar cases? I propose adding
validate method to the Parser class, empty by default. It would be similar to ComponentParser.validate method. And then call it in validation process.This test parser should check that it only works on endpoints with
FileMetadata and no Body.#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator