diff --git a/data-computer/examples.http b/data-computer/examples.http index efeda2e..5da6633 100644 --- a/data-computer/examples.http +++ b/data-computer/examples.http @@ -3,6 +3,19 @@ #@baseUrl = http://data-calculation.tdmservices.intra.inist.fr/ ### +# @name retrieve +# @save +# @extension tar.gz +POST {{baseUrl}}/v1/retrieve HTTP/1.1 +Content-Type: application/json + +[ + { + "value":"acUHX88Gb" + } +] +### + # @name tree-segment POST {{baseUrl}}/v1/tree-segment HTTP/1.1 Content-Type: application/x-tar @@ -12,17 +25,11 @@ ### -# @name retrieve -# @save -# @extension tar.gz -POST {{baseUrl}}/v1/retrieve HTTP/1.1 -Content-Type: application/json +# @name lda +POST {{baseUrl}}/v1/lda HTTP/1.1 +Content-Type: application/x-tar +X-Hook: https://webhook.site/69300b22-a251-4c16-9905-f7ba218ae7e9 -[ - { - "value":"PJPkijmzx" - } -] +< ./example-json.tar.gz + ### - - diff --git a/data-computer/v1/lda.ini b/data-computer/v1/lda.ini index 4ff5b2c..94e1cdf 100644 --- a/data-computer/v1/lda.ini +++ b/data-computer/v1/lda.ini @@ -1,6 +1,25 @@ +# Entrypoint output format +mimeType = application/json + +# OpenAPI Documentation - JSON format (dot notation) +post.operationId = post-v1-lda +post.description = description... +post.summary = summary... +post.tags.0 = data-computer +post.requestBody.content.application/x-tar.schema.type = string +post.requestBody.content.application/x-tar.schema.format = binary +post.requestBody.required = true +post.responses.default.description = Informations permettant de récupérer les données le moment venu +post.parameters.0.description = Indenter le JSON résultant +post.parameters.0.in = query +post.parameters.0.name = indent +post.parameters.0.schema.type = boolean + + [use] plugin = basics plugin = analytics +plugin = spawn # Step 0 (générique) : Lire le fichier standard tar.gz [TARExtract] @@ -11,7 +30,7 @@ [singleton/identify] [singleton/env] path = generator -value = tree-segment +value = lda path = identifier value = get('uri').replace('uid:/', '') @@ -20,7 +39,7 @@ standalone = true # Step 2.1 (générique): Lancer un calcul sur tous les items reçus -[fork/[exec] +[fork/exec] # command should be executable ! command = ./v1/lda.py diff --git a/data-computer/v1/tree-segment.ini b/data-computer/v1/tree-segment.ini index 8539cc4..9bd1223 100644 --- a/data-computer/v1/tree-segment.ini +++ b/data-computer/v1/tree-segment.ini @@ -1,3 +1,20 @@ +# Entrypoint output format +mimeType = application/json + +# OpenAPI Documentation - JSON format (dot notation) +post.operationId = post-v1-lda +post.description = Création de segments à partir de tableaux +post.summary = Le corpus est transformé en liste de segment (source, target, weight) à partir d'un tableau simple ou d'un tableau imbriqué +post.tags.0 = data-computer +post.requestBody.content.application/x-tar.schema.type = string +post.requestBody.content.application/x-tar.schema.format = binary +post.requestBody.required = true +post.responses.default.description = Informations permettant de récupérer les données le moment venu +post.parameters.0.description = Indenter le JSON résultant +post.parameters.0.in = query +post.parameters.0.name = indent +post.parameters.0.schema.type = boolean + [use] plugin = basics plugin = analytics