-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API View] Generate API Report in JSON #2019
base: main
Are you sure you want to change the base?
Conversation
@@ -14,6 +14,7 @@ members = [ | |||
"eng/test/mock_transport", | |||
"sdk/storage", | |||
"sdk/storage/azure_storage_blob", | |||
"sdk/temp-project/docs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want this part of the main workspace. We should put this under eng/tools
which can have a separate workspace, if even needed there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now. This is for a "template" project. We could use what @hallipr wants as well, which I plan to basically be Key Vault Secrets anyway, which is what most other languages use for their "template" projects.
Description
This pull request introduces the
generate_api_report
tool, which generates a JSON report of the API documentation for a specified Rust package. The tool processes the JSON output fromcargo +nightly rustdoc ...
to remove unnecessary attributes and outputs a cleaned-up version of the JSON.Changes
generate_api_report
tool in theeng/tools/
directory.src/main.rs
to handle the command-line interface and processing logic.src/models.rs
to represent the minimal structure of the JSON data from rustdoc.serde
andserde_json
for JSON parsing and serialization.Usage
To run the tool, navigate to the root of the
azure-sdk-for-rust
repository and use the following command:This generates
<package_name>_compact.json
in the doc directory, adjacent to the rustdoc JSON (<package_name>.json
) output in thetarget/doc
folder.Example
For example, to generate the report for a package named
docs
, run:Related work
The output from this tool is fed as the input to the
rust-api-parser
at Azure/azure-sdk-tools#9592