Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Pass current state of the definition to definition_helpers in APISpec.definition #122
Now pass the current state of the definition (i.e.
It will allow helpers to do modifications of nested value in the definition (like modifying a schema's property for example) without overriding the whole top-level dict (
Note that this relies on the order in which the helpers are executed, which is the registration order: the order of the plugins in the list you pass at APISpec init. This is also the case for path helpers. This could be an issue if you need a different order for path helpers and definition helpers. But this is more of a theoretical issue, I don't think it would be blocking in practice. Anyway, there's no reason to block this PR until this is addressed.
Care to add a test before we can merge this?
Also, I suggest this change:
- Definition: the current state of the definition of the schema + definition (dict): current state of the definition