mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Documentation for docs (#43)
This commit is contained in:
@@ -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
20
cmd/docgen/README.md
Normal 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.
|
||||
Reference in New Issue
Block a user