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

Method Method

pkg/codegen/schema.go:314–320  ·  view source on GitHub ↗

Method generate union method name for template functions `As/From/Merge`.

()

Source from the content-addressed store, hash-verified

312
313// Method generate union method name for template functions `As/From/Merge`.
314func (u UnionElement) Method() string {
315 var method strings.Builder
316 for part := range strings.SplitSeq(string(u), `.`) {
317 method.WriteString(UppercaseFirstCharacter(part))
318 }
319 return method.String()
320}
321
322func PropertiesEqual(a, b Property) bool {
323 return a.JsonFieldName == b.JsonFieldName && a.Schema.TypeDecl() == b.Schema.TypeDecl() && a.Required == b.Required

Callers

nothing calls this directly

Calls 2

UppercaseFirstCharacterFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected