swagger-yaml-inject
1.0.5 • Public • Published Swagger YAML inject
Usage:
- Create a template YAML file called
template.yaml
in specifications' root path.
- Write
%paths%
and %definitions%
in the respective places inside template.yaml file.
- Import and call main method providing specifications' root path as a string.
Example of usage:
const yamlInject = require('swagger-yaml-inject');
yamlInject('build/api');
template.yaml
file example:
swagger: '2.0'
info:
version: "0.0.1"
title: Your API title
schemes:
- http
basePath: /
paths:
%paths%
definitions:
%definitions%
Package Sidebar
Install
npm i swagger-yaml-inject
Weekly Downloads