14
Views
6
Comments
[Mock Framework] Message Error : Definition not found for array
mock-framework
Reactive icon
Forge asset by MF Team
Application Type
Reactive

I created API for exercise purpose: Simple Get_Products passing the description and returning product record. 

When I try to configure I got following error: 

Definition not found for array


UserImage.jpg
Denis Orlandi de Souza

Hi Edgardo, could you share the OML?

UserImage.jpg
Edgardo Gallardo

Sure.

Done.

Simple Test in order to understand the process.

Expose of service: Get_Products_Detail

MOCK-API Test.oap
2025-09-23 16-33-02
Maria Costa
Staff

Hey Edgardo,

Thanks for trying out the Mock Framework! 😊

From what I see, you exposed the API, but I don’t see it being consumed in the OAP you shared. Are you consuming it somewhere? Additionally, could you explain the configuration process?

Don’t forget to set the IsProduction site property in MockFrameworkUtils to False (so the mocks are active).

I’m also sharing the OAP with the countries example and the Excel with the configuration for reference.

Please let us know if you have any further questions. Happy mocking!

CountryApp.oap
MockConfigurations_Country.xlsx
UserImage.jpg
Denis Orlandi de Souza

I'm still not sure what is the problem, but I'm consuming the rest service "Get_Products_Detail" on MOCKAPITest: 

Please, check the OAP

MOCK-API Test.oap
2025-09-23 16-33-02
Maria Costa
Staff

Hi Denis, 

In your OAP, you’re missing the OnBeforeRequest logic that redirects the request to the Mock Framework. 

Also, make sure the IsProduction site property is set to False. 

You can find a step-by-step guide under the Documentation tab, which explains how to set this up properly.
If you have any more doubts, don’t hesitate to reach out! 

UserImage.jpg
Edgardo Gallardo

I will implement and come back with comments.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.