-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add endpoint to transform a dataRelationShip in DDI to Json #95
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans le controller :
- factoriser le code entre ddi2vtl et ddi2vtlBrut
- renommer correctement la méthode Derefddi
- Les blocs
catch(Exception e){ throw new VtlTransformationException(...); }
sont inutiles - Il me semble cohérent de retourner une 400 en cas de XsltTransformationExcpeiton (encapsule une saxonException) car c'est un pb du xml (on peut retourner le message dans le body) et une 500 pour l'IO exception (sans body)
Tester le xslt
|
||
// Retourner la liste sous forme de JSON | ||
return ResponseEntity.ok() | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.body(outputText); | ||
.body(cleanJson); | ||
} catch (IOException e) { | ||
throw new VtlTransformationException(FAILED_TO_PROCESS_THE_INPUT_FILE + ".", e); | ||
} catch (XsltTransformationException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En cas d'erreur de transfo, on ne devrait pas renvoyer une 400 avec la cause de l'erreur, c'est parce que l'entrée utilisateur est mauvaise que l'entrée se produit, non ?
|
||
// Retourner la liste sous forme de JSON | ||
return ResponseEntity.ok() | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.body(outputText); | ||
.body(cleanJson); | ||
} catch (IOException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inutile : renvoyer directement la 500 dans le catch IOException
…ndant, remove elastic search) WIP
…ndant, remove elastic search) WIP - ColecticaServiceImpl, line 177
# Conflicts: # pom.xml
…ndant, remove elastic search) WIP
…ndant, remove elastic search) WIP
…ndant, remove elastic search) WIP - fr.insee.rmes.utils.export.XDocReport.getCodeBookExportV2 in progress
transform the ddi2vtlJson endpoint into ddiDataRelationShiptoJson