Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

from-file-keyword #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build_swagger_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
parser.add_argument('--host', default=None)
parser.add_argument('--base-path', default=None)
parser.add_argument('--version', default=None, help='Specify a spec version')
parser.add_argument('--from-file-keyword', default=None, help='from file keyword')

args = parser.parse_args()


def run():
app = pkg_resources.EntryPoint.parse("x=%s" % args.app).resolve()

Expand All @@ -36,7 +38,7 @@ def run():
for d in rawdefs.keys():
template['definitions'][d] = rawdefs[d]

spec = swagger(app, template=template)
spec = swagger(app, template=template, from_file_keyword=args.from_file_keyword)
if args.host is not None:
spec['host'] = args.host
if args.base_path is not None:
Expand Down