More breaking out
This commit is contained in:
parent
3b9e4076a5
commit
bc06fc01ff
6 changed files with 34 additions and 28 deletions
tools/openapi
7
tools/openapi/BUILD
Normal file
7
tools/openapi/BUILD
Normal 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
11
tools/openapi/__main__.py
Normal 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())
|
Loading…
Add table
Add a link
Reference in a new issue