All GetXXXResponseContent types declare all fields as Optional in Management API
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 52/100
Piste de recherche
Commencez par localiser les modèles GetXXXResponseContent utilisés par les endpoints .get() de la Management API et comparez leurs champs avec la documentation API liée. Identifiez les champs documentés comme étant toujours présents, rendez leur typage de réponse non optionnel et vérifiez les annotations mises à jour sur des endpoints représentatifs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Checklist
- I have looked into the Readme and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
The return types for .get() functions declare all fields to be optional. An example here for an organization:
class GetOrganizationResponseContent(UniversalBaseModel):
id: typing.Optional[str] = pydantic.Field(default=None)
"""
Organization identifier.
"""
name: typing.Optional[str] = pydantic.Field(default=None)
"""
The name of this organization.
"""
display_name: typing.Optional[str] = pydantic.Field(default=None)
"""
Friendly name of this organization.
"""
branding: typing.Optional[OrganizationBranding] = None
metadata: typing.Optional[OrganizationMetadata] = None
token_quota: typing.Optional[TokenQuota] = None
However the API documentation does not say id, display_name or name can be None : https://auth0.com/docs/fr-ca/api/management/v2/organizations/get-organizations
This forces developers to correct the typing after the fact with typing.cast or disable typing of the concerned lines.
Reproduction
- Call any endpoint in the Management API
- Use a field that should never been None (for exemple user.email or user.id)
- The IDE or type checker will warn you this field could be None.
Additional context
No response
auth0-python version
5.1.0
Python version
3.12
- Langage dominant
- Python
- Étoiles
- 578
- Forks
- 190
- Merge moyen
- 15 h
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de auth0/auth0-python
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
auth0/auth0-python#852 ·
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
auth0/auth0-python#856 · 4 commentaires · 1 réaction ·
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
auth0/auth0-python#789 · 1 commentaire · 1 réaction ·
Toutes les issues de auth0/auth0-python
Issues similaires
-
needs-human needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
gke-labs/kube-agents#2400 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Device Details tables: FS/SF columns contradict each other (nfet_01v8 Vt row, pfet_01v8 Idsat row)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
google/skywater-pdk#450 ·
-
Drained trajectory arrays are overwritten when the sequence buffer is reusedPeut-être pris @sylvesterkaczmarek l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
google-deepmind/bsuite#56 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
LearningCircuit/local-deep-research#7206 ·
Les mainteneurs répondent en général sous 1 jour
-
[TASK] Document technology stackOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
chingu-voyages/V62-tier3-team-33#285 ·
Les mainteneurs répondent en général sous 1 jour