diff --git a/affiliations-tools/swagger.json b/affiliations-tools/swagger.json new file mode 100644 index 0000000..7ebe3e0 --- /dev/null +++ b/affiliations-tools/swagger.json @@ -0,0 +1,94 @@ +{ + "components": { + "NoticesRnsr": { + "type": "array", + "items": { + "$ref": "#/components/NoticeRnsr" + } + }, + "NoticeRnsr": { + "type": "object", + "properties": { + "xPublicationDate": { + "type": "string", + "format": "date" + }, + "authors": { + "type": "array", + "items": { + "$ref": "#/components/AuthorRnsr" + } + } + } + }, + "Notices": { + "type": "array", + "items": { + "$ref": "#/components/Notice" + } + }, + "Notice": { + "type": "object", + "properties": { + "xPublicationDate": { + "type": "string", + "format": "date" + }, + "authors": { + "type": "array", + "items": { + "$ref": "#/components/Author" + } + } + } + }, + "Author": { + "type": "object", + "properties": { + "affiliations": { + "type": "array", + "items": { + "$ref": "#/components/Affiliation" + } + } + } + }, + "AuthorRnsr": { + "type": "object", + "properties": { + "affiliations": { + "type": "array", + "items": { + "$ref": "#/components/AffiliationRnsr" + } + } + } + }, + "Affiliation": { + "type": "object", + "properties": { + "address": { + "type": "string" + } + } + }, + "AffiliationRnsr": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "conditorRnsr": { + "type": "array", + "items": { + "$ref": "#/components/RNSR" + } + } + } + }, + "RNSR": { + "type": "string", + "pattern": "^[0-9]{9}[A-Z]$" + } + } +} \ No newline at end of file diff --git a/affiliations-tools/v1/rnsr/conditor.ini b/affiliations-tools/v1/rnsr/conditor.ini index b7621c8..4258928 100644 --- a/affiliations-tools/v1/rnsr/conditor.ini +++ b/affiliations-tools/v1/rnsr/conditor.ini @@ -1,9 +1,9 @@ # OpenAPI Documentation - JSON format (dot notation) post.responses.default.description = Return a Conditor JSON notice, added with `conditorRnsr` field -post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream +post.responses.default.content.application/json.schema.$ref = #/components/NoticesRnsr post.summary = Find RNSR to address given in `authors.affiliations`, when possible post.requestBody.required = true -post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream +post.requestBody.content.application/json.schema.$ref = #/components/Notices [use] plugin = basics