NewRegistry returns a new Registry.
()
| 203 | |
| 204 | // NewRegistry returns a new Registry. |
| 205 | func NewRegistry() *Registry { |
| 206 | return &Registry{ |
| 207 | msgs: make(map[string]*Message), |
| 208 | enums: make(map[string]*Enum), |
| 209 | meths: make(map[string]*Method), |
| 210 | files: make(map[string]*File), |
| 211 | pkgMap: make(map[string]string), |
| 212 | pkgAliases: make(map[string]string), |
| 213 | externalHTTPRules: make(map[string][]*annotations.HttpRule), |
| 214 | openAPINamingStrategy: "legacy", |
| 215 | visibilityRestrictionSelectors: make(map[string]bool), |
| 216 | repeatedPathParamSeparator: repeatedFieldSeparator{ |
| 217 | name: "csv", |
| 218 | sep: ',', |
| 219 | }, |
| 220 | fileOptions: make(map[string]*options.Swagger), |
| 221 | methodOptions: make(map[string]*options.Operation), |
| 222 | messageOptions: make(map[string]*options.Schema), |
| 223 | serviceOptions: make(map[string]*options.Tag), |
| 224 | fieldOptions: make(map[string]*options.JSONSchema), |
| 225 | annotationMap: make(map[annotationIdentifier]struct{}), |
| 226 | recursiveDepth: 1000, |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | // Load loads definitions of services, methods, messages, enumerations and fields from "req". |
| 231 | func (r *Registry) Load(req *pluginpb.CodeGeneratorRequest) error { |
no outgoing calls