// ServerObjectDefinition defines the definition of an OpenAPI Server object (https://spec.openapis.org/oas/v3.0.3#server-object) as it is provided to code generation in `oapi-codegen`
typeServerObjectDefinitionstruct {
// GoName is the name of the variable for this Server URL
GoNamestring
// OAPISchema is the underlying OpenAPI representation of the Server
OAPISchema*openapi3.Server
}
// UsedVariables returns the subset of OAPISchema.Variables whose
// `{name}` placeholder actually appears in OAPISchema.URL. Variables
// declared but unused are skipped — they would otherwise produce a
// type, constant, function parameter, and a no-op `strings.ReplaceAll`
// (https://github.com/oapi-codegen/oapi-codegen/issues/2004). Used by
// both server-urls.tmpl and BuildServerURLTypeDefinitions so that
// emitted types and the generated function signature stay in sync.
returnnil, fmt.Errorf("failed to create a unique name for the Server URL (%#v) with description (%#v) after %d iterations", server.URL, server.Description, serverURLSuffixIterations)