- Updated multiple DTO classes across various modules to replace the `Config` class with `model_config = ConfigDict(from_attributes=True)`. - This change enhances consistency in attribute handling and aligns with the latest Pydantic practices. - Adjusted error handling in core modules to change status codes from `HTTP_422_UNPROCESSABLE_ENTITY` to `HTTP_422_UNPROCESSABLE_CONTENT` for improved clarity in validation responses.
24 lines
817 B
Python
24 lines
817 B
Python
"""ALADI2 Schemas"""
|
|
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class Aladi2Response(BaseModel):
|
|
"""ALADI2 (Asociación Latinoamericana de Integración)"""
|
|
|
|
FRACCION: Optional[str] = Field(None, max_length=10)
|
|
ACUERDO: Optional[str] = Field(None, max_length=49)
|
|
PAIS: Optional[str] = Field(None, max_length=3)
|
|
TASATXT: Optional[str] = Field(None, max_length=19)
|
|
TASANUM: Optional[str] = None
|
|
TASACALCULADA: Optional[str] = Field(None, max_length=19)
|
|
TIPOTASA: Optional[int] = None
|
|
DOF: Optional[str] = Field(None, max_length=8)
|
|
NOTAS: Optional[str] = Field(None, max_length=499)
|
|
OBSERVACIONES: Optional[str] = None
|
|
NICO: Optional[str] = Field(None, max_length=2)
|
|
SYSID: int
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|