MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / serverURLEnumValues

Function serverURLEnumValues

pkg/codegen/server_urls.go:205–212  ·  view source on GitHub ↗

serverURLEnumValues returns the EnumValues map handed to GenerateEnums for variable `v`: key is the deduplicated identifier suffix from serverURLEnumKeys, value is the original enum string.

(v *openapi3.ServerVariable)

Source from the content-addressed store, hash-verified

203// for variable `v`: key is the deduplicated identifier suffix from
204// serverURLEnumKeys, value is the original enum string.
205func serverURLEnumValues(v *openapi3.ServerVariable) map[string]string {
206 keys := serverURLEnumKeys(v)
207 out := make(map[string]string, len(keys))
208 for i, k := range keys {
209 out[k] = v.Enum[i]
210 }
211 return out
212}
213
214// ServerURLDefaultPointer carries the pre-computed identifier names
215// needed to emit a typed default-pointer constant for an enum-typed

Callers 1

Calls 1

serverURLEnumKeysFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…