diff --git a/src/tools/vppapigen/generate_json.py b/src/tools/vppapigen/generate_json.py
index 288e519..e8041c5 100755
--- a/src/tools/vppapigen/generate_json.py
+++ b/src/tools/vppapigen/generate_json.py
@@ -16,30 +16,37 @@
 import argparse
 import pathlib
 import subprocess
-BASE_DIR = subprocess.check_output('git rev-parse --show-toplevel',
-                                   shell=True).strip().decode()
+
+BASE_DIR = (
+    subprocess.check_output("git rev-parse --show-toplevel", shell=True)
+    .strip()
+    .decode()
+)
 vppapigen_bin = pathlib.Path(
-    '%s/src/tools/vppapigen/vppapigen.py' % BASE_DIR).as_posix()
+    "%s/src/tools/vppapigen/vppapigen.py" % BASE_DIR
+).as_posix()
 
 src_dir_depth = 3
 output_path = pathlib.Path(
-    '%s/build-root/install-vpp-native/vpp/share/vpp/api/' % BASE_DIR)
+    "%s/build-root/install-vpp-native/vpp/share/vpp/api/" % BASE_DIR
+)
 output_path_debug = pathlib.Path(
-    '%s/build-root/install-vpp_debug-native/vpp/share/vpp/api/' % BASE_DIR)
+    "%s/build-root/install-vpp_debug-native/vpp/share/vpp/api/" % BASE_DIR
+)
 
 output_dir_map = {
-    'plugins': 'plugins',
-    'vlibmemory': 'core',
-    'vnet': 'core',
-    'vlib': 'core',
-    'vpp': 'core',
+    "plugins": "plugins",
+    "vlibmemory": "core",
+    "vnet": "core",
+    "vlib": "core",
+    "vpp": "core",
 }
 
 
 def api_search_globs(src_dir):
     globs = []
     for g in output_dir_map:
-        globs.extend(list(src_dir.glob('%s/**/*.api' % g)))
+        globs.extend(list(src_dir.glob("%s/**/*.api" % g)))
     return globs
 
 
@@ -51,28 +58,41 @@
 def vppapigen(vppapigen_bin, output_path, src_dir, src_file):
     try:
         subprocess.check_output(
-            [vppapigen_bin, '--includedir', src_dir.as_posix(),
-             '--input', src_file.as_posix(), 'JSON',
-             '--output', '%s/%s/%s.json' % (
-                 output_path,
-                 output_dir_map[src_file.as_posix().split('/')[
-                     src_dir_depth + BASE_DIR.count('/') - 1]],
-                 src_file.name)])
+            [
+                vppapigen_bin,
+                "--includedir",
+                src_dir.as_posix(),
+                "--input",
+                src_file.as_posix(),
+                "JSON",
+                "--output",
+                "%s/%s/%s.json"
+                % (
+                    output_path,
+                    output_dir_map[
+                        src_file.as_posix().split("/")[
+                            src_dir_depth + BASE_DIR.count("/") - 1
+                        ]
+                    ],
+                    src_file.name,
+                ),
+            ]
+        )
     except KeyError:
-        print('src_file: %s' % src_file)
+        print("src_file: %s" % src_file)
         raise
 
 
 def main():
-    cliparser = argparse.ArgumentParser(
-        description='VPP API JSON definition generator')
-    cliparser.add_argument('--srcdir', action='store',
-                           default='%s/src' % BASE_DIR),
-    cliparser.add_argument('--output', action='store',
-                           help='directory to store files'),
-    cliparser.add_argument('--debug-target', action='store_true',
-                           default=False,
-                           help="'True' if -debug target"),
+    cliparser = argparse.ArgumentParser(description="VPP API JSON definition generator")
+    cliparser.add_argument("--srcdir", action="store", default="%s/src" % BASE_DIR),
+    cliparser.add_argument("--output", action="store", help="directory to store files"),
+    cliparser.add_argument(
+        "--debug-target",
+        action="store_true",
+        default=False,
+        help="'True' if -debug target",
+    ),
     args = cliparser.parse_args()
 
     src_dir = pathlib.Path(args.srcdir)
@@ -86,13 +106,13 @@
     for d in output_dir_map.values():
         output_dir.joinpath(d).mkdir(exist_ok=True, parents=True)
 
-    for f in output_dir.glob('**/*.api.json'):
+    for f in output_dir.glob("**/*.api.json"):
         f.unlink()
 
     for f in api_files(src_dir):
         vppapigen(vppapigen_bin, output_dir, src_dir, f)
-    print('json files written to: %s/.' % output_dir)
+    print("json files written to: %s/." % output_dir)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     main()
