postman-app-support
postman-app-support copied to clipboard
New Integration Request - add JSON Schema to "Import" facility
Describe your current workflow
I use Postman to both GET and POST information about operations of my farm to its online system-of-record via the farmOS API.
As described on that page, "farmOS adheres to the JSON:API specification, and JSON Schema is used to describe the available API resources."
This schema -though (547 lines) long for a farmer to read- is too terse, and lacking in detail (descriptions, examples, etc.) that would make it useful as a guide for the non-developer to navigate and use the API.
So i have compiled a collection of Requests scripted by a technical associate -each one for a very specific purpose- and am starting to chain them together in Flows that involve some moderately complex logic, but Documentation is seriously lacking.
Describe your ideal workflow
I want to build operation-specific Flows in Postman that can be run by the "naive user" without any coding required, and designed/ tested/ deployed by a low-code sysadmin, with benefit of the excellent documentation affordances provided by the OpenAPI 3.x spec.
For this to work, it must be possible to pull this JSON schema into Postman and build code and docs around it, but- though this schema does validate agains the 2019-09 Draft standard -it is not recognised as valid by Postman, following the documented steps.
Describe alternatives you've considered
Within the Postman environment, there is nothing to approach the elegance of it's OAS implementation, so- encouraged by this PM Discourse thread -i have reviewed a project or two aimed at rolling a JSON:API up into a valid OpenAPI Specification document, which might then be imported into Postman, but i've not found any way to make this work.
Additional context
As explained by Arnaud Lauret in this recent Space Camp video), OAS 3.0 did not reinvent the wheel, but was build on the foundation of JSON Schema. Moreover, as “every time you will need to describe data in OpenAPI, you will use jSON Schema to do that" (per @arnaudlacour , ibid), it seems to me a serious handicap for OpenAPI builders in Postman to lack a JSON:Schema import affordance. Indeed, as this article says that "JSON Schema and OpenAPI will no longer have minor differences in the schema object, but will finally be compatible from OpenAPI v3.1," perhaps it is time to scope out the work that would be required to make JSON Schema Import a reality in Postman.
Thanks @ludwa6 - your explanation was super-helpful. Can you link to / share a slice of the collection that you've compiled? The way you're mapping the JSON schema to requests would be interesting to see. cc @akshaydeo
Thanks @abhijitkane for the quick uptake. To your request:
...Can you link to / share a slice of the collection that you've compiled? The way you're mapping the JSON schema to requests would be interesting to see. cc @akshaydeo
It being early days for me in Postman, the relevant collection is quite an experimental mess as it stands, which i would have to spend some time cleaning-up to share.
I can however share this Google Colaboratory notebook, which contains (along w/ a bit of project context) all those python, scrips that i am presently using to POST weekly updates (crop installations and harvests) to operational database via the farmOS API.
As you can see, there is some non-trivial logic involved that i believe can be implemented in a much more comprehensible and flexible way in Postman, especially in light of the Flows feature -a far more user-friendly way to configure and deploy Flows than is possible using Jupyter Notebooks.
My immediate goal is to port these weekly workflows over to Postman, which will take some doing... But in the meantime, it would sure be great to see this Import JSON Schema function start coming together. To that end, i will be following this issue, and will contribute to the best of my (low-code :-) ability.