github.com/solo-io/service-mesh-hub@v0.9.2/docs/proto_docs_template.tmpl (about)

     1  
     2  ---
     3  title: "{{ cleanFileName .Name}}"
     4  ---
     5  
     6  ## Package : `{{ .Package }}`
     7  
     8  {{$file_name := cleanFileName .Name}}
     9  
    10  <a name="top"></a>
    11  
    12  <a name="API Reference for {{ cleanFileName .Name }}"></a>
    13  <p align="right"><a href="#top">Top</a></p>
    14  
    15  ## {{ cleanFileName .Name }}
    16  {{.Description}}
    17  
    18  ## Table of Contents
    19  {{range .Messages}}  - [{{.LongName}}](#{{.FullName}})
    20  {{end}}
    21  {{range .Enums}}  - [{{.LongName}}](#{{.FullName}})
    22  {{end}}
    23  {{range .Extensions}}  - [File-level Extensions](#{{$file_name}}-extensions)
    24  {{end}}
    25  {{range .Services}}  - [{{.Name}}](#{{.FullName}})
    26  {{end}}
    27  
    28  
    29  {{range .Messages}}
    30  <a name="{{.FullName}}"></a>
    31  
    32  ### {{.LongName}}
    33  {{replaceNewLine .Description}}
    34  
    35  {{if .HasFields}}
    36  | Field | Type | Label | Description |
    37  | ----- | ---- | ----- | ----------- |
    38  {{range .Fields -}}
    39    | {{lowerCamel .Name }} | {{ if eq .Label "repeated" }}[]{{- end }}{{.FullType}} | {{.Label}} | {{ replaceNewLine .Description }}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
    40  {{end}}
    41  {{end}}
    42  
    43  {{if .HasExtensions}}
    44  | Extension | Type | Base | Number | Description |
    45  | --------- | ---- | ---- | ------ | ----------- |
    46  {{range .Extensions -}}
    47    | {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{replaceNewLine .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
    48  {{end}}
    49  {{end}}
    50  
    51  {{end}} <!-- end messages -->
    52  
    53  {{range .Enums}}
    54  <a name="{{.FullName}}"></a>
    55  
    56  ### {{.LongName}}
    57  {{replaceNewLine .Description}}
    58  
    59  | Name | Number | Description |
    60  | ---- | ------ | ----------- |
    61  {{range .Values -}}
    62    | {{.Name}} | {{.Number}} | {{replaceNewLine .Description}} |
    63  {{end}}
    64  
    65  {{end}} <!-- end enums -->
    66  
    67  {{if .HasExtensions}}
    68  <a name="{{$file_name}}-extensions"></a>
    69  
    70  ### File-level Extensions
    71  | Extension | Type | Base | Number | Description |
    72  | --------- | ---- | ---- | ------ | ----------- |
    73  {{range .Extensions -}}
    74    | {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{replaceNewLine .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} |
    75  {{end}}
    76  {{end}} <!-- end HasExtensions -->
    77  
    78  {{range .Services}}
    79  <a name="{{.FullName}}"></a>
    80  
    81  ### {{.Name}}
    82  {{replaceNewLine .Description}}
    83  
    84  | Method Name | Request Type | Response Type | Description |
    85  | ----------- | ------------ | ------------- | ------------|
    86  {{range .Methods -}}
    87    | {{.Name}} | [{{.RequestLongType}}](#{{.RequestFullType}}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseFullType}}){{if .ResponseStreaming}} stream{{end}} | {{replaceNewLine .Description}} |
    88  {{end}}
    89  {{end}} <!-- end services -->
    90