DOI based publications use the DOI as their identifier, which contain slashes. FastAPI/Starlette don't provide a way to escape forward slashes in requests (see https://github.com/tiangolo/fastapi/discussions/7328). When a request is made for a DOI based publication (for example: GET /api/v1/publication-identifiers/10.1016/j.cell.2024.04.018), this request matches the path db_name=10.1016, identifier=j.cell.2024.04.018.
The suggested workaround is to use identifier:path to match request paths which may include paths, but this will cause the route to match the entire rest of the path, so requests like GET /api/v1/publication-identifiers/Crossref/10.1016/j.cell.2024.04.018 will resolve to identifier=Crossref/10.1016/j.cell.2024.04.018. From here we would be able to parse out the desired request, but this would require some changes to the design of the publication-identifiers endpoint.
DOI based publications use the DOI as their identifier, which contain slashes. FastAPI/Starlette don't provide a way to escape forward slashes in requests (see https://github.com/tiangolo/fastapi/discussions/7328). When a request is made for a DOI based publication (for example:
GET /api/v1/publication-identifiers/10.1016/j.cell.2024.04.018
), this request matches the pathdb_name=10.1016
, identifier=j.cell.2024.04.018
.The suggested workaround is to use
identifier:path
to match request paths which may include paths, but this will cause the route to match the entire rest of the path, so requests likeGET /api/v1/publication-identifiers/Crossref/10.1016/j.cell.2024.04.018
will resolve toidentifier=Crossref/10.1016/j.cell.2024.04.018
. From here we would be able to parse out the desired request, but this would require some changes to the design of thepublication-identifiers
endpoint.