Open
Description
Describe the bug
This is transferred from Azure/autorest.python#2964
we add "_models." in our generated code.
e.g.
def init(
self,
*,
vectorizer_name: str,
ai_services_vision_parameters: Optional["_models.AIServicesVisionParameters"] = None,
**kwargs: Any
) -> None:
The reason is to avoid name conflicts. we've had issues in the past, for example, if an enum is named the same thing as a model, by tying it to _models (we also make it private so we're not exposing anything), we avoid naming conflicts.
Unfortunately, Sphinx cannot parse the model "_models.AIServicesVisionParameters" correctly.
In Sphinx generated code, it shows
_models.SearchIndexerDataIdentity
and loses xref.
We need to find some other ways to solve the name conflicts.
Reproduction
As above
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.