More breaking out

This commit is contained in:
Reid 'arrdem' McKenzie 2021-08-29 22:17:57 -06:00
commit bc06fc01ff
6 changed files with 34 additions and 28 deletions
tools/openapi

7
tools/openapi/BUILD Normal file
View file

@ -0,0 +1,7 @@
py_binary(
name = "openapi",
main = "__main__.py",
deps = [
py_requirement("openapi-spec-validator"),
]
)

11
tools/openapi/__main__.py Normal file
View file

@ -0,0 +1,11 @@
"""Shim for executing the openapi spec validator."""
import re
import sys
from openapi_spec_validator.__main__ import main
if __name__ == "__main__":
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
sys.exit(main())