-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* copy API documents * Automated generation for API documents (#2742) * init auto generatation for API documents * auto-generated API documents * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in 7a36dd8 according to the output from Gofumpt and Prettier. Details: #2742 * update * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in 74dc4d6 according to the output from Gofumpt and Prettier. Details: #2742 * update * update * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in 384fc7e according to the output from Gofumpt and Prettier. Details: #2742 * update * fix * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in fa4ba75 according to the output from Gofumpt and Prettier. Details: #2742 --------- * add mirror document * style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in df4d79e according to the output from Gofumpt and Prettier. Details: #2741 --------- Co-authored-by: Kosuke Morimoto <[email protected]> Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: Kiichiro YUKAWA <[email protected]>
- Loading branch information
1 parent
cfdb7c1
commit 7c25316
Showing
29 changed files
with
10,173 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
version: v2 | ||
managed: | ||
disable: | ||
- file_option: go_package | ||
module: buf.build/googleapis/googleapis | ||
override: | ||
- file_option: go_package_prefix | ||
value: github.com/vdaas/vald/apis/grpc | ||
plugins: | ||
- local: protoc-gen-doc | ||
out: apis/docs/v1 | ||
opt: apis/docs/v1/doc.md.tmpl,doc.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
version: v2 | ||
managed: | ||
disable: | ||
- file_option: go_package | ||
module: buf.build/googleapis/googleapis | ||
override: | ||
- file_option: go_package_prefix | ||
value: github.com/vdaas/vald/apis/grpc | ||
plugins: | ||
- local: protoc-gen-doc | ||
out: apis/docs/v1 | ||
opt: apis/docs/v1/payload.tmpl,payload.md.tmpl | ||
inputs: | ||
- proto_file: apis/proto/v1/payload/payload.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
version: v2 | ||
managed: | ||
disable: | ||
- file_option: go_package | ||
module: buf.build/googleapis/googleapis | ||
override: | ||
- file_option: go_package_prefix | ||
value: github.com/vdaas/vald/apis/grpc | ||
plugins: | ||
- local: protoc-gen-doc | ||
out: apis/docs/v1 | ||
opt: apis/docs/v1/doc.tmpl,_doc.md.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{- range .Files -}} | ||
{{- range .Services -}} | ||
{{- $descs := dict -}} | ||
{{- range $desc := (splitList "---\n" .Description) -}} | ||
{{- $lines := splitList "\n" $desc -}} | ||
{{- $_ := set $descs (first $lines) (join "\n" (rest $lines)) -}} | ||
{{- end -}} | ||
# Vald {{ .Name }} APIs | ||
|
||
## Overview | ||
|
||
{{ if hasKey $descs "Overview" }}{{ $descs.Overview | trim }}{{ end }} | ||
|
||
```rpc | ||
service {{.Name}} { | ||
|
||
{{ range .Methods }} rpc {{ .Name }}({{ .RequestFullType }}) returns ({{ .ResponseFullType }}) {} | ||
{{ end }} | ||
} | ||
``` | ||
|
||
{{ range .Methods }} | ||
|
||
{{- $descs := dict -}} | ||
{{- range $desc := (splitList "---\n" .Description) -}} | ||
{{- $lines := splitList "\n" $desc -}} | ||
{{- $_ := set $descs (first $lines) (join "\n" (rest $lines)) -}} | ||
{{- end -}} | ||
## {{ .Name }} RPC | ||
|
||
{{ if hasKey $descs "Overview" }}{{ $descs.Overview | trim }}{{ end }} | ||
|
||
### Input | ||
|
||
- the scheme of `{{ .RequestFullType }}` | ||
|
||
```rpc | ||
{{ printf "{{- template \"scheme:%s\" }}\n" .RequestFullType }} | ||
``` | ||
{{ printf "{{ template \"field:%s\" }}" .RequestFullType }} | ||
### Output | ||
|
||
- the scheme of `{{ .ResponseFullType }}` | ||
|
||
```rpc | ||
{{ printf "{{- template \"scheme:%s\" }}\n" .ResponseFullType }} | ||
``` | ||
{{ printf "{{ template \"field:%s\" }}" .ResponseFullType }} | ||
{{ if hasKey $descs "Status Code" }} | ||
### Status Code | ||
|
||
| code | description | | ||
| :--: | :---------------- | | ||
{{ pluck "Status Code" $descs | first | trim }} | ||
|
||
Please refer to [Response Status Code](../status.md) for more details. | ||
{{ end }} | ||
{{ if hasKey $descs "Troubleshooting" }} | ||
### Troubleshooting | ||
|
||
{{ pluck "Troubleshooting" $descs | first | trim }} | ||
{{ end }} | ||
|
||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.