You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. The command outputs the location of the generated markdown file. Provide this file to the user for review.
24
+
3. The command generates `api.md` and `api.metadata.yml` in the package directory, which are the files needed to pass the API consistency check. Provide these files to the user for review.
25
+
4. If the user explicitly asks for the raw APIView token file, run `azpysdk apistub . --token-file` instead.
Copy file name to clipboardExpand all lines: doc/dev/tests.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ A quick description of the commands above:
147
147
- verifywhl: verifies the wheel contents and manifest
148
148
- verifysdist: verifies the sdist contents and manifest
149
149
- samples: runs all of the samples in the `samples` directory and verifies they are working correctly
150
-
- apistub: runs the [apistubgenerator](https://github.com/Azure/azure-sdk-tools/tree/main/packages/python-packages/apiview-stub-generator) tool on your code
150
+
- apistub: runs the [apistubgenerator](https://github.com/Azure/azure-sdk-tools/tree/main/packages/python-packages/apiview-stub-generator) tool on your code. By default, generates `api.md` and `api.metadata.yml` in the package directory, which are the files needed to pass the API consistency check. Use `--token-file` to generate only the raw APIView token file.
|`apistub`| Generates an api stub for the package. |`azpysdk apistub .`|
24
+
|`apistub`| Generates `api.md`, API metadata, or APIView token files for the package. |`azpysdk apistub .`|
25
25
|`bandit`| Runs `bandit` checks, which detect common security issues. |`azpysdk bandit .`|
26
26
|`verifywhl`| Verifies that the root directory in whl is azure, and verifies manifest so that all directories in source are included in sdist. |`azpysdk verifywhl .`|
27
27
|`verifysdist`| Verify directories included in sdist and contents in manifest file. Also ensures that py.typed configuration is correct within the setup.py. |`azpysdk verifysdist .`|
Copy file name to clipboardExpand all lines: eng/tools/azure-sdk-tools/azpysdk/apistub.py
+25-38Lines changed: 25 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -57,24 +57,11 @@ def register(
57
57
"apistub", parents=parents, help="Run the apistub check to generate an API stub for a package"
58
58
)
59
59
p.add_argument(
60
-
"--dest-dir",
61
-
dest="dest_dir",
62
-
default=None,
63
-
help="Destination directory for generated API stub token files.",
64
-
)
65
-
p.add_argument(
66
-
"--md",
67
-
dest="generate_md",
68
-
default=False,
69
-
action="store_true",
70
-
help="Generate api.md from the JSON token file using Export-APIViewMarkdown.ps1. Output directory for api.md is the same as the generated token file.",
71
-
)
72
-
p.add_argument(
73
-
"--extract-metadata",
74
-
dest="extract_metadata",
60
+
"--token-file",
61
+
dest="token_file",
75
62
default=False,
76
63
action="store_true",
77
-
help="Extract language-specific metadata from generated api.md into api.metadata.yml and remove metadata header from api.md.",
0 commit comments