package
1.11.5
Repository: https://github.com/debugger84/oapi-codegen.git
Documentation: pkg.go.dev

# Functions

This function walks the given parameters dictionary, and generates the above descriptors into a flat list.
No description provided by the author
This function breaks apart a path, and looks at each element.
This function 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.
This function turns the Swagger body definitions into a list of our body definitions which will be used for code generation.
GenerateChiServer This function generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
Uses the template engine to generate the function which registers our wrappers as Echo path handlers.
This generates a client which extends the basic client which does response unmarshaling.
Generates operation ids, context keys, paths, etc.
GenerateEchoServer This function generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
No description provided by the author
GenerateGinServer This function generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
GenerateGinServer This function generates all the go code for the ServerInterface as well as all the wrapper functions around our handlers.
No description provided by the author
Generate our import statements and package definition.
This generates a gzipped, base64 encoded JSON representation of the swagger definition, which we embed inside the generated code.
GenerateModulusActions This function generates all the go code for the Modulus framework.
GenerateParamsTypes defines the schema for a parameters definition object which encapsulates all the query, header and cookie parameters for an operation.
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
Given a list of schema descriptors, produce corresponding field names with JSON annotations.
This function generates an object that is the union of the objects in the input array.
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.
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 indentifier.
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.
Same as above, except lower case.
MergeSchemas merges all the fields in the schemas supplied into one giant schema.
OperationDefinitions returns all operations for a swagger definition.
Returns the argument names, in order, in a given URI string, so for /path/{param1}/{.param2*}/{?param3}, it would return param1, param2, param3.
This 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.
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.
This returns Content dictionary keys in sorted order.
This function returns Operation dictionary keys in sorted order.
This returns sorted keys for a ParameterRef dict.
This function is the same as above, except it sorts the keys for a Paths dictionary.
No description provided by the author
This function returns Responses dictionary keys in sorted order.
This function returns the keys of the given SchemaRef dictionary in sorted order, since Golang scrambles dictionary keys.
No description provided by the author
This returns string map keys in sorted order.
Reorders the given parameter definitions to match those in the path URI.
This function checks whether the specified string is present in an array of strings.
StringToGoComment renders a possible multi-line string as a valid Go-Comment.
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 a Echo compatible path URI.
This function converts a swagger style path URI with parameters to a Gin compatible path URI.
This function converts a swagger style path URI with parameters to a Gorilla compatible path URI.
This function will convert query-arg style strings to CamelCase.
Uppercase the first character in a string.

# Variables

This function map 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.
This structure 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
This describes a request body.
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