Projet

Général

Profil

Development #70610

api-entreprise v3 : assurer la compatibilité avec la v2 là où c'est facile

Ajouté par Emmanuel Cazenave il y a plus d'un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
24 octobre 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Il y a quelques endpoint où la différence entre v2 et v3 est minime : changement d'URL, quelques variations dans le payload reçu.

Sur ces endpoint assurer la compatibilité est très simple, il serait dommage de s'en priver.

Les endpoints en question :

  • extraits_rcs
  • associations
  • documents_associations
  • etablissements

Fichiers

0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch (7,14 ko) 0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0001-api_entreprise-use-responses-in-unit-tests-70610.patch (23,2 ko) 0001-api_entreprise-use-responses-in-unit-tests-70610.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch (3,09 ko) 0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch (2,75 ko) 0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch (2,38 ko) 0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0006-api_entreprise-use-v3-in-association-s-document-rela.patch (5,22 ko) 0006-api_entreprise-use-v3-in-association-s-document-rela.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0007-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch (2,12 ko) 0007-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch Emmanuel Cazenave, 25 octobre 2022 18:13
0001-api_entreprise-use-responses-in-unit-tests-70610.patch (23,2 ko) 0001-api_entreprise-use-responses-in-unit-tests-70610.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch (7,14 ko) 0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch (3,09 ko) 0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch (2,75 ko) 0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch (2,38 ko) 0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0006-api_entreprise-use-v3-in-association-s-document-rela.patch (5,22 ko) 0006-api_entreprise-use-v3-in-association-s-document-rela.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0007-api_entreprise-add-assertions-in-etablissement-endpo.patch (1,85 ko) 0007-api_entreprise-add-assertions-in-etablissement-endpo.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0008-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch (4,61 ko) 0008-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch Emmanuel Cazenave, 14 décembre 2022 14:41
0001-api_entreprise-use-responses-in-unit-tests-70610.patch (23,2 ko) 0001-api_entreprise-use-responses-in-unit-tests-70610.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch (7,14 ko) 0002-api_entreprise-let-each-endpoint-targets-a-version-7.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch (3,09 ko) 0003-api_entreprise-do-not-use-Publik-json-format-when-no.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch (2,75 ko) 0004-api_entreprise-use-v3-in-extraits_rcs-endpoint-70610.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch (2,38 ko) 0005-api_entreprise-use-v3-in-associations-endpoint-70610.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0006-api_entreprise-use-v3-in-association-s-document-rela.patch (5,22 ko) 0006-api_entreprise-use-v3-in-association-s-document-rela.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0007-api_entreprise-add-assertions-in-etablissement-endpo.patch (2,33 ko) 0007-api_entreprise-add-assertions-in-etablissement-endpo.patch Emmanuel Cazenave, 02 janvier 2023 16:24
0008-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch (4,75 ko) 0008-api_entreprise-use-v3-in-etablissement-endpoint-7061.patch Emmanuel Cazenave, 02 janvier 2023 16:24

Demandes liées

Lié à Passerelle - Development #67549: API Entreprise v3 - évolutionsFermé31 janvier 2023

Actions

Révisions associées

Révision 7c30a795 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: use responses in unit tests (#70610)

Révision 9f8d1ba3 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: let each endpoint targets a version (#70610)

Révision f2d3c24c (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: do not use Publik json format when not needed (#70610)

Révision 4df3791e (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: use v3 in extraits_rcs endpoint (#70610)

Révision 35df56d0 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: use v3 in associations endpoint (#70610)

Révision 25048709 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: use v3 in association's document related endpoints (#70610)

Révision f710e0b1 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: add assertions in etablissement endpoint test (#70610)

Révision fc52f572 (diff)
Ajouté par Emmanuel Cazenave il y a environ un an

api_entreprise: use v3 in etablissement endpoint (#70610)

Historique

#1

Mis à jour par Emmanuel Cazenave il y a plus d'un an

#2

Mis à jour par Emmanuel Cazenave il y a plus d'un an

0001 pour m'éviter une migraine parce que je trouve le tests httmock illisibles
0002 pour sortir la version de la db
0003 pour pouvoir obtenir un résultat brut de api-entreprise

Les autres patchs ne nécessitent pas de commentaires particulier.

Au delà des histoires de format général entre v2/v3, je suis tombé sur des micro variations dans les données v2/v3, genre chant présent en v2 et absent en v3 ou renommé. Mais ça ne paraissait pas concerner des données importantes, donc je n'ai pas cherché à en faire un inventaire exhaustif et à gérer ça d'emblée dans ces patches. Je compte plutôt sur mes camarades CPF pour compléter le pad et aller voir là dedans si tout ce qui est utilisé restera utilisable.

#3

Mis à jour par Anaïs Ecuvillon il y a plus d'un an

Pour info, dans une newsletter reçue récemment, il est pointé une table de correspondance V.2 > V.3, je ne sais pas si ça peut aider à assurer une compatibilité sur plus d'endpoints : https://entreprise.api.gouv.fr/developpeurs/guide-migration/#table-de-correspondance-v-2-v-3

#4

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Statut changé de Solution proposée à Solution validée

Ok avec tout.

#5

Mis à jour par Anaïs Ecuvillon il y a plus d'un an

  • Lié à Development #71903: api-entreprise v3 : assurer la compatibilité avec la v2 là où c'est utilisé ajouté
#6

Mis à jour par Emmanuel Cazenave il y a plus d'un an

A la pince à épiler en inspectant toutes les instances déclarées dans le (https://pad.libre-entreprise.org/p/eo-apientrepriseV3), le endpoint établissement nécessitait un peu de travail de compat en plus.

(seuls les deux derniers patchs ont changé depuis la validation de Benj.)

#7

Mis à jour par Emmanuel Cazenave il y a plus d'un an

  • Statut changé de Solution proposée à En cours

Encore un truc à faire sur etablisssement, la clé tranche_effectif_salarie_etablissement qui devient tranche_effectif_salarie en v3.

Usage repéré chez la CNIL.

#8

Mis à jour par Emmanuel Cazenave il y a environ un an

Emmanuel Cazenave a écrit :

Encore un truc à faire sur etablisssement, la clé tranche_effectif_salarie_etablissement qui devient tranche_effectif_salarie en v3.

Voilà avec cette adaptation, c'est mon ultime bafouille.

Toujours uniquement 0007 et 0008 qui ont bougés depuis la validation de Benj.

#9

Mis à jour par Emmanuel Cazenave il y a environ un an

  • Lié à Development #71903: api-entreprise v3 : assurer la compatibilité avec la v2 là où c'est utilisé supprimé
#10

Mis à jour par Benjamin Dauvergne il y a environ un an

  • Statut changé de Solution proposée à Solution validée
#11

Mis à jour par Emmanuel Cazenave il y a environ un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit fc52f572f3d783e5ae0da90cff34ac83b77fc2da 
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Dec 14 13:06:18 2022 +0100

    api_entreprise: use v3 in etablissement endpoint (#70610)

commit f710e0b198b7fcfc6dde35d356667bab13622c47
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Dec 14 12:43:57 2022 +0100

    api_entreprise: add assertions in etablissement endpoint test (#70610)

commit 25048709dc73e4b30cfee35de91d557599567965
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Tue Oct 25 16:03:45 2022 +0200

    api_entreprise: use v3 in association's document related endpoints (#70610)

commit 35df56d019ce5de03c3ae05d092d2ca8495c5dc3
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Oct 24 18:35:56 2022 +0200

    api_entreprise: use v3 in associations endpoint (#70610)

commit 4df3791e52a1f4049885e2028d8a756cbecf758f
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Oct 24 15:41:12 2022 +0200

    api_entreprise: use v3 in extraits_rcs endpoint (#70610)

commit f2d3c24c0a134cc1ef04325f676a3cc922688c6b
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Oct 24 18:17:28 2022 +0200

    api_entreprise: do not use Publik json format when not needed (#70610)

commit 9f8d1ba343247bb6cd9cf3322f74937050c45de6
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Thu Oct 20 14:18:40 2022 +0200

    api_entreprise: let each endpoint targets a version (#70610)

commit 7c30a795a880f8ecfb76e44308181a893a0db5a7
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Oct 24 17:33:29 2022 +0200

    api_entreprise: use responses in unit tests (#70610)
#12

Mis à jour par Transition automatique il y a environ un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#13

Mis à jour par Transition automatique il y a environ un an

Automatic expiration

Formats disponibles : Atom PDF