// to their resolved Go type names, assigned by the multi-pass name resolver.
resolvedNamesmap[string]string
// resolvedClientWrapperNames maps operationID to the resolved Go type name
// for client response wrapper types (e.g., "createChatCompletion" -> "CreateChatCompletionResponseWrapper").
resolvedClientWrapperNamesmap[string]string
// streamingContentTypeRegexes are the compiled regexes (defaults + user)
// used by ResponseContentDefinition.IsStreamingContentType.
streamingContentTypeRegexes []*regexp.Regexp
// contentTypeNameTags is the compiled output-options.content-types
// mapping, resolving media types to user-configured short names for use
// in generated type names. Nil-safe: a nil matcher matches nothing.
contentTypeNameTags*contentTypeNameTags
// schemaFieldTagGenerator renders struct tags for schema property
// fields (defaults + output-options.struct-tags, including the legacy
// yaml-tags injection). Built in Generate; lazily built for direct
// callers via schemaFieldTagGenerator().
schemaFieldTagGenerator*structTagGenerator
// paramFieldTagGenerator renders struct tags for path parameter fields
// on strict RequestObject structs; identical to the schema generator
// except the legacy yaml-tags flag does not apply.
paramFieldTagGenerator*structTagGenerator
}
// goImport represents a go package to be imported in the generated code
typegoImportstruct {
Namestring// package name
Pathstring// package path
}
// String returns a go import statement
func (gigoImport) String() string {
ifgi.Name!="" {
returnfmt.Sprintf("%s %q", gi.Name, gi.Path)
}
returnfmt.Sprintf("%q", gi.Path)
}
// importMap maps external OpenAPI specifications files/urls to external go packages
typeimportMapmap[string]goImport
// importMappingCurrentPackage allows an Import Mapping to map to the current package, rather than an external package.
// This allows users to split their OpenAPI specification across multiple files, but keep them in the same package, which can reduce a bit of the overhead for users.
// We use `-` to indicate that this is a bit of a special case
constimportMappingCurrentPackage="-"
// GoImports returns a slice of go import statements
return"", fmt.Errorf("you have specified `additional-initialisms`, but the `name-normalizer` is not set to `ToCamelCaseWithInitialisms`. Please specify `name-normalizer: ToCamelCaseWithInitialisms` or remove the `additional-initialisms` configuration")