MCPcopy Index your code
hub / github.com/massCodeIO/massCode / getParameterValue

Function getParameterValue

src/main/http/import/openapi.ts:176–186  ·  view source on GitHub ↗
(parameter: UnknownRecord)

Source from the content-addressed store, hash-verified

174}
175
176function getParameterValue(parameter: UnknownRecord): string {
177 if (parameter.example !== undefined)
178 return asString(parameter.example)
179 if (isRecord(parameter.schema)) {
180 if (parameter.schema.default !== undefined)
181 return asString(parameter.schema.default)
182 if (parameter.schema.example !== undefined)
183 return asString(parameter.schema.example)
184 }
185 return ''
186}
187
188function parseParameters(
189 rawParameters: unknown[],

Callers 1

parseParametersFunction · 0.85

Calls 2

asStringFunction · 0.70
isRecordFunction · 0.70

Tested by

no test coverage detected