Documentation for docs (#43)

This commit is contained in:
Janos Dobronszki
2021-01-20 10:44:26 +00:00
committed by GitHub
parent 42370d50f3
commit 8d748ba76b
2 changed files with 23 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ micro run github.com/micro/services/helloworld
Feel free to contribute by PR and signoff.
Documentation for this repo is autogenerated and appears on services.m3o.com
Read [this document](cmd/docgen/README.md) on how to write documentation for these services.
## License
[Polyform Strict](https://polyformproject.org/licenses/strict/1.0.0/)

20
cmd/docgen/README.md Normal file
View File

@@ -0,0 +1,20 @@
# Docgen
This scripts takes open api specs that are generated in each folder by `make proto` (see `api-users.json` and similar in each folder), and existing `README.md` and generates docs that appear on services.m3o.com.
The readmes are taken verbatim and autogenerated client call examples are appended to them to produce an output readme, so there is no need to write curl or micro cli or any other examples. Focus on the describing the service in the readmes.
Some rules on how to write protos so they nicely appear in the output of this script:
- The request types (eg. `LoginRequest`) comments will be taken and used as a description for the endpoint (eg. `Login`) itself. This might change.
- The proto message field comments will be taken and displayed to craft them with care
To provide example values use the following format:
```shell
// rss feed name
// eg. a16z
string name = 1;
```
The part after the `eg. ` until the newline will be used as example value.