2021年5月7日星期五

How can I extract a JSON schema from Open API file for specific interface?

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")  
https://stackoverflow.com/questions/67425792/how-can-i-extract-a-json-schema-from-open-api-file-for-specific-interface May 07, 2021 at 04:51AM

没有评论:

发表评论