diff --git a/affiliations-tools/examples.http b/affiliations-tools/examples.http index e9b0e66..af2836a 100644 --- a/affiliations-tools/examples.http +++ b/affiliations-tools/examples.http @@ -1,5 +1,19 @@ +## Résolution de nom de ville par Netscity +POST https://affiliations-tools.services.inist.fr/v1/netscity/expand?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "value": "VANDOEUVRE" }, + { "value": "SACLAY"}, + { "value": "ORSAY"}, + { "value": "TOULOUSE"}, + { "value": "VILLEURBANNE"}, + { "value": "NANCY"} +] +### + # Structurer une affiliation au format texte -POST https://affiliation-tools.services.inist.fr/v1/expand?indent=true HTTP/1.1 +POST https://affiliations-tools.services.inist.fr/v1/expand?indent=true HTTP/1.1 Content-Type: application/json [ @@ -13,20 +27,7 @@ { "value": "Ford, J (reprint author), Univ British Columbia, Dept Phys & Astron, 6224 Agr Rd, Vancouver, BC V6T 1Z1, Canada."}, { "value": "Laigle, C (reprint author), Univ Paris 06, Sorbonne Univ, 98b Bd Arago, F-75014 Paris, France.; Laigle, C (reprint author), CNRS, UMR 7095, IAP, 98b Bd Arago, F-75014 Paris, France."} ] -EOF ### -# Resolution Netscity -POST https://affiliation-tools.services.inist.fr/v1/netscity/expand?indent=true HTTP/1.1 -Content-Type: application/json -[ - { "value": "VANDOEUVRE" }, - { "value": "SACLAY"}, - { "value": "ORSAY"}, - { "value": "TOULOUSE"}, - { "value": "VILLEURBANNE"}, - { "value": "NANCY"} -] -### diff --git a/affiliations-tools/v1/netscity/expand.ini b/affiliations-tools/v1/netscity/expand.ini index 06b7a59..f0bfc9e 100644 --- a/affiliations-tools/v1/netscity/expand.ini +++ b/affiliations-tools/v1/netscity/expand.ini @@ -5,13 +5,9 @@ post.requestBody.required = true post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream post.parameters.0.in = query -post.parameters.0.name = path -post.parameters.0.schema.type = string -post.parameters.0.description = The path in each object to enrich with an Netscity object -post.parameters.1.in = query -post.parameters.1.name = indent -post.parameters.1.schema.type = boolean -post.parameters.1.description = Indent or not the JSON Result +post.parameters.0.name = indent +post.parameters.0.schema.type = boolean +post.parameters.0.description = Indent or not the JSON Result # Necessary plugins [use] @@ -23,8 +19,13 @@ [JSONParse] separator = * -[combine] -path = env('path', 'value') +[expand] +path = value +size = 100 +cacheName = netscity-enrichments + +[expand/combine] +path = value primer = ./v1/netscity/netscity.csv prepend = files file = ./v1/netscity/netscity-enrichments.ini