Document C/C++ API documentation version info conventions. (#10396)

This commit is contained in:
Edward Chen 2022-01-27 10:20:13 -08:00 committed by GitHub
parent 3367ddc5ba
commit 66acf50488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,4 +4,23 @@ This directory contains doxygen configuration to generate the C/C++ API docs for
The actual generation is performed by a GitHub actions workflow: [publish-c-apidocs.yml](../../.github/workflows/publish-c-apidocs.yml).
The workflow is currently manually triggered, and generates a PR to the gh-pages branch, for publication on https://onnxruntime.ai.
The workflow is currently manually triggered, and generates a PR to the gh-pages branch, for publication on https://onnxruntime.ai.
# C/C++ API Documentation Conventions
## Handling API changes across versions
When a new API is added or an existing API is changed, indicate this in the API's documentation with the Doxygen `\since` command.
This lets readers know the availability and behavior in different versions.
For a new API in version X, add `\since Version X.`. If an API's behavior changes in version Y, add `\since Version Y: <change description>`.
Put each API change entry for a version on its own line.
For example:
```c++
/**
* \brief My API function.
* \since Version X.
* \since Version Y: Does things differently.
*/
void MyApi();
```