mirror of
https://github.com/semver/semver.git
synced 2026-03-08 23:12:02 -05:00
Better documentation for "public API" requirement #499
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sfsinger19103 on GitHub (Aug 25, 2021).
Related to #666.
I'm a newbie to publishing software, trying to do it responsibly. I'm following the recommendations in the CII Best Practices. One of these recommendations is to use Semantic Versioning. I would like to do that!
Reading the documentation, though, I don't know exactly what I need to do to "declare a public API." It would be great if the specification either defined the term or had a pointer to a definition or, even better, some new-user-friendly documentation.
Here's the code repository btw.
@ljharb commented on GitHub (Aug 25, 2021):
Write prose documentation; add test coverage for it; and assume that anything anyone CAN do is something they'll try to treat as part of your API.
@sfsinger19103 commented on GitHub (Aug 25, 2021):
Thanks @ljharb. I still don't know what you're referring to when you say "your API". Is "my API" this page?
@ljharb commented on GitHub (Aug 25, 2021):
Your API is "any way that your users interact with your project". If your project is a function, then the API is "how many arguments it takes, what kind of thing they are, and what kind of thing it returns" along with, of course, the semantics therein.
For example, https://github.com/ElectionDataAnalysis/electiondata/blob/main/docs/User_Guide.md#determining-a-munger describes params, their required format, what's optional, etc - that's all part of your API.
@sfsinger19103 commented on GitHub (Aug 25, 2021):
Ok, so if I understand correctly, pointing to my reasonable documentation from the README.md of my GitHub repository counts as "declaring a public API."
@ljharb commented on GitHub (Aug 25, 2021):
Seems like it to me. Personally I’d say that anything consumers are capable of doing counts as declaring it, but opinions differ :-)