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

[API Histologe] Améliorations route GET + Documentation #3524

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

sfinx13
Copy link
Collaborator

@sfinx13 sfinx13 commented Jan 7, 2025

Ticket

#3424

Description

image

Changements apportés

  • Réorganiser la réponse en sous objets (adresse, personne).
  • Compléter la documentation API
  • Suppression route et modèle de tests
  • Initialisation des nouveaux statuts

Pré-requis

Tests

Documentation

Configuration

  • Importer le fichier openapi.json dans `POSTMAN
  • Définissez la valeur de la variable d'env baseUrl et bearerToken et sauvgearder
    image
  • Copier ce script dans l'onglet Test de la route login et sauvegarder
    image
var data = JSON.parse(responseBody);

if (data.data !== null) {
    pm.collectionVariables.set("bearerToken", data.token);
}
  • Après s'etre authentifié, tester les 2 routes GET sur la récupération des signalement et vérifier que les personnes et adresses sont encapsulé dans des objets

@sfinx13 sfinx13 changed the base branch from main to develop January 7, 2025 22:07
@sfinx13 sfinx13 force-pushed the feature/3424-api-amelioration branch from 76e6bb4 to 6dad4b7 Compare January 8, 2025 10:07
src/Dto/Api/Model/Suivi.php Outdated Show resolved Hide resolved
public ?string $territoireNom;
#[OA\Property(
description: 'Correspond au code insee du département<br>
Copy link
Collaborator

Choose a reason for hiding this comment

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

code géographique

Copy link
Collaborator

Choose a reason for hiding this comment

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

pourquoi ajouter un exemple ?

Copy link
Collaborator Author

@sfinx13 sfinx13 Jan 9, 2025

Choose a reason for hiding this comment

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

L’appellation vient de ce wiki
https://fr.wikipedia.org/wiki/Codes_g%C3%A9ographiques_de_la_France
image

L'exemple dans la doc est pour clarifier l’appellation code insee du département.

Copy link
Collaborator

@emilschn emilschn left a comment

Choose a reason for hiding this comment

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

Quelques retours et questions, pas encore testé !

Copy link
Collaborator

@numew numew left a comment

Choose a reason for hiding this comment

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

Quelques retours, bel effort et beau travail de doc.

src/Dto/Api/Model/Adresse.php Outdated Show resolved Hide resolved
description: 'Classe énergétique du logement selon le diagnostic de performance énergétique (DPE).
<ul>
<li>La valeur doit être une lettre entre `A` et `G` selon la nomenclature du DPE</li>
<li>`null` si aucune information.</li>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Il y'a aussi la possibilité "nsp" ("Ne sait pas"). D'ailleurs on pourrais renvoyer la valeur "Ne sait pas" en rajoutant le bon paramètre via getBailDpeClasseEnergetique mais il faudrait généraliser a tout ces type de retour donc je ne sais pas si on le fait ou pas ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Je pense avoir fait le tour des nsp j'ai donc mis à jour la méthode afin de retourner les nsp
private function stringToBool(?string $value): bool|string|null {

src/Dto/Api/Response/SignalementResponse.php Outdated Show resolved Hide resolved
src/Dto/Api/Response/SignalementResponse.php Outdated Show resolved Hide resolved
src/Dto/Api/Model/Intervention.php Outdated Show resolved Hide resolved
src/Dto/Api/Model/Intervention.php Outdated Show resolved Hide resolved
src/Dto/Api/Model/File.php Show resolved Hide resolved
src/Dto/Api/Model/Personne.php Outdated Show resolved Hide resolved
src/Dto/Api/Model/Personne.php Outdated Show resolved Hide resolved
@sfinx13 sfinx13 force-pushed the feature/3424-api-amelioration branch from 6e9ded3 to f659b31 Compare January 9, 2025 15:59
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.

4 participants