Last active
December 2, 2021 03:12
-
-
Save harada-shota/defc8eeaac3c9a584111fb0a4e1c4ec4 to your computer and use it in GitHub Desktop.
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
// .msw/loadOpenAPISpec.ts | |
import fs from "fs"; | |
import yaml from "js-yaml"; | |
export function getOpenAPISpec() { | |
return yaml.load( | |
fs.readFileSync( | |
require.resolve("{API定義が格納されているパス}/openapi.yaml"), | |
"utf8" | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment