django-ninja
django-ninja copied to clipboard
respect the 'by_alias' route config also in generated docs for 'json body' data
if you have an alias_generator to_camel, the current behavior does not respect the by_alias config from the router when it comes to request body data and how the api documentation then is generated for that request body. Today the code that generates the request body docs, defaults to True without ever passing the operation.by_alias into the function. This PR should correct that.
Hi @kristian-lindin
Thank you for PR - could you also make a test case that covers this ?
I have added tests for it now. Feel free to check it out. I think the CI should succeed.
On another note: It seems like the "make lint" uses a ruff formatting that is incompatible with the formatting check on the CI.
Hey @kristian-lindin this was super helpful for a similar issue I was facing, thanks!
@vitalik is there anything else this needs before it's ready to merge? Happy to assist if so.
@vitalik Please let me know if there is anything else I can do to move this PR forward.
@vitalik As mentioned, I feel like this PR should be ready. Let me know if I can do anything to get this PR to move forward or help in any way!
@vitalik Once again. Please let me know if I can assist in anyway to move this PR forward 🙏!
Agreed, this would be super helpful to have merged in! Thank you all
@vitalik I'll try another ping to try to move this PR forward. Its been pending for 9 months without and kind of response. As mentioned, Im happy to help in anyway I can, just say the word ❤️ !