# OpenAPI Documentation - JSON format (dot notation)
mimeType = application/json

post.operationId = post-v1-216-identify
post.description = Associer des termes au vocabulaire Loterre correspondant - <https://skosmos.loterre.fr/216/fr/>
post.summary = verbalisation à partir d'un tableau d'objets avec à minima un champ value contenant des termes
post.tags.0 = loterre-resolvers
post.requestBody.content.application/json.example.0.id = 1
post.requestBody.content.application/json.example.0.value = abstraction
post.requestBody.content.application/json.example.1.id = 2
post.requestBody.content.application/json.example.1.value = acculturation
post.requestBody.content.application/json.example.2.id = 3
post.requestBody.content.application/json.example.2.value = learning
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.id = abstraction
post.responses.default.content.application/json.example.0.value.about = http://data.loterre.fr/ark:/67375/216-W8HM2TM2-R
; post.responses.default.content.application/json.example.0.value.prefLabel@fr = abstraction
post.responses.default.content.application/json.example.0.value.prefLabelfr = abstraction
; post.responses.default.content.application/json.example.0.value.prefLabel@en = abstraction
post.responses.default.content.application/json.example.0.value.prefLabelen = abstraction
post.responses.default.content.application/json.example.1.id = 2
post.responses.default.content.application/json.example.1.value.id = acculturation
post.responses.default.content.application/json.example.1.value.about = http://data.loterre.fr/ark:/67375/216-V4MVZSND-0
; post.responses.default.content.application/json.example.1.value.prefLabel@fr = acculturation
post.responses.default.content.application/json.example.1.value.prefLabelfr = acculturation
; post.responses.default.content.application/json.example.1.value.prefLabel@en = acculturation
post.responses.default.content.application/json.example.1.value.prefLabelen = acculturation
post.responses.default.content.application/json.example.2.id = 3
post.responses.default.content.application/json.example.2.value.id = learning
post.responses.default.content.application/json.example.2.value.about = http://data.loterre.fr/ark:/67375/216-VJM7VMG1-F
; post.responses.default.content.application/json.example.2.value.prefLabel@fr = apprentissage
post.responses.default.content.application/json.example.2.value.prefLabelfr = apprentissage
; post.responses.default.content.application/json.example.2.value.prefLabel@en = learning
post.responses.default.content.application/json.example.2.value.prefLabelen = learning
post.responses.default.content.application/json.schema.$ref =  #/components/schemas/JSONStream
post.responses.default.description = Les concepts SKOS en JSON
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

[delegate]
file = ./v1/216.cfg
[delegate]
file = ./v1/process.cfg
[swing]
test = get('value').isObject()
[swing/replace]

# id field is required in order to work with lodex
path = id
value = get('id')

path = value.about
value = get('value.rdf$about')
path = value.prefLabel@fr
value = get('value.skos$prefLabel').filter(y => (y.xml$lang === 'fr')).map(x => x.xml$t).shift()
path = value.prefLabel@en
value = get('value.skos$prefLabel').filter(y => (y.xml$lang === 'en')).map(x => x.xml$t).shift()
[delegate]
file = ./v1/send.cfg
