MCPcopy
hub / github.com/dosco/graphjin / exposeAs

Function exposeAs

core/openapi/classifier.go:398–403  ·  view source on GitHub ↗

exposeAs returns the GraphQL field name to surface this operation under. Precedence: per-operation override > default convention. The default is " _ " to avoid collisions when multiple specs declare similarly-named operations.

(specKey, operationID string, override OperationOverride)

Source from the content-addressed store, hash-verified

396// The default is "<spec_key>_<operationId_snake>" to avoid collisions
397// when multiple specs declare similarly-named operations.
398func exposeAs(specKey, operationID string, override OperationOverride) string {
399 if override.ExposeAs != "" {
400 return override.ExposeAs
401 }
402 return specKey + "_" + toSnakeCase(operationID)
403}
404
405// toSnakeCase converts camelCase / PascalCase identifiers to snake_case.
406// It's intentionally conservative: only inserts an underscore at a

Callers 1

classifyOneFunction · 0.85

Calls 1

toSnakeCaseFunction · 0.85

Tested by

no test coverage detected