# OpenAPI definition of JSON:API

**URL:** <https://discuss.jsonapi.org/t/openapi-definition-of-json-api/2565>\
**Category:** Uncategorized\
**Created:** [November 26, 2022, 9:43pm UTC](https://discuss.jsonapi.org/t/openapi-definition-of-json-api/2565 "2022-11-26T21:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shpoont](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/shpoont/32/818_2.png) [@shpoont](https://discuss.jsonapi.org/u/shpoont)\
**Post date:** [November 26, 2022, 9:43pm UTC](https://discuss.jsonapi.org/t/openapi-definition-of-json-api/2565/1 "2022-11-26T21:43:13Z")

</div>

A draft OpenAPI definition of JSON:API is available at [GitHub - shpoont/openapi-jsonapi-definition](https://github.com/shpoont/openapi-jsonapi-definition).

It is intended to provide a fully-documented, mockable OpenAPI example of JSON:API.

Since this is a draft, there is still work to be done. This includes proper schema definitions of new vs existing resources, `x-faker` support, request and response bodies, OpenAPI links, additional examples, etc.

Your feedback, PRs and ideas would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![blackgeneral](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@blackgeneral](https://discuss.jsonapi.org/u/blackgeneral)\
**Post date:** [December 3, 2022, 10:27am UTC](https://discuss.jsonapi.org/t/openapi-definition-of-json-api/2565/2 "2022-12-03T10:27:32Z")

</div>

This is great!

Would it be useful to include a Spectral ruleset to provide automatic validation of the draft against rules using GitHub Actions ?  
Perhaps using the JSON:API ruleset here [GitHub - ikenna/json-api-spectral-ruleset: Spectral ruleset for JSON:API](https://github.com/ikenna/json-api-spectral-ruleset) .

---

<div class="post-metadata">

**Author:** ![shpoont](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/shpoont/32/818_2.png) [@shpoont](https://discuss.jsonapi.org/u/shpoont)\
**Post date:** [December 7, 2022, 11:26pm UTC](https://discuss.jsonapi.org/t/openapi-definition-of-json-api/2565/3 "2022-12-07T23:26:50Z")

</div>

Sounds great! I couldn’t find support for JSON:API 1.1 though, hope it will be added soon.  
I noted your suggestion [in the repo](https://github.com/shpoont/openapi-jsonapi-definition/issues/1), thanks.
