diff --git a/affiliation-rnsr/README.md b/affiliation-rnsr/README.md new file mode 100644 index 0000000..1946baf --- /dev/null +++ b/affiliation-rnsr/README.md @@ -0,0 +1,3 @@ +# affiliation-rnsr + +Le code de ce web service se trouve sur github à ce lien : https://github.com/Inist-CNRS/web-services/tree/main/services/affiliation-rnsr#readme \ No newline at end of file diff --git a/biblio-ref/README.md b/biblio-ref/README.md new file mode 100644 index 0000000..a7df4c2 --- /dev/null +++ b/biblio-ref/README.md @@ -0,0 +1,3 @@ +# affiliation-rnsr + +Le code de ce web service se trouve sur github à ce lien : https://github.com/Inist-CNRS/web-services/tree/main/services/biblio-ref#readme \ No newline at end of file diff --git a/biblio-ref/examples.http b/biblio-ref/examples.http new file mode 100644 index 0000000..6e96d57 --- /dev/null +++ b/biblio-ref/examples.http @@ -0,0 +1,30 @@ +# These examples can be used directly in VSCode, using REST Client extension (humao.rest-client) +# They are important, because used to generate the tests.hurl file. + +# Décommenter/commenter les lignes voulues pour tester localement +@host=http://localhost:31976 +# @host=https://biblio-ref.services.istex.fr + +### +# @name v1validate +# Valide la référence bibliographique +POST {{host}}/v1/validate?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { + "value": "Zohuri, B. (2019). A Comparison of Molten Salt Reactors to Light Water Reactors: Pros and Cons. In Molten Salt Reactors and Thorium Energy (pp. 81-98). Woodhead Publishing. https://doi.org/10.1016/B978-0-08-102337-2.00006-9" + }, + { + "value": "Please see https://doi.org/10.1016\/b978-0-323-90638-8.00002-3" + }, + { + "value": "Gerris Caucasicus, Primary Prevention of Cardiovascular Disease with a Mediterranean Diet, 10.1056/nejmoa1200303" + }, + { + "value": ["bad","input","type"] + }, + { + "value": "nothing here" + } +] \ No newline at end of file diff --git a/biblio-ref/swagger.json b/biblio-ref/swagger.json new file mode 100644 index 0000000..b40d45f --- /dev/null +++ b/biblio-ref/swagger.json @@ -0,0 +1,33 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "biblio-ref - Valide une référence bibliographique", + "summary": "Si un DOI est trouvé dans la référence bibliographique, valide la référence et indique si elle est rétractée", + "version": "1.0.0", + "termsOfService": "https://services.istex.fr/", + "contact": { + "name": "Inist-CNRS", + "url": "https://www.inist.fr/nous-contacter/" + } + }, + "servers": [ + { + "x-comment": "Will be automatically completed by the ezs server." + }, + { + "url": "http://vptdmservices.intra.inist.fr:49247/", + "description": "Latest version for production", + "x-profil": "Standard" + } + ], + "tags": [ + { + "name": "biblio-ref", + "description": "Référence bibliographique", + "externalDocs": { + "description": "Plus de documentation", + "url": "https://github.com/inist-cnrs/web-services/tree/main/services/biblio-ref" + } + } + ] +} \ No newline at end of file diff --git a/biblio-ref/tests.hurl b/biblio-ref/tests.hurl new file mode 100644 index 0000000..845fcbe --- /dev/null +++ b/biblio-ref/tests.hurl @@ -0,0 +1,51 @@ +POST {{host}}/v1/validate?indent=true +content-type: application/json +[ + { + "value": "Zohuri, B. (2019). A Comparison of Molten Salt Reactors to Light Water Reactors: Pros and Cons. In Molten Salt Reactors and Thorium Energy (pp. 81-98). Woodhead Publishing. https://doi.org/10.1016/B978-0-08-102337-2.00006-9" + }, + { + "value": "Please see https://doi.org/10.1016\/b978-0-323-90638-8.00002-3" + }, + { + "value": "Gerris Caucasicus, Primary Prevention of Cardiovascular Disease with a Mediterranean Diet, 10.1056/nejmoa1200303" + }, + { + "value": ["bad","input","type"] + }, + { + "value": "nothing here" + } +] + +HTTP 200 +[{ + "value": { + "doi": "", + "status": "not_found" + } +}, +{ + "value": { + "doi": "10.1016/b978-0-323-90638-8.00002-3", + "status": "found" + } +}, +{ + "value": { + "doi": "10.1056/nejmoa1200303", + "status": "retracted" + } +}, +{ + "value": { + "doi": "", + "status": "error_data" + } +}, +{ + "value": { + "doi": "", + "status": "not_found" + } +}] \ No newline at end of file