Newer
Older
web-services / biblio-tools / v1 / crossref / prefixes / expand.ini
@Nicolas Thouvenin Nicolas Thouvenin on 21 Dec 2021 1 KB doc: improve swagger doc
# OpenAPI Documentation - JSON format (dot notation)
mimeType = application/json

post.operationId = post-v1-crossref-prefixes-expand
post.description = Verbalisation du préfix DOI à partir d'un DOI complet ou just eà partir du préfixe
post.summary = erbalisation à 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 = 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 = 30000
noerror = true

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

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

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