diff --git a/affiliations-tools/swagger.json b/affiliations-tools/swagger.json index cd3ac5e..3778d46 100644 --- a/affiliations-tools/swagger.json +++ b/affiliations-tools/swagger.json @@ -94,7 +94,8 @@ }, "RNSR": { "type": "string", - "pattern": "^[0-9]{9}[A-Z]$" + "pattern": "^[0-9]{9}[A-Z]$", + "example": "200919362L" }, "IdYearAddresses": { "type": "array", diff --git a/mapping-tools/swagger.json b/mapping-tools/swagger.json new file mode 100644 index 0000000..41df1f7 --- /dev/null +++ b/mapping-tools/swagger.json @@ -0,0 +1,54 @@ +{ + "tags": [ + { + "name": "mapping", + "description": "Tables de correspondance", + "externalDocs": { + "description": "Plus de documentation", + "url": "https://gitbucket.inist.fr/tdm/web-services/tree/master/mapping-tools" + } + } + ], + "components": { + "IdRNSRs1": { + "type": "array", + "items": { + "$ref": "#/components/IdRNSR1" + } + }, + "IdRNSR1": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "value": { + "$ref": "#/components/RNSR" + } + } + }, + "RNSR": { + "type": "string", + "pattern": "^[0-9]{9}[A-Z]$", + "example": "200919362L" + }, + "IdInstitutes": { + "type": "array", + "items": { + "$ref": "#/components/IdInstitute" + } + }, + "IdInstitute": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "value": { + "type": "string", + "example": "INEE" + } + } + } + } +} \ No newline at end of file diff --git a/mapping-tools/v1/rnsr/instituts-cnrs/json.ini b/mapping-tools/v1/rnsr/instituts-cnrs/json.ini index c537cfb..b6fb6fa 100644 --- a/mapping-tools/v1/rnsr/instituts-cnrs/json.ini +++ b/mapping-tools/v1/rnsr/instituts-cnrs/json.ini @@ -1,13 +1,25 @@ # OpenAPI Documentation - JSON format (dot notation) mimeType = application/json -post.responses.default.description = Return a JSON, composed of `id`, `value`, where `value` is found CNRS Institute -post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.summary = Map RNSR to CNRS Institutes -post.requestBody.required = true -post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.requestBody.content.examples.inee.summary = One RNSR identifier -post.requestBody.content.examples.inee.value.id = 1 -post.requestBody.content.examples.inee.value.value = 200919362L +# post.responses.default.description = Return a JSON, composed of `id`, `value`, where `value` is found CNRS Institute +# post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream +# post.summary = Map RNSR to CNRS Institutes +# post.requestBody.required = true +# post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream +# post.requestBody.content.examples.inee.summary = One RNSR identifier +# post.requestBody.content.examples.inee.value.id = 1 +# post.requestBody.content.examples.inee.value.value = 200919362L + +post.responses.200.description = "Renvoie un JSON, composé d'`id`, `value`, avec `value` étant un Institut du CNRS" +post.responses.200.schema.$ref = #/components/IdInstitutes +post.tags.0: mapping +post.summary: "Trouve l'Institut du CNRS dans lequel se trouve une structure de recherche" +post.consumes.0: application/json +post.produces.0: application/json +post.parameters.0.in: body +post.parameters.0.in.name: body +post.parameters.0.in.description: "Une liste d'objets contenant un identifiant et un identifiant RNSR" +post.parameters.0.in.required: true +post.parameters.0.in.schema.$ref: "#/components/idRNSRs1" [use] plugin = basics