fastapi icon indicating copy to clipboard operation
fastapi copied to clipboard

feat: supported globally setting response_model_by_alias

Open MarkShawn2020 opened this issue 1 year ago • 5 comments

It enables user to set response_model_by_alias in APIRouter, and the inherience effect is tested as expected.

root_router = APIRouter(prefix='/', response_model_by_alias=False)

MarkShawn2020 avatar May 21 '23 06:05 MarkShawn2020

📝 Docs preview for commit 153da479312efb97bc4dd24cb02064f74047301f at: https://6469bfcb28956c425b64f3db--fastapi.netlify.app

github-actions[bot] avatar May 21 '23 06:05 github-actions[bot]

📝 Docs preview for commit 85270768c17dddc3dd733f9881f04ea8d16b56c6 at: https://646a1d6bd4f25f0912a83938--fastapi.netlify.app

github-actions[bot] avatar May 21 '23 13:05 github-actions[bot]

📝 Docs preview for commit 8454aed0f29a44143f97c203e0a0442810186e0e at: https://646a23b58d6d8d04d0015ed0--fastapi.netlify.app

github-actions[bot] avatar May 21 '23 13:05 github-actions[bot]

Since I changed the param type, and added extra param for APIRouter, the doc should be updated as necessary.

MarkShawn2020 avatar May 21 '23 13:05 MarkShawn2020

Would be great to get this in!

samredway avatar May 03 '24 15:05 samredway