# OpenAPI Documentation - JSON format (dot notation) mimeType = application/json post.operationId = post-v1-crossref-works-expand post.description = Récupération des métadonnées associées à un DOI post.summary = Récupération à partir d'un tableau d'objets avec à minima un champ value contenant le DOI post.tags.0 = biblio-tools post.requestBody.content.application/json.example.0.id = 1 post.requestBody.content.application/json.example.0.value = 10.4000/edc.9014 post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream post.requestBody.required = true post.responses.default.content.application/json.example.0.id = 1 post.responses.default.content.application/json.example.0.value = { ... } post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream post.responses.default.description = Les prefixes DOI en version textuel 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 # Necessary plugins [use] plugin = basics plugin = analytics plugin = storage # Flow configuration [JSONParse] separator = * [expand] path = value size = 10 cacheName = post-v1-crossref-works-expand [expand/bufferize] [expand/combine] path = env('path', 'value') primer = get('bufferID') prepend = buffers append = transit [expand/combine/exchange] value = get('value') [expand/combine/group] size = 100 [expand/combine/replace] path = rows value = fix(self.length) path = filter value = self().filter(x => x.match(/^10.\d{4,9}\/[^\s]+$/i)).map(x => 'doi:'.concat(x)).join(',') # see https://github.com/CrossRef/rest-api-doc#api-overview [expand/combine/URLStream] url = https://api.crossref.org/works path = .items.* timeout = 30000 ; Simplification de la structure à postriori (le faire à priori était également possible) [expand/combine/exchange] value = self().omit(['indexed', 'reference']) [expand/combine/OBJFlatten] [expand/combine/replace] path = id value = get('DOI') path = value value = self() # On nettoie l'objet en supprimant les champs temporaires [expand/exchange] value = self().omit('bufferID') [assign] path = value value = get('value.value', 'n/a') # On marque les réponses qui n'ont pas abouties [swing] test = has('value.DOI') reverse = true [swing/assign] path = value value = fix('n/a') [dump] indent = env('indent', false)