Reputation: 3334
I am working with an Open API file that has multiple interfaces described in it. What I would like to do is extract programmatically the JSON schema for a particular interface and publish that schema externally so that it can be used to do message verification remotely.
Seems like this is the kind of thing that would be needed very often but I'm not finding a solution and I would hate to have to build my own.
In my wildest dreams, I would find a library that did something like this:
import magicOASLibrary
helloWorldSchema = magicOASLibary.getSchema("OASFile.json", "/helloworld", "get")
Upvotes: 2
Views: 1070
Reputation: 53996
What you're looking for is an implementation of the JSON Pointer syntax.
In Perl, I'd use Mojo::JSON::Pointer (or JSON::Pointer, which is older but seems to work just fine), but I can't give any advice for Python.
Upvotes: 1