Skip to content

[F] getResultModelWithProperty

function getResultModelWithProperty(
program,
operation,
predicate): [Model, ModelProperty] | undefined;

Return the first response model that has any properties matching the given model property predicate

ParameterTypeDescription
programProgramThe program being processed
operationOperationThe operation to retrieve matching response from
predicate(prop) => booleanThe predicate function to apply to each model property of the responses

[Model, ModelProperty] | undefined

The model and matching model property, or nothing if no matching models are found