Skip to content

1489 permettre dajouter les schéma et plans pluriannuel#1508

Merged
emma11y merged 11 commits into
mainfrom
1489-permettre-dajouter-les-schéma-et-plans-pluriannuel
Jun 17, 2026

Hidden character warning

The head ref may contain hidden characters: "1489-permettre-dajouter-les-sch\u00e9ma-et-plans-pluriannuel"
Merged

1489 permettre dajouter les schéma et plans pluriannuel#1508
emma11y merged 11 commits into
mainfrom
1489-permettre-dajouter-les-schéma-et-plans-pluriannuel

Conversation

@emma11y

@emma11y emma11y commented May 20, 2026

Copy link
Copy Markdown
Collaborator

closes #1489

Avant de merger la pull request, s’assurer que :

  • Les checks GitHub passent (lint...).
  • Les tests Cypress ont été lancés en local (dans le cas d’une correction de bug ou d’une nouvelle fonctionnalité).

@emma11y emma11y linked an issue May 20, 2026 that may be closed by this pull request
@emma11y emma11y self-assigned this May 20, 2026
@emma11y emma11y requested review from AdrienMuzyczka, bellangerq, hissalht and yaaax and removed request for hissalht May 20, 2026 12:38
@emma11y emma11y force-pushed the 1489-permettre-dajouter-les-schéma-et-plans-pluriannuel branch from 9229663 to 56f514a Compare May 27, 2026 09:35

@hissalht hissalht left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

juste 2-3 détails mais sinon lgtm !

Comment thread confiture-rest-api/src/audits/dto/requests/update-audit.dto.ts Outdated
Comment thread confiture-rest-api/src/audits/dto/requests/update-statement.dto.ts

@bellangerq bellangerq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Je ne peux pas modifier ma déclaration si je supprime un des deux champs (schéma ou plan d'action).

{
  "message": [
    "schemaPluriannuelUrl must be an URL address",
    "planActionUrl must be an URL address"
  ],
  "error":"Bad Request","statusCode":400
}

Je crois que comme la valeur peut être une string vide (""), ça ne passe pas dans le DTO avec le décorateur IsUrl(). Je ne sais pas s'il est nécessaire comme on valide déjà côté front le format et il n'y a pas de risque de ne pas le faire côté back (c'est pas un login ou quoi).

Pour le contactFormUrl par exemple, on fait :

@IsString()
@IsOptional()
contactFormUrl?: string;

solution adaptée.
</p>

<DsfrField

@bellangerq bellangerq Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Du coup je sais pas si c'est lié à la PR mais quitte à supprimer le contactName, autant le supprimer aussi côté back ?

À moins qu'on ait prévu de s'en servir plus tard.

@emma11y

emma11y commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

Je ne peux pas modifier ma déclaration si je supprime un des deux champs (schéma ou plan d'action).

{
  "message": [
    "schemaPluriannuelUrl must be an URL address",
    "planActionUrl must be an URL address"
  ],
  "error":"Bad Request","statusCode":400
}

Je crois que comme la valeur peut être une string vide (""), ça ne passe pas dans le DTO avec le décorateur IsUrl(). Je ne sais pas s'il est nécessaire comme on valide déjà côté front le format et il n'y a pas de risque de ne pas le faire côté back (c'est pas un login ou quoi).

Pour le contactFormUrl par exemple, on fait :

@IsString()
@IsOptional()
contactFormUrl?: string;

Tu es en contradiction avec le commentaire d'Adrien : #1508 (comment)

@emma11y emma11y force-pushed the 1489-permettre-dajouter-les-schéma-et-plans-pluriannuel branch from 0d50fa6 to 7541327 Compare June 17, 2026 12:46
@bellangerq bellangerq self-requested a review June 17, 2026 13:15

@bellangerq bellangerq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ajouter le changelog !

@emma11y emma11y merged commit c525c7e into main Jun 17, 2026
2 checks passed
@emma11y emma11y deleted the 1489-permettre-dajouter-les-schéma-et-plans-pluriannuel branch June 17, 2026 13:27
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.

Permettre d'ajouter les schéma et plans pluriannuel

4 participants