From d2f02e1555b3a10488801f65c685b35dfca784f0 Mon Sep 17 00:00:00 2001 From: Fanilo-Nantenaina Date: Tue, 13 Jan 2026 17:09:12 +0300 Subject: [PATCH] refactor(api/schemas): simplify company info response and schema --- api.py | 2 +- schemas/society/societe.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api.py b/api.py index e5de23d..a523812 100644 --- a/api.py +++ b/api.py @@ -2863,7 +2863,7 @@ async def obtenir_informations_societe(): if not societe: raise HTTPException(404, "Informations société introuvables") - return {"success": True, "data": societe} + return societe except HTTPException: raise diff --git a/schemas/society/societe.py b/schemas/society/societe.py index 4bb9031..01fa308 100644 --- a/schemas/society/societe.py +++ b/schemas/society/societe.py @@ -1,20 +1,20 @@ -from pydantic import BaseModel, Field +from pydantic import BaseModel from typing import Optional, List class ExerciceComptable(BaseModel): numero: int - debut: Optional[str] = None + debut: str fin: Optional[str] = None class SocieteInfo(BaseModel): # Identification - raison_sociale: str = Field(..., description="Raison sociale") - numero_dossier: str = Field(..., description="Code du dossier") - siret: Optional[str] = Field(None, description="Numéro SIRET") - code_ape: Optional[str] = Field(None, description="Code APE/NAF") - numero_tva: Optional[str] = Field(None, description="Numéro TVA intracommunautaire") + raison_sociale: str + numero_dossier: str + siret: Optional[str] = None + code_ape: Optional[str] = None + numero_tva: Optional[str] = None # Adresse adresse: Optional[str] = None