{"modulePath":"github.com/Juno-T/oapi-codegen/v2","version":"v2.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package codegen\n\nCopyright 2019 DeepMap, Inc.\n\nLicensed 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\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless 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.\n\nCopyright 2019 DeepMap, Inc.\n\nLicensed 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\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless 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.\n\nCopyright 2019 DeepMap, Inc.\n\nLicensed 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\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless 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.\n\nCopyright 2019 DeepMap, Inc.\n\nLicensed 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\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless 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.\n\n## Variables\n\n```go\nvar NameNormalizers = NameNormalizerMap{\n\tNameNormalizerFunctionUnset:                      ToCamelCase,\n\tNameNormalizerFunctionToCamelCase:                ToCamelCase,\n\tNameNormalizerFunctionToCamelCaseWithDigits:      ToCamelCaseWithDigits,\n\tNameNormalizerFunctionToCamelCaseWithInitialisms: ToCamelCaseWithInitialisms,\n}\n```\nNameNormalizers contains the valid options for \\`NameNormalizerFunction\\`s that \\`oapi-codegen\\` supports.\n\nIf you are calling \\`oapi-codegen\\` as a library, this allows you to specify your own normalisation types before generating code.\n\n```go\nvar TemplateFunctions = template.FuncMap{\n\t\"genParamArgs\":               genParamArgs,\n\t\"genParamTypes\":              genParamTypes,\n\t\"genParamNames\":              genParamNames,\n\t\"genParamFmtString\":          ReplacePathParamsWithStr,\n\t\"swaggerUriToIrisUri\":        SwaggerUriToIrisUri,\n\t\"swaggerUriToEchoUri\":        SwaggerUriToEchoUri,\n\t\"swaggerUriToFiberUri\":       SwaggerUriToFiberUri,\n\t\"swaggerUriToChiUri\":         SwaggerUriToChiUri,\n\t\"swaggerUriToGinUri\":         SwaggerUriToGinUri,\n\t\"swaggerUriToGorillaUri\":     SwaggerUriToGorillaUri,\n\t\"swaggerUriToStdHttpUri\":     SwaggerUriToStdHttpUri,\n\t\"lcFirst\":                    LowercaseFirstCharacter,\n\t\"ucFirst\":                    UppercaseFirstCharacter,\n\t\"ucFirstWithPkgName\":         UppercaseFirstCharacterWithPkgName,\n\t\"camelCase\":                  ToCamelCase,\n\t\"genResponsePayload\":         genResponsePayload,\n\t\"genResponseTypeName\":        genResponseTypeName,\n\t\"genResponseUnmarshal\":       genResponseUnmarshal,\n\t\"getResponseTypeDefinitions\": getResponseTypeDefinitions,\n\t\"toStringArray\":              toStringArray,\n\t\"lower\":                      strings.ToLower,\n\t\"title\":                      titleCaser.String,\n\t\"stripNewLines\":              stripNewLines,\n\t\"sanitizeGoIdentity\":         SanitizeGoIdentity,\n\t\"toGoComment\":                StringWithTypeNameToGoComment,\n}\n```\nTemplateFunctions is passed to the template engine, and we can call each function here by keyName from the template code.\n\n## Functions\n\n```go\nfunc DeprecationComment(reason string) string\n```\n\n```go\nfunc EscapePathElements(path string) string\n```\nEscapePathElements breaks apart a path, and looks at each element. If it's not a path parameter, eg, {param}, it will URL-escape the element.\n\n```go\nfunc GenFieldsFromProperties(props []Property) []string\n```\nGenFieldsFromProperties produce corresponding field names with JSON annotations, given a list of schema descriptors\n\n```go\nfunc GenStructFromAllOf(allOf []*openapi3.SchemaRef, path []string) (string, error)\n```\nGenStructFromAllOf generates an object that is the union of the objects in the input array. In the case of Ref objects, we use an embedded struct, otherwise, we inline the fields.\n\n```go\nfunc GenStructFromSchema(schema Schema) string\n```\n\n```go\nfunc Generate(spec *openapi3.T, opts Configuration) (string, error)\n```\nGenerate uses the Go templating engine to generate all of our server wrappers from the descriptions we've built up above from the schema objects. opts defines\n\n```go\nfunc GenerateAdditionalPropertyBoilerplate(t *template.Template, typeDefs []TypeDefinition) (string, error)\n```\nGenerateAdditionalPropertyBoilerplate generates all the glue code which provides the API for interacting with additional properties and JSON-ification\n\n```go\nfunc GenerateBodyDefinitions(operationID string, bodyOrRef *openapi3.RequestBodyRef) ([]RequestBodyDefinition, []TypeDefinition, error)\n```\nGenerateBodyDefinitions turns the Swagger body definitions into a list of our body definitions which will be used for code generation.\n\n```go\nfunc GenerateChiServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateChiServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateClient(t *template.Template, ops []OperationDefinition) (string, error)\n```\nGenerateClient uses the template engine to generate the function which registers our wrappers as Echo path handlers.\n\n```go\nfunc GenerateClientWithResponses(t *template.Template, ops []OperationDefinition) (string, error)\n```\nGenerateClientWithResponses generates a client which extends the basic client which does response unmarshaling.\n\n```go\nfunc GenerateConstants(t *template.Template, ops []OperationDefinition) (string, error)\n```\nGenerateConstants generates operation ids, context keys, paths, etc. to be exported as constants\n\n```go\nfunc GenerateEchoServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateEchoServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateEnums(t *template.Template, types []TypeDefinition) (string, error)\n```\n\n```go\nfunc GenerateFiberServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateFiberServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateGinServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateGinServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateGorillaServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateGorillaServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateImports(t *template.Template, externalImports []string, packageName string, versionOverride *string) (string, error)\n```\nGenerateImports generates our import statements and package definition.\n\n```go\nfunc GenerateInlinedSpec(t *template.Template, importMapping importMap, swagger *openapi3.T) (string, error)\n```\nGenerateInlinedSpec generates a gzipped, base64 encoded JSON representation of the swagger definition, which we embed inside the generated code.\n\n```go\nfunc GenerateIrisServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateIrisServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateStdHTTPServer(t *template.Template, operations []OperationDefinition) (string, error)\n```\nGenerateStdHTTPServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.\n\n```go\nfunc GenerateStrictResponses(t *template.Template, responses []ResponseDefinition) (string, error)\n```\n\n```go\nfunc GenerateStrictServer(t *template.Template, operations []OperationDefinition, opts Configuration) (string, error)\n```\n\n```go\nfunc GenerateTemplates(templates []string, t *template.Template, ops interface{}) (string, error)\n```\nGenerateTemplates used to generate templates\n\n```go\nfunc GenerateTypeDefinitions(t *template.Template, swagger *openapi3.T, ops []OperationDefinition, excludeSchemas []string) (string, error)\n```\n\n```go\nfunc GenerateTypes(t *template.Template, types []TypeDefinition) (string, error)\n```\nGenerateTypes passes a bunch of types to the template engine, and buffers its output into a string.\n\n```go\nfunc GenerateTypesForOperations(t *template.Template, ops []OperationDefinition) (string, error)\n```\nGenerateTypesForOperations generates code for all types produced within operations\n\n```go\nfunc GenerateUnionAndAdditionalProopertiesBoilerplate(t *template.Template, typeDefs []TypeDefinition) (string, error)\n```\n\n```go\nfunc GenerateUnionBoilerplate(t *template.Template, typeDefs []TypeDefinition) (string, error)\n```\n\n```go\nfunc GetParametersImports(params map[string]*openapi3.ParameterRef) (map[string]goImport, error)\n```\n\n```go\nfunc GetRequestBodiesImports(bodies map[string]*openapi3.RequestBodyRef) (map[string]goImport, error)\n```\n\n```go\nfunc GetResponsesImports(responses map[string]*openapi3.ResponseRef) (map[string]goImport, error)\n```\n\n```go\nfunc GetSchemaImports(schemas map[string]*openapi3.SchemaRef, excludeSchemas []string) (map[string]goImport, error)\n```\n\n```go\nfunc GetTypeDefinitionsImports(swagger *openapi3.T, excludeSchemas []string) (map[string]goImport, error)\n```\n\n```go\nfunc GetUserTemplateText(inputData string) (template string, err error)\n```\nGetUserTemplateText attempts to retrieve the template text from a passed in URL or file path when inputData is more than one line. This function will attempt to load a file first, and if it fails, will try to get the data from the remote endpoint. The timeout for remote download file is 30 seconds.\n\n```go\nfunc GoSchemaImports(schemas ...*openapi3.SchemaRef) (map[string]goImport, error)\n```\n\n```go\nfunc IsGoIdentity(str string) bool\n```\nIsGoIdentity checks if the given string can be used as an identity in the generated code like a type name or constant name.\n\nSee [https://golang.org/ref/spec#Identifiers](https://golang.org/ref/spec#Identifiers)\n\n```go\nfunc IsGoKeyword(str string) bool\n```\nIsGoKeyword returns whether the given string is a go keyword\n\n```go\nfunc IsGoTypeReference(ref string) bool\n```\nIsGoTypeReference takes a $ref value and checks if it has link to go type. #/components/schemas/Foo                     -\u003e true ./local/file.yml#/components/parameters/Bar  -\u003e true ./local/file.yml                             -\u003e false IsGoTypeReference can be used to check whether RefPathToGoType($ref) is possible.\n\n```go\nfunc IsPredeclaredGoIdentifier(str string) bool\n```\nIsPredeclaredGoIdentifier returns whether the given string is a predefined go identifier.\n\nSee [https://golang.org/ref/spec#Predeclared\\_identifiers](https://golang.org/ref/spec#Predeclared_identifiers)\n\n```go\nfunc IsValidGoIdentity(str string) bool\n```\nIsValidGoIdentity checks if the given string can be used as a name of variable, constant, or type.\n\n```go\nfunc IsWholeDocumentReference(ref string) bool\n```\nIsWholeDocumentReference takes a $ref value and checks if it is whole document reference. #/components/schemas/Foo                             -\u003e false ./local/file.yml#/components/parameters/Bar          -\u003e false ./local/file.yml                                     -\u003e true [http://deepmap.com/schemas/document.json](http://deepmap.com/schemas/document.json)             -\u003e true [http://deepmap.com/schemas/document.json#/Foo](http://deepmap.com/schemas/document.json#/Foo)        -\u003e false\n\n```go\nfunc LoadTemplates(src embed.FS, t *template.Template) error\n```\nLoadTemplates loads all of our template files into a text/template. The path of template is relative to the templates directory.\n\n```go\nfunc LowercaseFirstCharacter(str string) string\n```\nLowercaseFirstCharacter Lowercases the first character in a string. This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.\n\n```go\nfunc LowercaseFirstCharacters(str string) string\n```\nLowercase the first upper characters in a string for case of abbreviation. This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.\n\n```go\nfunc MergeImports(dst, src map[string]goImport)\n```\n\n```go\nfunc OperationImports(ops []OperationDefinition) (map[string]goImport, error)\n```\n\n```go\nfunc OperationSchemaImports(s *Schema) (map[string]goImport, error)\n```\n\n```go\nfunc OrderedParamsFromUri(uri string) []string\n```\nOrderedParamsFromUri returns the argument names, in order, in a given URI string, so for /path/{param1}/{.param2\\*}/{?param3}, it would return param1, param2, param3\n\n```go\nfunc ParseGoImportExtension(v *openapi3.SchemaRef) (*goImport, error)\n```\n\n```go\nfunc PathToTypeName(path []string) string\n```\nPathToTypeName converts a path, like Object/field1/nestedField into a go type name.\n\n```go\nfunc PropertiesEqual(a, b Property) bool\n```\n\n```go\nfunc RefPathToGoType(refPath string) (string, error)\n```\nRefPathToGoType takes a $ref value and converts it to a Go typename. #/components/schemas/Foo -\u003e Foo #/components/parameters/Bar -\u003e Bar #/components/responses/Baz -\u003e Baz Remote components (document.json#/Foo) are supported if they present in --import-mapping URL components ([http://deepmap.com/schemas/document.json#/Foo](http://deepmap.com/schemas/document.json#/Foo)) are supported if they present in --import-mapping Remote and URL also support standard local paths even though the spec doesn't mention them.\n\n```go\nfunc RefPathToObjName(refPath string) string\n```\nRefPathToObjName returns the name of referenced object without changes.\n\n\t#/components/schemas/Foo -\u003e Foo\n\t#/components/parameters/Bar -\u003e Bar\n\t#/components/responses/baz_baz -\u003e baz_baz\n\tdocument.json#/Foo -\u003e Foo\n\thttp://deepmap.com/schemas/document.json#/objObj -\u003e objObj\n\nDoes not check refPath correctness.\n\n```go\nfunc ReplacePathParamsWithStr(uri string) string\n```\nReplacePathParamsWithStr replaces path parameters of the form {param} with %s\n\n```go\nfunc SanitizeCode(goCode string) string\n```\nSanitizeCode runs sanitizers across the generated Go code to ensure the generated code will be able to compile.\n\n```go\nfunc SanitizeEnumNames(enumNames, enumValues []string) map[string]string\n```\nSanitizeEnumNames fixes illegal chars in the enum names and removes duplicates\n\n```go\nfunc SanitizeGoIdentity(str string) string\n```\nSanitizeGoIdentity deletes and replaces the illegal runes in the given string to use the string as a valid identity.\n\n```go\nfunc SchemaHasAdditionalProperties(schema *openapi3.Schema) bool\n```\nAccording to the spec, additionalProperties may be true, false, or a schema. If not present, true is implied. If it's a schema, true is implied. If it's false, no additional properties are allowed. We're going to act a little differently, in that if you want additionalProperties code to be generated, you must specify an additionalProperties type If additionalProperties it true/false, this field will be non-nil.\n\n```go\nfunc SchemaNameToTypeName(name string) string\n```\nSchemaNameToTypeName converts a Schema name to a valid Go type name. It converts to camel case, and makes sure the name is valid in Go\n\n```go\nfunc SetGlobalStateSpec(spec *openapi3.T)\n```\n\n```go\nfunc SortedMapKeys[T any](m map[string]T) []string\n```\nSortedMapKeys takes a map with keys of type string and returns a slice of those keys sorted lexicographically.\n\n```go\nfunc SortedSchemaKeys(dict map[string]*openapi3.SchemaRef) []string\n```\nSortedSchemaKeys returns the keys of the given SchemaRef dictionary in sorted order, since Golang scrambles dictionary keys. This isn't a generic key sort, because we support an extension to grant specific orders to schemas to help control output ordering.\n\n```go\nfunc StringInArray(str string, array []string) bool\n```\nStringInArray checks whether the specified string is present in an array of strings\n\n```go\nfunc StringToGoComment(in string) string\n```\nStringToGoComment renders a possible multi-line string as a valid Go-Comment. Each line is prefixed as a comment.\n\n```go\nfunc StringWithTypeNameToGoComment(in, typeName string) string\n```\nStringWithTypeNameToGoComment renders a possible multi-line string as a valid Go-Comment, including the name of the type being referenced. Each line is prefixed as a comment.\n\n```go\nfunc SwaggerUriToChiUri(uri string) string\n```\nSwaggerUriToChiUri converts a swagger style path URI with parameters to a Chi compatible path URI. We need to replace all Swagger parameters with \"{param}\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToEchoUri(uri string) string\n```\nSwaggerUriToEchoUri converts a OpenAPI style path URI with parameters to an Echo compatible path URI. We need to replace all of OpenAPI parameters with \":param\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToFiberUri(uri string) string\n```\nSwaggerUriToFiberUri converts a OpenAPI style path URI with parameters to a Fiber compatible path URI. We need to replace all of OpenAPI parameters with \":param\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToGinUri(uri string) string\n```\nSwaggerUriToGinUri converts a swagger style path URI with parameters to a Gin compatible path URI. We need to replace all Swagger parameters with \":param\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToGorillaUri(uri string) string\n```\nSwaggerUriToGorillaUri converts a swagger style path URI with parameters to a Gorilla compatible path URI. We need to replace all Swagger parameters with \":param\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToIrisUri(uri string) string\n```\nSwaggerUriToIrisUri converts a OpenAPI style path URI with parameters to an Iris compatible path URI. We need to replace all of OpenAPI parameters with\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc SwaggerUriToStdHttpUri(uri string) string\n```\nSwaggerUriToStdHttpUri converts a swagger style path URI with parameters to a Chi compatible path URI. We need to replace all Swagger parameters with \"{param}\". Valid input parameters are:\n\n\t{param}\n\t{param*}\n\t{.param}\n\t{.param*}\n\t{;param}\n\t{;param*}\n\t{?param}\n\t{?param*}\n\n```go\nfunc ToCamelCase(str string) string\n```\nToCamelCase will convert query-arg style strings to CamelCase. We will use \\`., -, +, :, ;, \\_, ~, ' ', (, ), {, }, \\[, ]\\` as valid delimiters for words. So, \"word.word-word+word:word;word\\_word~word word(word)word{word}\\[word]\" would be converted to WordWordWordWordWordWordWordWordWordWordWordWordWord\n\n```go\nfunc ToCamelCaseWithDigits(s string) string\n```\nToCamelCaseWithDigits function will convert query-arg style strings to CamelCase. We will use \\`., -, +, :, ;, \\_, ~, ' ', (, ), {, }, \\[, ]\\` as valid delimiters for words. The difference of ToCamelCase that letter after a number becomes capitalized. So, \"word.word-word+word:word;word\\_word~word word(word)word{word}\\[word]3word\" would be converted to WordWordWordWordWordWordWordWordWordWordWordWordWord3Word\n\n```go\nfunc ToCamelCaseWithInitialism(str string) string\n```\n\n```go\nfunc ToCamelCaseWithInitialisms(s string) string\n```\nToCamelCaseWithInitialisms function will convert query-arg style strings to CamelCase with initialisms in uppercase. So, httpOperationId would be converted to HTTPOperationID\n\n```go\nfunc TypeDefinitionsEquivalent(t1, t2 TypeDefinition) bool\n```\nTypeDefinitionsEquivalent checks for equality between two type definitions, but not every field is considered. We only want to know if they are fundamentally the same type.\n\n```go\nfunc UppercaseFirstCharacter(str string) string\n```\nUppercaseFirstCharacter Uppercases the first character in a string. This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.\n\n```go\nfunc UppercaseFirstCharacterWithPkgName(str string) string\n```\nUppercase the first character in a identifier with pkg name. This assumes UTF-8, so we have to be careful with unicode, don't treat it as a byte array.\n\n## Types\n\n```go\ntype AdditionalImport struct {\n\tAlias   string `yaml:\"alias,omitempty\"`\n\tPackage string `yaml:\"package\"`\n}\n```\n\n```go\ntype CompatibilityOptions struct {\n\t// In the past, we merged schemas for `allOf` by inlining each schema\n\t// within the schema list. This approach, though, is incorrect because\n\t// `allOf` merges at the schema definition level, not at the resulting model\n\t// level. So, new behavior merges OpenAPI specs but generates different code\n\t// than we have in the past. Set OldMergeSchemas to true for the old behavior.\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/531\n\tOldMergeSchemas bool `yaml:\"old-merge-schemas,omitempty\"`\n\t// Enum values can generate conflicting typenames, so we've updated the\n\t// code for enum generation to avoid these conflicts, but it will result\n\t// in some enum types being renamed in existing code. Set OldEnumConflicts to true\n\t// to revert to old behavior. Please see:\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/549\n\tOldEnumConflicts bool `yaml:\"old-enum-conflicts,omitempty\"`\n\t// It was a mistake to generate a go type definition for every $ref in\n\t// the OpenAPI schema. New behavior uses type aliases where possible, but\n\t// this can generate code which breaks existing builds. Set OldAliasing to true\n\t// for old behavior.\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/549\n\tOldAliasing bool `yaml:\"old-aliasing,omitempty\"`\n\t// When an object contains no members, and only an additionalProperties specification,\n\t// it is flattened to a map\n\tDisableFlattenAdditionalProperties bool `yaml:\"disable-flatten-additional-properties,omitempty\"`\n\t// When an object property is both required and readOnly the go model is generated\n\t// as a pointer. Set DisableRequiredReadOnlyAsPointer to true to mark them as non pointer.\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/604\n\tDisableRequiredReadOnlyAsPointer bool `yaml:\"disable-required-readonly-as-pointer,omitempty\"`\n\t// When set to true, always prefix enum values with their type name instead of only\n\t// when typenames would be conflicting.\n\tAlwaysPrefixEnumValues bool `yaml:\"always-prefix-enum-values,omitempty\"`\n\t// Our generated code for Chi has historically inverted the order in which Chi middleware is\n\t// applied such that the last invoked middleware ends up executing first in the Chi chain\n\t// This resolves the behavior such that middlewares are chained in the order they are invoked.\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/786\n\tApplyChiMiddlewareFirstToLast bool `yaml:\"apply-chi-middleware-first-to-last,omitempty\"`\n\t// Our generated code for gorilla/mux has historically inverted the order in which gorilla/mux middleware is\n\t// applied such that the last invoked middleware ends up executing first in the middlewares chain\n\t// This resolves the behavior such that middlewares are chained in the order they are invoked.\n\t// Please see https://github.com/oapi-codegen/oapi-codegen/issues/841\n\tApplyGorillaMiddlewareFirstToLast bool `yaml:\"apply-gorilla-middleware-first-to-last,omitempty\"`\n\t// CircularReferenceLimit allows controlling the limit for circular reference checking.\n\t// In some OpenAPI specifications, we have a higher number of circular\n\t// references than is allowed out-of-the-box, but can be tuned to allow\n\t// traversing them.\n\t// Deprecated: In kin-openapi v0.126.0 (https://github.com/getkin/kin-openapi/tree/v0.126.0?tab=readme-ov-file#v01260) the Circular Reference Counter functionality was removed, instead resolving all references with backtracking, to avoid needing to provide a limit to reference counts.\n\tCircularReferenceLimit int `yaml:\"circular-reference-limit\"`\n\t// AllowUnexportedStructFieldNames makes it possible to output structs that have fields that are unexported.\n\t//\n\t// This is expected to be used in conjunction with `x-go-name` and `x-oapi-codegen-only-honour-go-name` to override the resulting output field name, and `x-oapi-codegen-extra-tags` to not produce JSON tags for `encoding/json`, such as:\n\t//\n\t//  ```yaml\n\t//   id:\n\t//     type: string\n\t//     x-go-name: accountIdentifier\n\t//     x-oapi-codegen-extra-tags:\n\t//       json: \"-\"\n\t//     x-oapi-codegen-only-honour-go-name: true\n\t//   ```\n\t//\n\t// NOTE that this can be confusing to users of your OpenAPI specification, who may see a field present and therefore be expecting to see/use it in the request/response, without understanding the nuance of how `oapi-codegen` generates the code.\n\tAllowUnexportedStructFieldNames bool `yaml:\"allow-unexported-struct-field-names\"`\n\n\t// PreserveOriginalOperationIdCasingInEmbeddedSpec ensures that the `operationId` from the source spec is kept intact in case when embedding it into the Embedded Spec output.\n\t// When `oapi-codegen` parses the original OpenAPI specification, it will apply the configured `output-options.name-normalizer` to each operation's `operationId` before that is used to generate code from.\n\t// However, this is also applied to the copy of the `operationId`s in the `embedded-spec` generation, which means that the embedded OpenAPI specification is then out-of-sync with the input specificiation.\n\t// To ensure that the `operationId` in the embedded spec is preserved as-is from the input specification, set this.\n\t// NOTE that this will not impact generated code.\n\t// NOTE that if you're using `include-operation-ids` or `exclude-operation-ids` you may want to ensure that the `operationId`s used are correct.\n\tPreserveOriginalOperationIdCasingInEmbeddedSpec bool `yaml:\"preserve-original-operation-id-casing-in-embedded-spec\"`\n}\n```\nCompatibilityOptions specifies backward compatibility settings for the code generator.\n\n```go\nfunc (co CompatibilityOptions) Validate() map[string]string\n```\n\n```go\ntype Configuration struct {\n\t// PackageName to generate the code under\n\tPackageName string `yaml:\"package\"`\n\t// Generate specifies which supported output formats to generate\n\tGenerate GenerateOptions `yaml:\"generate,omitempty\"`\n\t// CompatibilityOptions specifies backward compatibility settings for the code generator\n\tCompatibility CompatibilityOptions `yaml:\"compatibility,omitempty\"`\n\t// OutputOptions are used to modify the output code in some way.\n\tOutputOptions OutputOptions `yaml:\"output-options,omitempty\"`\n\t// ImportMapping specifies the golang package path for each external reference\n\tImportMapping map[string]string `yaml:\"import-mapping,omitempty\"`\n\t// AdditionalImports defines any additional Go imports to add to the generated code\n\tAdditionalImports []AdditionalImport `yaml:\"additional-imports,omitempty\"`\n\t// NoVCSVersionOverride allows overriding the version of the application for cases where no Version Control System (VCS) is available when building, for instance when using a Nix derivation.\n\t// See documentation for how to use it in examples/no-vcs-version-override/README.md\n\tNoVCSVersionOverride *string `yaml:\"-\"`\n}\n```\nConfiguration defines code generation customizations\n\n```go\nfunc (o Configuration) UpdateDefaults() Configuration\n```\nUpdateDefaults sets reasonable default values for unset fields in Configuration\n\n```go\nfunc (o Configuration) Validate() error\n```\nValidate checks whether Configuration represent a valid configuration\n\n```go\ntype Constants struct {\n\t// SecuritySchemeProviderNames holds all provider names for security schemes.\n\tSecuritySchemeProviderNames []string\n\t// EnumDefinitions holds type and value information for all enums\n\tEnumDefinitions []EnumDefinition\n}\n```\n\n```go\ntype Discriminator struct {\n\t// maps discriminator value to go type\n\tMapping map[string]string\n\n\t// JSON property name that holds the discriminator\n\tProperty string\n}\n```\n\n```go\nfunc (d *Discriminator) JSONTag() string\n```\n\n```go\nfunc (d *Discriminator) PropertyName() string\n```\n\n```go\ntype EnumDefinition struct {\n\t// Schema is the scheme of a type which has a list of enum values, eg, the\n\t// \"container\" of the enum.\n\tSchema Schema\n\t// TypeName is the name of the enum's type, usually aliased from something.\n\tTypeName string\n\t// ValueWrapper wraps the value. It's used to conditionally apply quotes\n\t// around strings.\n\tValueWrapper string\n\t// PrefixTypeName determines if the enum value is prefixed with its TypeName.\n\t// This is set to true when this enum conflicts with another in terms of\n\t// TypeNames or when explicitly requested via the\n\t// `compatibility.always-prefix-enum-values` option.\n\tPrefixTypeName bool\n}\n```\nEnumDefinition holds type information for enum\n\n```go\nfunc (e *EnumDefinition) GetValues() map[string]string\n```\nGetValues generates enum names in a way to minimize global conflicts\n\n```go\ntype FieldDescriptor struct {\n\tRequired bool   // Is the schema required? If not, we'll pass by pointer\n\tGoType   string // The Go type needed to represent the json type.\n\tGoName   string // The Go compatible type name for the type\n\tJsonName string // The json type name for the type\n\tIsRef    bool   // Is this schema a reference to predefined object?\n}\n```\n\n```go\ntype GenerateOptions struct {\n\t// IrisServer specifies whether to generate iris server boilerplate\n\tIrisServer bool `yaml:\"iris-server,omitempty\"`\n\t// ChiServer specifies whether to generate chi server boilerplate\n\tChiServer bool `yaml:\"chi-server,omitempty\"`\n\t// FiberServer specifies whether to generate fiber server boilerplate\n\tFiberServer bool `yaml:\"fiber-server,omitempty\"`\n\t// EchoServer specifies whether to generate echo server boilerplate\n\tEchoServer bool `yaml:\"echo-server,omitempty\"`\n\t// GinServer specifies whether to generate gin server boilerplate\n\tGinServer bool `yaml:\"gin-server,omitempty\"`\n\t// GorillaServer specifies whether to generate Gorilla server boilerplate\n\tGorillaServer bool `yaml:\"gorilla-server,omitempty\"`\n\t// StdHTTPServer specifies whether to generate stdlib http server boilerplate\n\tStdHTTPServer bool `yaml:\"std-http-server,omitempty\"`\n\t// Strict specifies whether to generate strict server wrapper\n\tStrict bool `yaml:\"strict-server,omitempty\"`\n\t// Client specifies whether to generate client boilerplate\n\tClient bool `yaml:\"client,omitempty\"`\n\t// Models specifies whether to generate type definitions\n\tModels bool `yaml:\"models,omitempty\"`\n\t// EmbeddedSpec indicates whether to embed the swagger spec in the generated code\n\tEmbeddedSpec bool `yaml:\"embedded-spec,omitempty\"`\n}\n```\nGenerateOptions specifies which supported output formats to generate.\n\n```go\nfunc (oo GenerateOptions) Validate() map[string]string\n```\n\n```go\ntype NameNormalizer func(string) string\n```\nNameNormalizer is a function that takes a type name, and returns that type name converted into a different format.\n\nThis may be an Operation ID i.e. \\`retrieveUserRequests\\` or a Schema name i.e. \\`BigBlockOfCheese\\`\n\nNOTE: this must return a string that can be used as a valid Go type name\n\n```go\ntype NameNormalizerFunction string\n```\n\n```go\nconst (\n\t// NameNormalizerFunctionUnset is the default case, where the `name-normalizer` option hasn't been set. This will use the `ToCamelCase` function.\n\t//\n\t// See the docs for `NameNormalizerFunctionToCamelCase` for more details.\n\tNameNormalizerFunctionUnset NameNormalizerFunction = \"\"\n\t// NameNormalizerFunctionToCamelCase will use the `ToCamelCase` function.\n\t//\n\t// For instance:\n\t//\n\t// - `getHttpPet`   =\u003e `GetHttpPet`\n\t// - `OneOf2things` =\u003e `OneOf2things`\n\tNameNormalizerFunctionToCamelCase NameNormalizerFunction = \"ToCamelCase\"\n\t// NameNormalizerFunctionToCamelCaseWithDigits will use the `NameNormalizerFunctionToCamelCaseWithDigits` function.\n\t//\n\t// For instance:\n\t//\n\t// - `getHttpPet`   =\u003e `GetHttpPet`\n\t// - `OneOf2things` =\u003e `OneOf2Things`\n\tNameNormalizerFunctionToCamelCaseWithDigits NameNormalizerFunction = \"ToCamelCaseWithDigits\"\n\t// NameNormalizerFunctionToCamelCaseWithInitialisms will use the `NameNormalizerFunctionToCamelCaseWithInitialisms` function.\n\t//\n\t// For instance:\n\t//\n\t// - `getHttpPet`   =\u003e `GetHTTPPet`\n\t// - `OneOf2things` =\u003e `OneOf2things`\n\tNameNormalizerFunctionToCamelCaseWithInitialisms NameNormalizerFunction = \"ToCamelCaseWithInitialisms\"\n)\n```\n\n```go\ntype NameNormalizerMap map[NameNormalizerFunction]NameNormalizer\n```\n\n```go\nfunc (m NameNormalizerMap) Options() []string\n```\n\n```go\ntype OperationDefinition struct {\n\t// OperationId is the `operationId` field from the OpenAPI Specification, after going through a `nameNormalizer`, and will be used to generate function names\n\tOperationId string\n\n\tPathParams          []ParameterDefinition // Parameters in the path, eg, /path/:param\n\tHeaderParams        []ParameterDefinition // Parameters in HTTP headers\n\tQueryParams         []ParameterDefinition // Parameters in the query, /path?param\n\tCookieParams        []ParameterDefinition // Parameters in cookies\n\tTypeDefinitions     []TypeDefinition      // These are all the types we need to define for this operation\n\tSecurityDefinitions []SecurityDefinition  // These are the security providers\n\tBodyRequired        bool\n\tBodies              []RequestBodyDefinition // The list of bodies for which to generate handlers.\n\tResponses           []ResponseDefinition    // The list of responses that can be accepted by handlers.\n\tSummary             string                  // Summary string from Swagger, used to generate a comment\n\tMethod              string                  // GET, POST, DELETE, etc.\n\tPath                string                  // The Swagger path for the operation, like /resource/{id}\n\tSpec                *openapi3.Operation\n}\n```\nOperationDefinition describes an Operation\n\n```go\nfunc OperationDefinitions(swagger *openapi3.T, initialismOverrides bool) ([]OperationDefinition, error)\n```\nOperationDefinitions returns all operations for a swagger definition.\n\n```go\nfunc (o *OperationDefinition) AllParams() []ParameterDefinition\n```\nAllParams returns all parameters\n\n```go\nfunc (o *OperationDefinition) GetResponseTypeDefinitions() ([]ResponseTypeDefinition, error)\n```\nGetResponseTypeDefinitions produces a list of type definitions for a given Operation for the response types which we know how to parse. These will be turned into fields on a response object for automatic deserialization of responses in the generated Client code. See \"client-with-responses.tmpl\".\n\n```go\nfunc (o *OperationDefinition) HasBody() bool\n```\nHasBody is called by the template engine to determine whether to generate body marshaling code on the client. This is true for all body types, whether we generate types for them.\n\n```go\nfunc (o OperationDefinition) HasMaskedRequestContentTypes() bool\n```\n\n```go\nfunc (o *OperationDefinition) Params() []ParameterDefinition\n```\nParams returns the list of all parameters except Path parameters. Path parameters are handled differently from the rest, since they're mandatory.\n\n```go\nfunc (o *OperationDefinition) RequiresParamObject() bool\n```\nIf we have parameters other than path parameters, they're bundled into an object. Returns true if we have any of those. This is used from the template engine.\n\n```go\nfunc (o *OperationDefinition) SummaryAsComment() string\n```\nSummaryAsComment returns the Operations summary as a multi line comment\n\n```go\ntype OutputOptions struct {\n\t// Whether to skip go imports on the generated code\n\tSkipFmt bool `yaml:\"skip-fmt,omitempty\"`\n\t// Whether to skip pruning unused components on the generated code\n\tSkipPrune bool `yaml:\"skip-prune,omitempty\"`\n\t// Only include operations that have one of these tags. Ignored when empty.\n\tIncludeTags []string `yaml:\"include-tags,omitempty\"`\n\t// Exclude operations that have one of these tags. Ignored when empty.\n\tExcludeTags []string `yaml:\"exclude-tags,omitempty\"`\n\t// Only include operations that have one of these operation-ids. Ignored when empty.\n\tIncludeOperationIDs []string `yaml:\"include-operation-ids,omitempty\"`\n\t// Exclude operations that have one of these operation-ids. Ignored when empty.\n\tExcludeOperationIDs []string `yaml:\"exclude-operation-ids,omitempty\"`\n\t// Override built-in templates from user-provided files\n\tUserTemplates map[string]string `yaml:\"user-templates,omitempty\"`\n\n\t// Exclude from generation schemas with given names. Ignored when empty.\n\tExcludeSchemas []string `yaml:\"exclude-schemas,omitempty\"`\n\t// The suffix used for responses types\n\tResponseTypeSuffix string `yaml:\"response-type-suffix,omitempty\"`\n\t// Override the default generated client type with the value\n\tClientTypeName string `yaml:\"client-type-name,omitempty\"`\n\t// Whether to use the initialism overrides\n\tInitialismOverrides bool `yaml:\"initialism-overrides,omitempty\"`\n\t// AdditionalInitialisms is a list of additional initialisms to use when generating names.\n\t// NOTE that this has no effect unless the `name-normalizer` is set to `ToCamelCaseWithInitialisms`\n\tAdditionalInitialisms []string `yaml:\"additional-initialisms,omitempty\"`\n\t// Whether to generate nullable type for nullable fields\n\tNullableType bool `yaml:\"nullable-type,omitempty\"`\n\n\t// DisableTypeAliasesForType allows defining which OpenAPI `type`s will explicitly not use type aliases\n\t// Currently supports:\n\t//   \"array\"\n\tDisableTypeAliasesForType []string `yaml:\"disable-type-aliases-for-type\"`\n\n\t// NameNormalizer is the method used to normalize Go names and types, for instance converting the text `MyApi` to `MyAPI`. Corresponds with the constants defined for `codegen.NameNormalizerFunction`\n\tNameNormalizer string `yaml:\"name-normalizer,omitempty\"`\n\n\t// Overlay defines configuration for the OpenAPI Overlay (https://github.com/OAI/Overlay-Specification) to manipulate the OpenAPI specification before generation. This allows modifying the specification without needing to apply changes directly to it, making it easier to keep it up-to-date.\n\tOverlay OutputOptionsOverlay `yaml:\"overlay\"`\n\n\t// EnableYamlTags adds YAML tags to generated structs, in addition to default JSON ones\n\tEnableYamlTags bool `yaml:\"yaml-tags,omitempty\"`\n\n\t// ClientResponseBytesFunction decides whether to enable the generation of a `Bytes()` method on response objects for `ClientWithResponses`\n\tClientResponseBytesFunction bool `yaml:\"client-response-bytes-function,omitempty\"`\n}\n```\nOutputOptions are used to modify the output code in some way.\n\n```go\nfunc (oo OutputOptions) Validate() map[string]string\n```\n\n```go\ntype OutputOptionsOverlay struct {\n\tPath string `yaml:\"path\"`\n\n\t// Strict defines whether the Overlay should be applied in a strict way, highlighting any actions that will not take any effect. This can, however, lead to more work when testing new actions in an Overlay, so can be turned off with this setting.\n\t// Defaults to true.\n\tStrict *bool `yaml:\"strict,omitempty\"`\n}\n```\n\n```go\ntype ParameterDefinition struct {\n\tParamName string // The original json parameter name, eg param_name\n\tIn        string // Where the parameter is defined - path, header, cookie, query\n\tRequired  bool   // Is this a required parameter?\n\tSpec      *openapi3.Parameter\n\tSchema    Schema\n}\n```\n\n```go\nfunc CombineOperationParameters(globalParams []ParameterDefinition, localParams []ParameterDefinition) ([]ParameterDefinition, error)\n```\nCombineOperationParameters combines the Parameters defined at a global level (Parameters defined for all methods on a given path) with the Parameters defined at a local level (Parameters defined for a specific path), preferring the locally defined parameter over the global one\n\n```go\nfunc DescribeParameters(params openapi3.Parameters, path []string) ([]ParameterDefinition, error)\n```\nDescribeParameters walks the given parameters dictionary, and generates the above descriptors into a flat list. This makes it a lot easier to traverse the data in the template engine.\n\n```go\nfunc FilterParameterDefinitionByType(params []ParameterDefinition, in string) []ParameterDefinition\n```\nFilterParameterDefinitionByType returns the subset of the specified parameters which are of the specified type.\n\n```go\nfunc SortParamsByPath(path string, in []ParameterDefinition) ([]ParameterDefinition, error)\n```\nSortParamsByPath reorders the given parameter definitions to match those in the path URI.\n\n```go\nfunc (pd *ParameterDefinition) Explode() bool\n```\n\n```go\nfunc (pd ParameterDefinition) GoName() string\n```\n\n```go\nfunc (pd ParameterDefinition) GoVariableName() string\n```\n\n```go\nfunc (pd ParameterDefinition) IndirectOptional() bool\n```\n\n```go\nfunc (pd *ParameterDefinition) IsJson() bool\n```\n\n```go\nfunc (pd *ParameterDefinition) IsPassThrough() bool\n```\n\n```go\nfunc (pd *ParameterDefinition) IsStyled() bool\n```\n\n```go\nfunc (pd *ParameterDefinition) JsonTag() string\n```\nJsonTag generates the JSON annotation to map GoType to json type name. If Parameter Foo is marshaled to json as \"foo\", this will create the annotation 'json:\"foo\"'\n\n```go\nfunc (pd *ParameterDefinition) Style() string\n```\n\n```go\nfunc (pd ParameterDefinition) TypeDef() string\n```\nTypeDef is here as an adapter after a large refactoring so that I don't have to update all the templates. It returns the type definition for a parameter, without the leading '\\*' for optional ones.\n\n```go\ntype ParameterDefinitions []ParameterDefinition\n```\n\n```go\nfunc (p ParameterDefinitions) FindByName(name string) *ParameterDefinition\n```\n\n```go\ntype Property struct {\n\tDescription   string\n\tJsonFieldName string\n\tSchema        Schema\n\tRequired      bool\n\tNullable      bool\n\tReadOnly      bool\n\tWriteOnly     bool\n\tNeedsFormTag  bool\n\tExtensions    map[string]interface{}\n\tDeprecated    bool\n}\n```\n\n```go\nfunc (p Property) GoFieldName() string\n```\n\n```go\nfunc (p Property) GoTypeDef() string\n```\n\n```go\ntype RefWrapper struct {\n\tRef       string\n\tHasValue  bool\n\tSourceRef interface{}\n}\n```\n\n```go\ntype RequestBodyDefinition struct {\n\t// Is this body required, or optional?\n\tRequired bool\n\n\t// This is the schema describing this body\n\tSchema Schema\n\n\t// When we generate type names, we need a Tag for it, such as JSON, in\n\t// which case we will produce \"JSONBody\".\n\tNameTag string\n\n\t// This is the content type corresponding to the body, eg, application/json\n\tContentType string\n\n\t// Whether this is the default body type. For an operation named OpFoo, we\n\t// will not add suffixes like OpFooJSONBody for this one.\n\tDefault bool\n\n\t// Contains encoding options for formdata\n\tEncoding map[string]RequestBodyEncoding\n}\n```\nRequestBodyDefinition describes a request body\n\n```go\nfunc (r RequestBodyDefinition) CustomType() bool\n```\nCustomType returns whether the body is a custom inline type, or pre-defined. This is poorly named, but it's here for compatibility reasons post-refactoring TODO: clean up the templates code, it can be simpler.\n\n```go\nfunc (r RequestBodyDefinition) IsFixedContentType() bool\n```\nIsFixedContentType returns true if content type has fixed content type, i.e. contains no \"\\*\" symbol\n\n```go\nfunc (r RequestBodyDefinition) IsJSON() bool\n```\nIsJSON returns whether this is a JSON media type, for instance: - application/json - application/vnd.api+json - application/\\*+json\n\n```go\nfunc (r RequestBodyDefinition) IsSupported() bool\n```\nIsSupported returns true if we support this content type for server. Otherwise io.Reader will be generated\n\n```go\nfunc (r RequestBodyDefinition) IsSupportedByClient() bool\n```\nIsSupportedByClient returns true if we support this content type for client. Otherwise only generic method will ge generated\n\n```go\nfunc (r RequestBodyDefinition) Suffix() string\n```\nWhen we're generating multiple functions which relate to request bodies, this generates the suffix. Such as Operation DoFoo would be suffixed with DoFooWithXMLBody.\n\n```go\nfunc (r RequestBodyDefinition) TypeDef(opID string) *TypeDefinition\n```\nTypeDef returns the Go type definition for a request body\n\n```go\ntype RequestBodyEncoding struct {\n\tContentType string\n\tStyle       string\n\tExplode     *bool\n}\n```\n\n```go\ntype ResponseContentDefinition struct {\n\t// This is the schema describing this content\n\tSchema Schema\n\n\t// This is the content type corresponding to the body, eg, application/json\n\tContentType string\n\n\t// When we generate type names, we need a Tag for it, such as JSON, in\n\t// which case we will produce \"Response200JSONContent\".\n\tNameTag string\n}\n```\n\n```go\nfunc (r ResponseContentDefinition) HasFixedContentType() bool\n```\nHasFixedContentType returns true if content type has fixed content type, i.e. contains no \"\\*\" symbol\n\n```go\nfunc (r ResponseContentDefinition) IsJSON() bool\n```\nIsJSON returns whether this is a JSON media type, for instance: - application/json - application/vnd.api+json - application/\\*+json\n\n```go\nfunc (r ResponseContentDefinition) IsSupported() bool\n```\n\n```go\nfunc (r ResponseContentDefinition) NameTagOrContentType() string\n```\n\n```go\nfunc (r ResponseContentDefinition) TypeDef(opID string, statusCode int) *TypeDefinition\n```\nTypeDef returns the Go type definition for a request body\n\n```go\ntype ResponseDefinition struct {\n\tStatusCode  string\n\tDescription string\n\tContents    []ResponseContentDefinition\n\tHeaders     []ResponseHeaderDefinition\n\tRef         string\n}\n```\n\n```go\nfunc GenerateResponseDefinitions(operationID string, responses map[string]*openapi3.ResponseRef) ([]ResponseDefinition, error)\n```\n\n```go\nfunc (r ResponseDefinition) GoName() string\n```\n\n```go\nfunc (r ResponseDefinition) HasFixedStatusCode() bool\n```\n\n```go\nfunc (r ResponseDefinition) IsExternalRef() bool\n```\n\n```go\nfunc (r ResponseDefinition) IsRef() bool\n```\n\n```go\ntype ResponseHeaderDefinition struct {\n\tName   string\n\tGoName string\n\tSchema Schema\n}\n```\n\n```go\ntype ResponseTypeDefinition struct {\n\tTypeDefinition\n\t// The content type name where this is used, eg, application/json\n\tContentTypeName string\n\n\t// The type name of a response model.\n\tResponseName string\n\n\tAdditionalTypeDefinitions []TypeDefinition\n}\n```\nResponseTypeDefinition is an extension of TypeDefinition, specifically for response unmarshaling in ClientWithResponses.\n\n```go\ntype Schema struct {\n\tGoType  string // The Go type needed to represent the schema\n\tRefType string // If the type has a type name, this is set\n\n\tArrayType *Schema // The schema of array element\n\n\tEnumValues map[string]string // Enum values\n\n\tProperties               []Property       // For an object, the fields with names\n\tHasAdditionalProperties  bool             // Whether we support additional properties\n\tAdditionalPropertiesType *Schema          // And if we do, their type\n\tAdditionalTypes          []TypeDefinition // We may need to generate auxiliary helper types, stored here\n\n\tSkipOptionalPointer bool // Some types don't need a * in front when they're optional\n\n\tDescription string // The description of the element\n\n\tUnionElements []UnionElement // Possible elements of oneOf/anyOf union\n\tDiscriminator *Discriminator // Describes which value is stored in a union\n\n\t// If this is set, the schema will declare a type via alias, eg,\n\t// `type Foo = bool`. If this is not set, we will define this type via\n\t// type definition `type Foo bool`\n\t//\n\t// Can be overriden by the OutputOptions#DisableTypeAliasesForType field\n\tDefineViaAlias bool\n\n\t// The original OpenAPIv3 Schema.\n\tOAPISchema *openapi3.Schema\n}\n```\nSchema describes an OpenAPI schema, with lots of helper fields to use in the templating engine.\n\n```go\nfunc GenerateGoSchema(sref *openapi3.SchemaRef, path []string) (Schema, error)\n```\n\n```go\nfunc MergeSchemas(allOf []*openapi3.SchemaRef, path []string) (Schema, error)\n```\nMergeSchemas merges all the fields in the schemas supplied into one giant schema. The idea is that we merge all fields together into one schema.\n\n```go\nfunc (s *Schema) AddProperty(p Property) error\n```\nAddProperty adds a new property to the current Schema, and returns an error if it collides. Two identical fields will not collide, but two properties by the same name, but different definition, will collide. It's safe to merge the fields of two schemas with overlapping properties if those properties are identical.\n\n```go\nfunc (s Schema) GetAdditionalTypeDefs() []TypeDefinition\n```\n\n```go\nfunc (s Schema) IsExternalRef() bool\n```\n\n```go\nfunc (s Schema) IsRef() bool\n```\n\n```go\nfunc (s Schema) TypeDecl() string\n```\n\n```go\ntype SchemaDescriptor struct {\n\tFields                   []FieldDescriptor\n\tHasAdditionalProperties  bool\n\tAdditionalPropertiesType string\n}\n```\nSchemaDescriptor describes a Schema, a type definition.\n\n```go\ntype SecurityDefinition struct {\n\tProviderName string\n\tScopes       []string\n}\n```\n\n```go\nfunc DescribeSecurityDefinition(securityRequirements openapi3.SecurityRequirements) []SecurityDefinition\n```\n\n```go\ntype TypeDefinition struct {\n\t// The name of the type, eg, type \u003c...\u003e Person\n\tTypeName string\n\n\t// The name of the corresponding JSON description, as it will sometimes\n\t// differ due to invalid characters.\n\tJsonName string\n\n\t// This is the Schema wrapper is used to populate the type description\n\tSchema Schema\n}\n```\nTypeDefinition describes a Go type definition in generated code.\n\nLet's use this example schema: components:\n\n\tschemas:\n\t  Person:\n\t    type: object\n\t    properties:\n\t    name:\n\t      type: string\n\n```go\nfunc GenerateParamsTypes(op OperationDefinition) []TypeDefinition\n```\nGenerateParamsTypes defines the schema for a parameters definition object which encapsulates all the query, header and cookie parameters for an operation.\n\n```go\nfunc GenerateTypeDefsForOperation(op OperationDefinition) []TypeDefinition\n```\n\n```go\nfunc GenerateTypesForParameters(t *template.Template, params map[string]*openapi3.ParameterRef) ([]TypeDefinition, error)\n```\nGenerateTypesForParameters generates type definitions for any custom types defined in the components/parameters section of the Swagger spec.\n\n```go\nfunc GenerateTypesForRequestBodies(t *template.Template, bodies map[string]*openapi3.RequestBodyRef) ([]TypeDefinition, error)\n```\nGenerateTypesForRequestBodies generates type definitions for any custom types defined in the components/requestBodies section of the Swagger spec.\n\n```go\nfunc GenerateTypesForResponses(t *template.Template, responses openapi3.ResponseBodies) ([]TypeDefinition, error)\n```\nGenerateTypesForResponses generates type definitions for any custom types defined in the components/responses section of the Swagger spec.\n\n```go\nfunc GenerateTypesForSchemas(t *template.Template, schemas map[string]*openapi3.SchemaRef, excludeSchemas []string) ([]TypeDefinition, error)\n```\nGenerateTypesForSchemas generates type definitions for any custom types defined in the components/schemas section of the Swagger spec.\n\n```go\nfunc (t *TypeDefinition) IsAlias() bool\n```\n\n```go\ntype UnionElement string\n```\nUnionElement describe union element, based on prefix externalRef\\\\d+ and real ref name from external schema.\n\n```go\nfunc (u UnionElement) Method() string\n```\nMethod generate union method name for template functions \\`As/From/Merge\\`.\n\n```go\nfunc (u UnionElement) String() string\n```\nString returns externalRef\\\\d+ and real ref name from external schema, like externalRef0.SomeType.\n\n","path":"github.com/Juno-T/oapi-codegen/v2/pkg/codegen","name":"codegen","synopsis":"","isRedistributable":true}
