-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
docs(api): Add api-common info on generating TypeScript bindings #3330
Conversation
|
||
## Generate TypeScript bindings | ||
|
||
TypeScript bindings (API types) can be generated by running `cargo test --features full`. |
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.
Mention that this needs to be done inside crates/api_common
folder. Alternatively you can run cargo test -p lemmy_api_common --features full
from root.
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.
This README is in the api_common folder. So I think that's implicitly clear and correct.
Documenting the folder and then stating that folder explicitly for actions seems redundant and - to me - confusing.
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.
In that case make the command this to be more clear.
cd crates/api_common
cargo test ...
## Generate TypeScript bindings | ||
|
||
TypeScript bindings (API types) can be generated by running `cargo test --features full`. | ||
The ts files be generated into a `bindings` folder. |
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.
Output is in crates/api_common/bindings
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.
This README file is in crates/api_common. Referencing the bindings folder in it matches that path.
PR #2827 added support for generating TypeScript bindings.
I could not find any information or docs on how to generate them though. The MR description merely mentions tests generating them, but they won't generate unless the
full
feature flag is used.This change adds information that this is possible, how to do it, and where they are put to to the api_common crate README.md.