# Functions

No description provided by the author
DescribeParameters walks the given parameters dictionary, and generates the above descriptors into a flat list.
No description provided by the author
EscapePathElements breaks apart a path, and looks at each element.
FilterParameterDefinitionByType returns the subset of the specified parameters which are of the specified type.
Generate uses the Go templating engine to generate all of our server wrappers from the descriptions we've built up above from the schema objects.
GenerateAdditionalPropertyBoilerplate generates all the glue code which provides the API for interacting with additional properties and JSON-ification.
GenerateBodyDefinitions turns the Swagger body definitions into a list of our body definitions which will be used for code generation.
GenerateChiServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
GenerateClient uses the template engine to generate the function which registers our wrappers as Echo path handlers.
GenerateClientWithResponses generates a client which extends the basic client which does response unmarshaling.
GenerateConstants generates operation ids, context keys, paths, etc.
GenerateEchoServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
No description provided by the author
GenerateFiberServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
GenerateGinServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
GenerateGorillaServer generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
No description provided by the author
GenerateImports generates our import statements and package definition.
GenerateInlinedSpec generates a gzipped, base64 encoded JSON representation of the swagger definition, which we embed inside the generated code.
GenerateParamsTypes defines the schema for a parameters definition object which encapsulates all the query, header and cookie parameters for an operation.
No description provided by the author
No description provided by the author
No description provided by the author
GenerateTemplates used to generate templates.
No description provided by the author
No description provided by the author
GenerateTypes passes a bunch of types to the template engine, and buffers its output into a string.
GenerateTypesForOperations generates code for all types produced within operations.
GenerateTypesForParameters generates type definitions for any custom types defined in the components/parameters section of the Swagger spec.
GenerateTypesForRequestBodies generates type definitions for any custom types defined in the components/requestBodies section of the Swagger spec.
GenerateTypesForResponses generates type definitions for any custom types defined in the components/responses section of the Swagger spec.
GenerateTypesForSchemas generates type definitions for any custom types defined in the components/schemas section of the Swagger spec.
No description provided by the author
No description provided by the author
GenFieldsFromProperties produce corresponding field names with JSON annotations, given a list of schema descriptors.
GenStructFromAllOf generates an object that is the union of the objects in the input array.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetUserTemplateText attempts to retrieve the template text from a passed in URL or file path when inputData is more than one line.
No description provided by the author
IsGoIdentity checks if the given string can be used as an identity in the generated code like a type name or constant name.
IsGoKeyword returns whether the given string is a go keyword.
IsGoTypeReference takes a $ref value and checks if it has link to go type.
IsPredeclaredGoIdentifier returns whether the given string is a predefined go identifier.
IsValidGoIdentity checks if the given string can be used as a name of variable, constant, or type.
IsWholeDocumentReference takes a $ref value and checks if it is whole document reference.
LoadTemplates loads all of our template files into a text/template.
LowercaseFirstCharacter Lowercases the first character in a string.
No description provided by the author
MergeSchemas merges all the fields in the schemas supplied into one giant schema.
OperationDefinitions returns all operations for a swagger definition.
No description provided by the author
No description provided by the author
OrderedParamsFromUri returns the argument names, in order, in a given URI string, so for /path/{param1}/{.param2*}/{?param3}, it would return param1, param2, param3.
No description provided by the author
PathToTypeName converts a path, like Object/field1/nestedField into a go type name.
No description provided by the author
RefPathToGoType takes a $ref value and converts it to a Go typename.
RefPathToObjName returns the name of referenced object without changes.
ReplacePathParamsWithStr replaces path parameters of the form {param} with %s.
SanitizeCode runs sanitizers across the generated Go code to ensure the generated code will be able to compile.
SanitizeEnumNames fixes illegal chars in the enum names and removes duplicates.
SanitizeGoIdentity deletes and replaces the illegal runes in the given string to use the string as a valid identity.
According to the spec, additionalProperties may be true, false, or a schema.
SchemaNameToTypeName converts a Schema name to a valid Go type name.
SortedContentKeys returns Content dictionary keys in sorted order.
No description provided by the author
SortedOperationsKeys returns Operation dictionary keys in sorted order.
SortedParameterKeys returns sorted keys for a ParameterRef dict.
SortedPathsKeys is the same as above, except it sorts the keys for a Paths dictionary.
No description provided by the author
SortedResponsesKeys returns Responses dictionary keys in sorted order.
SortedSchemaKeys returns the keys of the given SchemaRef dictionary in sorted order, since Golang scrambles dictionary keys.
No description provided by the author
SortedStringKeys returns string map keys in sorted order.
SortParamsByPath reorders the given parameter definitions to match those in the path URI.
StringInArray checks whether the specified string is present in an array of strings.
StringToGoComment renders a possible multi-line string as a valid Go-Comment.
StringWithTypeNameToGoComment renders a possible multi-line string as a valid Go-Comment, including the name of the type being referenced.
SwaggerUriToChiUri converts a swagger style path URI with parameters to a Chi compatible path URI.
SwaggerUriToEchoUri converts a OpenAPI style path URI with parameters to an Echo compatible path URI.
SwaggerUriToFiberUri converts a OpenAPI style path URI with parameters to a Fiber compatible path URI.
SwaggerUriToGinUri converts a swagger style path URI with parameters to a Gin compatible path URI.
SwaggerUriToGorillaUri converts a swagger style path URI with parameters to a Gorilla compatible path URI.
ToCamelCase will convert query-arg style strings to CamelCase.
No description provided by the author
TypeDefinitionsEquivalent checks for equality between two type definitions, but not every field is considered.
UppercaseFirstCharacter Uppercases the first character in a string.
Uppercase the first character in a identifier with pkg name.

# Variables

TemplateFunctions is passed to the template engine, and we can call each function here by keyName from the template code.

# Structs

No description provided by the author
CompatibilityOptions specifies backward compatibility settings for the code generator.
Configuration defines code generation customizations.
No description provided by the author
No description provided by the author
EnumDefinition holds type information for enum.
No description provided by the author
GenerateOptions specifies which supported output formats to generate.
OperationDefinition describes an Operation.
OutputOptions are used to modify the output code in some way.
No description provided by the author
No description provided by the author
No description provided by the author
RequestBodyDefinition describes a request body.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ResponseTypeDefinition is an extension of TypeDefinition, specifically for response unmarshaling in ClientWithResponses.
Schema describes an OpenAPI schema, with lots of helper fields to use in the templating engine.
SchemaDescriptor describes a Schema, a type definition.
No description provided by the author
TypeDefinition describes a Go type definition in generated code.

# Type aliases

No description provided by the author
UnionElement describe union element, based on prefix externalRef\d+ and real ref name from external schema.