# OpenAPI over JSON:API

**URL:** <https://community.postman.com/t/openapi-over-json-api/36143>\
**Category:** Help Hub\
**Created:** [June 11, 2022, 5:34pm UTC](https://community.postman.com/t/openapi-over-json-api/36143 "2022-06-11T17:34:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ludwa6](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@ludwa6](https://community.postman.com/u/ludwa6)\
**Post date:** [June 11, 2022, 5:34pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/1 "2022-06-11T17:34:04Z")

</div>

Total n00b question here: I find myself having to manage mission-critical data about my farm via [this JSON:API interface](https://vdl.farmos.net/api/), which is more of a chore than i think it should be, so i am wondering: can i use Postman to build my own OpenAPI interface on top of that foundation?

I ask because, as non-technical owner of both that farmOS instance and the farm that is its subject, i am struggling mightily to learn (and relearn, every time i sit down to do my deskwork) my way around this API. Yet i was so inspired by this [Getting Started with OpenAPI in Postman](https://www.youtube.com/watch?v=YRzpziA35Mg) video, i found it surprisingly easy to build my own “Postmanauts” collection… Then it occured to me that if i could build a API to my farmOS instance in like fashion, leveraging those powerful built-in documentation affordances, that could make my job SO much easier!

So: tho i don’t know enough about all all the underlying tech in this stack (JSON:API on [farmOS.org](http://farmOS.org) on Drupal on… etc!), this Postman implementation of OpenAPI seems so user-friendly, i’d just like to know if i can use it to build an interface for those few simple GET and POST requests that i am having to send routinely to my database -with sufficient documentation to enable delegation of the data admin tasks to others (so i can get back to playing farmer 😄)  
Is that a naive expectation, or what?

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [June 11, 2022, 6:01pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/2 "2022-06-11T18:01:50Z")

</div>

Hi @ludwa6

This is not something I have done personally but I know that if you have existing OpenAPI definitions then you can import them like this;

> **[OpenAPI | Postman Learning Center](https://learning.postman.com/docs/integrations/available-integrations/working-with-openAPI/)**
>
> OpenAPI: documentation for Postman, the collaboration platform for API development. Create better APIs—faster.

I’d have to do a bit of reading, but happy to try and help. 👍

* * *

I would think that if it is just a “few simple GET and POST requests” you could simply create a collection and configure the GET and POST calls that way.

If you have the cURL commands you could literally just import them.

---

<div class="post-metadata">

**Author:** ![ludwa6](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@ludwa6](https://community.postman.com/u/ludwa6)\
**Post date:** [June 11, 2022, 6:40pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/3 "2022-06-11T18:40:10Z")

</div>

Thanks @w4dd325 for the quick & supportive reply!

> [@w4dd325](#):
>
> if you have existing OpenAPI definitions then you can import them like this;

Interesting: tho i’ve been given to understand that this JSON:API is somehow compatible with Swagger, i’m not sure if it would qualify as OpenAPI 3.x compatible… But i will try that import facility, to see if it works.

> [@w4dd325](#):
>
> if it is just a “few simple GET and POST requests” you could simply create a collection and configure the GET and POST calls that way

Those few simple requests were scripted in Python by a farmOS developer who’s been helping me out -which scripts we have rolled-up into a Jupyter Notebook with some explanatory documentation, but… It’s a far cry from the elegance of those docs rendered automatically in Postman’s implementation of OpenAPI. That’s what i’m really pining for, is a well-documented user interface to this API that is the only affordance we have for uploading CSV data to farmOS, and creating custom reports.

I guess my question is essentially the same (tho not so succinctly stated) as [this one over at StackOverflow](https://stackoverflow.com/questions/71925536/how-to-generate-an-openapi-documentation-from-a-jsonapi-compliant-response) -still unanswered \>1month after pub date- so the Q remains: _Given a .json response from a resource that implements JSON:API (as in the [official example](https://jsonapi.org/)), what is the optimal way to generate a .yaml OpenAPI documentation from the given file?_

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [June 11, 2022, 7:56pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/4 "2022-06-11T19:56:55Z")

</div>

Not sure if the info here would help at all?

> **[OpenAPI 3.0 spec that conforms to JSON:API](https://discuss.jsonapi.org/t/openapi-3-0-spec-that-conforms-to-json-api/1803)**
>
> After searching and searching online for an example of an OpenAPI 3.0 spec that conforms to JSON:API and coming up short, I decided to give it a shot myself. I would appreciate any feedback!

---

<div class="post-metadata">

**Author:** ![ludwa6](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@ludwa6](https://community.postman.com/u/ludwa6)\
**Post date:** [June 13, 2022, 2:24pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/5 "2022-06-13T14:24:23Z")

</div>

> [@w4dd325](#):
>
> Not sure if the info here would help at all?

That’s an encouraging thread indeed, @w4dd325 -which, besides the OP’s draft spec, is followed by [another spec](https://github.com/columbia-it/django-jsonapi-training/blob/master/docs/schemas/openapi.yaml) that looks to my uneducated eye quite substantial (at ~5k lines of YAML, it oughta be! =8-0…

Clearly i’ve got a pretty steep learning curve ahead of me, before i’m near ready to say i know how this is to be done, but this gives me enough reason to feel like i’m barking up the right tree, at least. Thanks for that, @w4dd325.

Meanwhile, i’ve just begun reading “[The Design of Web API’s](https://www.manning.com/books/the-design-of-web-apis)” by @arnaudlacour , and- following his sage advice about nailing down all important Goals for the API _ **first** _, before giving any attention to what goes on under the hood- am busy filling out my “API Goals Canvas.” Excellent book, b/t/w; really helps to put all these specs & techs in proper context.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 12:55pm UTC](https://community.postman.com/t/openapi-over-json-api/36143/6 "2024-12-12T12:55:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
