diff --git a/mapping-tools/swagger.json b/mapping-tools/swagger.json index 41df1f7..c1179e6 100644 --- a/mapping-tools/swagger.json +++ b/mapping-tools/swagger.json @@ -1,4 +1,11 @@ { + "servers": [{ + "variables": { + "scheme": { + "default": "https" + } + } + }], "tags": [ { "name": "mapping", @@ -10,43 +17,45 @@ } ], "components": { - "IdRNSRs1": { - "type": "array", - "items": { - "$ref": "#/components/IdRNSR1" - } - }, - "IdRNSR1": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "value": { - "$ref": "#/components/RNSR" + "schemas": { + "IdRNSRs1": { + "type": "array", + "items": { + "$ref": "#/components/IdRNSR1" } - } - }, - "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" + }, + "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" + } } } } diff --git a/mapping-tools/v1/rnsr/instituts-cnrs/json.ini b/mapping-tools/v1/rnsr/instituts-cnrs/json.ini index b6fb6fa..26df5b4 100644 --- a/mapping-tools/v1/rnsr/instituts-cnrs/json.ini +++ b/mapping-tools/v1/rnsr/instituts-cnrs/json.ini @@ -9,17 +9,14 @@ # 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.responses.default.description = Renvoie un JSON, composé d'`id`, `value`, avec `value` étant un Institut du CNRS +post.responses.default.schema.$ref = #/components/schemas/IdInstitutes post.tags.0: mapping -post.summary: "Trouve l'Institut du CNRS dans lequel se trouve une structure de recherche" +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" +post.requestBody.required = true +post.requestBody.content.application/json.schema.$ref = #/components/schemas/idRNSRs1 [use] plugin = basics