feat: compare OpenAPI response examples - #2244
Conversation
Signed-off-by: ME-Massine <massine268@gmail.com>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
|
I think it would be ideal if the 'enum' were never null. That would simplify passing arguments to constructors by initializing it directly to the default behavior. What do you think? |
|
Thanks for jumping on this but the request for enhancement has to be carefully analysed first. As described here: #2243 (comment) I'm not sure this is the right approach and I'm opening the discussion on other (IMHO better) alternatives. Please join us on the issue threads if you have some opinion on this! |
@SebastienDegodez Good point. null currently means “disabled” to preserve existing behavior. If we keep this approach, I can replace it with an explicit DISABLED default. |
@lbroudoux Thanks for the context. I see the distinction now. I’ll pause changes here and continue the discussion in #2243 first. |
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 30 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
What does this PR do?
Adds optional JSON response-example comparison to the
/testsAPI forOPEN_API_SCHEMAtests.Two comparison modes are supported:
STRICT: requires the same JSON structure and values while ignoring array ordering.LENIENT: requires all expected values while allowing additional object fields and array elements.The comparison runs after the existing status-code, content-type, and schema validation. When the option is omitted, existing behavior remains unchanged.
The OpenAPI specification and frontend TypeScript model are also updated.
Closes #2243
How was this tested?