Closed seeflood closed 2 years ago
you should be able to achieve this by using a custom template. For example, instead of this
## Table of Contents
{{range .Files}}{{$file_name := .Name}}
- [{{.Name}}](#{{.Name}})
{{- if .Messages }}
{{range .Messages}} - [{{.LongName}}](#{{.FullName}})
{{end}}
{{- end -}}
{{- if .Enums }}
{{range .Enums}} - [{{.LongName}}](#{{.FullName}})
{{end}}
{{- end -}}
{{- if .Extensions }}
{{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions)
{{end}}
{{- end -}}
{{- if .Services }}
{{range .Services}} - [{{.Name}}](#{{.FullName}})
{{end}}
{{- end -}}
{{end}}
just put the services, or all services first then all models, or whatever you find most interesting. In my case I'm putting only the services:
## Table of Contents
{{range .Files}}{{$file_name := .Name}}
- [{{.Name}}](#{{.Name}})
{{range .Services}} - [{{.Name}}](#{{.FullName}})
{{end}}
{{end}}
...of course the same applies to the template used for html which looks like is the output you're using
@horacimacias Thanks!
What would you like to be added: Separate the grpc services and messages to make the generated document more readable.
Why is this needed: Currently a generated document with a service and lots of messages is not readable enough. The grpc services and request/response messages are mixed without highlight:
Can we seperate them to make the doc more readable?