Closed wellorder closed 1 year ago
I think the only reason not to do this is like you said:
csv
is not a standard media-type suffix
Some including myself wanted to use this anyway, but there was some concern for not using a standard media-type suffix. I would be open to accepting your changes.
It had been long enough that I had forgotten parts of the working group discussion we had, but the notes have as an action item
add csv in reports header with note saying we know it’s not in the acceptable list
so I went with that here, and am fine with it as a solution. I'd also be open to just not using a suffix, since csv
is not on the list. Using json
for non-json
data definitely sits poorly with me though.
Can we just use application/vnd.mds
? Is that valid?
This is where I have to admit to not being an expert on these conventions, I just noticed when implementing /reports
that a CSV wasn't JSON and that started me looking. Reading some more, I see that text/csv
is a recognized media type, so I think the appropriate thing would be text/vnd.mds+csv
if I understand the conventions correctly. This would even save us from having to include a "we know this isn't standard" disclaimer. But it would be nice if someone a bit more familiar with these considerations could chime in to say that looks right :)
Agree and maybe @marie-x @avatarneil or @thekaveman could help with how to handle csv output.
I have been summoned! text/csv
is definitely the correct media type to use typically for CSV downloads, so I'd say that text/vnd.mds+csv
would definitely be the way to go in my opinion.
Explain pull request
The spec currently requires the
/reports
endpoint to be queried with media-typeapplication/vnd.mds+json
in theAccept
header. But the endpoint returns a CSV, not JSON, so this is a bit confusing. This PR suggests a different approach (though it has its own drawback sincecsv
is not a standard media-type suffix).Is this a breaking change
This is a breaking change. The intent is for this to be included in MDS 2.0.
Impacted Spec
Which spec(s) will this pull request impact?
provider
Additional context
See the discussion from https://github.com/openmobilityfoundation/mobility-data-specification/wiki/Web-conference-notes,-2022.07.07-(MDS-Working-Group) and the discussion at https://github.com/openmobilityfoundation/mobility-data-specification/issues/672