# Behaviour of multiple extensions

**URL:** <https://discuss.jsonapi.org/t/behaviour-of-multiple-extensions/2899>\
**Category:** Uncategorized\
**Created:** [August 12, 2024, 12:21pm UTC](https://discuss.jsonapi.org/t/behaviour-of-multiple-extensions/2899 "2024-08-12T12:21:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bednic](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Bednic](https://discuss.jsonapi.org/u/Bednic)\
**Post date:** [August 12, 2024, 12:21pm UTC](https://discuss.jsonapi.org/t/behaviour-of-multiple-extensions/2899/1 "2024-08-12T12:21:31Z")

</div>

I have a several questions about extensions. I undestand that, extension is something which extends document form and behaviour of data. I look up on example of atomic extension. But I’m little bit confused. In specification is written that extension cannot alter or remove semantics. But first thing what atomic does is to forbid data and includes. So my first question is, is it right to allow extension forbid particular parts of document?

Next question is about combination of several extension. Is it allowed to support several extension in one request? If so, how to handle colisions between extensions? Like if atomic forbid data to be presented in document and another extension require its exsitence, this leads to semnatic paradox and thus should not happen. My opinion is that only one extension should be allowed per request, but maybe authors could have different view on this topic, so I’m curious how to handle this properly.

---

<div class="post-metadata">

**Author:** ![bradjones1](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/bradjones1/32/879_2.png) [@bradjones1](https://discuss.jsonapi.org/u/bradjones1)\
**Post date:** [August 15, 2024, 2:12am UTC](https://discuss.jsonapi.org/t/behaviour-of-multiple-extensions/2899/2 "2024-08-15T02:12:29Z")

</div>

> [@Bednic](#):
>
> I look up on example of atomic extension. But I’m little bit confused. In specification is written that extension cannot alter or remove semantics. But first thing what atomic does is to forbid data and includes. So my first question is, is it right to allow extension forbid particular parts of document?

I don’t see this as a contradiction. The specification is not redefining the semantics or `data` or `includes`, but it is specifying further that they are incompatible with other top-level members that are required.

> [@Bednic](#):
>
> Next question is about combination of several extension. Is it allowed to support several extension in one request?

This is answered [in the spec](https://jsonapi.org/format/#media-type-parameter-rules):

> The values of the `ext` and `profile` parameters **MUST** equal a space-separated (U+0020 SPACE, “ “) list of extension or profile URIs, respectively.

I don’t see anything specifically addressing conflicts between extensions, but I suppose it’s up to you to not specify extensions that are incompatible with one another.

---

<div class="post-metadata">

**Author:** ![jelhan](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/jelhan/32/822_2.png) [@jelhan](https://discuss.jsonapi.org/u/jelhan)\
**Post date:** [August 15, 2024, 8:52am UTC](https://discuss.jsonapi.org/t/behaviour-of-multiple-extensions/2899/3 "2024-08-15T08:52:43Z")

</div>

> [@bradjones1](#):
>
> I don’t see anything specifically addressing conflicts between extensions, but I suppose it’s up to you to not specify extensions that are incompatible with one another.

That’s correct. A server must not support an incompatible combination of extensions or profiles. If a client requests an incompatible combination of extensions via `Accept` request header, a server must response with `406 Not Acceptable`.
