Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PC-31554)[API]docs: updated API documentation. externalTicketOfficeUrl field of offer model is now deprecated #13952

Closed

Conversation

pcharlet-pass
Copy link
Contributor

@pcharlet-pass pcharlet-pass commented Sep 3, 2024

But de la pull request

Ticket Jira : https://passculture.atlassian.net/browse/PC-31554

Vérifications

  • J'ai écrit les tests nécessaires
  • J'ai mis à jour le fichier des plans de tests du portail pro si nécessaire
  • J'ai mis à jour la liste des routes et des titres de pages du portail pro si j'en ai rajouté/modifié ou supprimé une.
  • J'ai relu attentivement les migrations, en particulier pour éviter les locks, et je préviens les équipes Shérif et Data
  • J'ai ajouté des screenshots pour d'éventuels changements graphiques

image

Copy link
Contributor

@tcoudray-pass tcoudray-pass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bon là je demande des changements parce que ça casse le design 😬.

Pour les changements concernant la documentation, il faut mettre les screenshots dans la PR car ce sont des "changements graphiques" (dernier point de la checklist de PR). Ça permet d'attraper le genre d'erreur que je t'ai remontée.

Tu peux générer la documentation en local. Toute la doc est dans ce README 🙂. Si jamais elle n'est pas claire, ou plus à jour, n'hésite pas à la modifier.

Comment on lines 7 to 10
:::warning
Offer field `externalTicketOfficeUrl` is now deprecated and is going to be removed in the coming months.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il manque::: après ton texte ce qui casse le design (cf. screenshot)

Suggested change
:::warning
Offer field `externalTicketOfficeUrl` is now deprecated and is going to be removed in the coming months.
:::warning
Offer field `externalTicketOfficeUrl` is now deprecated and is going to be removed in the coming months.
:::

image

@@ -146,7 +146,7 @@ class CategoryRelatedFields(ExtraDataModel):
CATEGORY_RELATED_FIELD = pydantic_v1.Field(..., description=CATEGORY_RELATED_FIELD_DESCRIPTION)
EXTERNAL_TICKET_OFFICE_URL_FIELD = pydantic_v1.Field(
None,
description="Link displayed to users wishing to book the offer but who do not have credit.",
description="**(deprecated)** Link displayed to users wishing to book the offer but who do not have credit.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu peux en profiter pour déplacer le field dans le fichier fields.py. Toutes les descriptions des champs doivent être migrées dans ce fichier à terme

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'ajout de ce retour chariot me donne l'impression que tu as modifié ce fichier à la main, ce qu'il ne faut pas faire.

Pour le mettre à jour il faut utiliser la commande generate_expected_openapi_json :

  • Si tu utilises docker, il suffit de lancer la commande pc generate_expected_openapi_json
  • si tu run flask en local, flask generate_expected_openapi_json

C'est beaucoup plus pratique 😃

@pcharlet-pass pcharlet-pass force-pushed the pcharlet/pc-31554-doc-update-field-deprecated branch from b750835 to bb4defc Compare September 4, 2024 10:21
@pcharlet-pass
Copy link
Contributor Author

Abandon de la dépréciation de ce champ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants