Swirrl / datahost-prototypes

Eclipse Public License 1.0
0 stars 0 forks source link

CSVW routes part 1: Release Accept header reoute redirects to file route #320

Closed scottlowe closed 8 months ago

scottlowe commented 8 months ago

Partially addresses issue https://github.com/Swirrl/datahost-prototypes/issues/184

Redirect Release route with accept header to CSV or JSON file route.

When a Release route receives an allowed Accept: text/csv it should not serve the content from its route but instead redirect users to the same file route with the .csv extension. Same for application/json (redirects with .json extension)

This PR is only the first step. The next step from the linked issue will be serving of the CSVW metadata itself:

"In order to fullfill our obligations to the CSVW spec we should then also support the following route which is where we will map our datahost schema into CSVW."

/data/dataset-series/release/:release-id.csv-metadata.json

rosado commented 8 months ago

Looks good in. The :dev profile thing should not block this PR (but we should agree on 'one true way' on slack/thursay's meeting).