Last active
July 21, 2021 23:35
-
-
Save MiguelSavignano/ac2ae269d7484ed0c2f38dc1e609b91a to your computer and use it in GitHub Desktop.
Resolve $ref in openapi definitions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
const parser = require('swagger-parser'); | |
const PATH = process.argv[2] | |
parser.dereference(PATH).then((document => { | |
console.log(JSON.stringify(document, null, 2)) | |
})) | |
// ./swagger-spec ./example/petstore.json > petstore-spec.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment