waagsociety / citysdk-ld

CitySDK Linked Data API
MIT License
60 stars 4 forks source link

Fix URLs with file extension (.json, .turtle) ending with regex pattern (or completely disallow file extension URLs altogether) #14

Open bertspaan opened 10 years ago

bertspaan commented 10 years ago

Grape, by default, allows URLs to end with a file extension. This does not work well together with URL patterns ending with a regex pattern:

resource '/:cdk_id', requirements: { cdk_id: ::Helpers.alphanumeric_regex } do
   ...
end

Or, maybe we should not allow file extension URLs and always use the format parameter (?format=json) or the Content-Type request header.

tomdemeyer commented 10 years ago

We will not allow file extensions. Ugly anyway..