Newer
Older
web-services / affiliations-rnsr / v1 / json.ini
@François Parmentier François Parmentier on 6 Jul 2021 1 KB Add an example in metadata
# OpenAPI Documentation - JSON format (dot notation)
post.responses.default.description = Return a JSON, composed of `id`, `value`, where value is found `RNSR`(s)
post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream
post.summary = Find RNSR to address given in `value`, when possible
post.requestBody.required = true
post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream
post.requestBody.content.examples.bordeaux.summary = University of Bordeaux address
post.requestBody.content.examples.bordeaux.value.id = 3
post.requestBody.content.examples.bordeaux.value.value = University of Bordeaux, IMS, CNRS UMR5218, Talence, F-33405, France

[use]
plugin = basics
plugin = conditor

[JSONParse]
[replace]
path = id
value = get("id")

path = authors
value = get("value").toArray("Chaîne").reduce((s,c) => [{affiliations:[{address:s[0].affiliations[0].address+c}]}], [{affiliations:[{address:""}]}])

[affAlign]

[replace]
path = id
value = get("id")

path = value
value = get("authors.0.affiliations.0.conditorRnsr")

[JSONString]
indent = env('indent', true)