Skip to content

Conversation

ahl
Copy link
Collaborator

@ahl ahl commented Aug 29, 2025

To support SCIM support, dropshot needs to be able to accept requests whose content-type header is specifically application/scim+json. Taking this apart, this MIME type means "the SCIM protocol, serialized as JSON". One can think of it as strictly a subset of JSON i.e. all messages are in the SCIM protocol, but all are also valid JSON.

We have several options for how to address this. It would seem reasonable and robust to allow an ApiDescription (i.e. a collection of endpoints) for which we say "the input and response bodies are all SCIM protocol so application/scim+json is applicable" (and that might be inclusive or exclusive of application/json i.e. the scim+ part might be optional). We could include this in the OpenAPI output to document the content type for body parameters and responses. This idea, however, requires something along the lines of what's imagined in PR #922 and hasn't been completed.

Instead, this PR implements a more expedient approach: treat content-type: application/X+json as application/json. This isn't wrong per se as the former is a subset of the latter, but it doesn't allow a consumer to impose a distinction between the two.

Closes #1383

@ahl ahl requested review from jmpesp and sunshowers August 29, 2025 23:03
Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ahl ahl merged commit 3d371c4 into main Sep 2, 2025
11 checks passed
@ahl ahl deleted the json-who branch September 2, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dropshot should support other application/json aliases

3 participants