MCPcopy Index your code
hub / github.com/pmxt-dev/pmxt / collectOperationSamples

Function collectOperationSamples

core/test/unit/openapi-code-samples.test.js:66–70  ·  view source on GitHub ↗
(spec, operationId, language)

Source from the content-addressed store, hash-verified

64}
65
66function collectOperationSamples(spec, operationId, language) {
67 return (getOperation(spec, operationId)['x-codeSamples'] || [])
68 .filter((sample) => sample.lang === language)
69 .map((sample) => sample.source);
70}
71
72function collectOperationSampleLabels(spec, operationId) {
73 return (getOperation(spec, operationId)['x-codeSamples'] || [])

Callers 1

Calls 1

getOperationFunction · 0.70

Tested by

no test coverage detected