mufeedvh/binserve

Writing API docs

AMythicDev opened this issue ยท 5 comments

As exploring through your project, I found that it does not have API documentation. It is very necessary, especially for new contributors that they are provided with it so it is easier for them. It is also helpful for people like us who sometimes need reference to a function or a struct

It seems you haven't written binserve simultaneously writing code and docs, feel free to tell me if you need help while writing the docs

Hey @arijit79, thank you for raising this issue. binserve is not a library, it's a tool/utility/software. There is no API in binserve as you can see there is no lib.rs in src/. Although your issue gave me an idea, I should probably add an API for dynamic routes, template variables, and such, I will think about it. But at the moment, there is no need for it. ๐Ÿ‘

I am not talking about making it a library. I am recommending this because you should add docs so that IDEs can use it to give us hints about what each function does rather than developers manually going to the implementation and reading the comments. It can give us description of items by just hovering over it

Ah, that makes sense! I will convert the already written comments to Rust documentation comments when I get some time. If you want to help, you are more than welcome to open a PR! โค๏ธ๐Ÿ™Œ

Nice, but I didn't mean that you just copy and paste the comments into docs but rather write some new lines as part of the docs. You should go check out this link to get more idea on how to write good docs

https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html

Yeah, I get it! What I meant by "convert to Rust documentation comments" was just that, I have written a little, just have to elaborate based on those. ๐Ÿ‘