๐ Fix non-deterministic openapi spec in case of duplicated model names by igoyak ยท Pull Request #14797 ยท fastapi/fastapi
igoyak
marked this pull request as ready for review
v0.128.0 introduced non-deterministic openapi spec schema naming in the case of multiple pydantic models with the same name. Commit [e300630](fastapi@e300630#diff-1086603fdd56511aafd1d279396b142b803e48164327148e6de26cef4cdaed81L504) removed the check for conflicting names. The component names two classes named `User` would randomly be either ``` User tests__test_duplicate_model_names_openapi__b__model__User ``` ``` tests__test_duplicate_model_names_openapi__a__model__User User ``` With this change, we reintroduce the conflict check to always use a hash of the fully qualified names in case of conflict.
YuriiMotov
changed the title
Fix non-deterministic openapi spec
๐ Fix non-deterministic openapi spec in case of duplicated model names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters