Newer
Older
web-services / biblio-tools / v1 / crossref / prefixes / expand.ini
@Nicolas Thouvenin Nicolas Thouvenin on 4 Feb 1 KB feat: add new databases
# OpenAPI Documentation - JSON format (dot notation)
mimeType = application/json

post.operationId = post-v1-crossref-prefixes-expand
post.description = Verbalisation du préfixe DOI à partir d'un DOI complet ou juste à partir du préfixe
post.summary = verbalisation à partir d'un tableau d'objets avec à minima un champ value contenant le DOI
post.tags.0 = bibliography
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 = OpenEdition
post.responses.default.content.application/json.schema.$ref =  #/components/schemas/JSONStream
post.responses.default.description = Les prefixes DOI en verion 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

# Flow configuration
[JSONParse]
legacy = false
separator = $

[expand]
path = value
size = 1
cacheName = crossref-prefixes

[expand/assign]
path = value
value = get('value').split('/').filter(i => i.match(/^10./)).pop()

[expand/assign]
path = url
value = fix('https://api.crossref.org/prefixes', self.value).join('/')

[expand/URLFetch]
target = result
url = get('url')
json = true
timeout = 60000
noerror = false

[expand/replace]
path = id
value = get('id')

path = value
value = get('result.message.name', 'n/a')

[dump]
indent = env('indent', false)