Conversation
- Added '@api-components/api-navigation' version 4.3.21 to package.json and package-lock.json. - Updated existing references to '@api-components/api-navigation' to reflect the new version. - Refactored ApiTypeDocument to ensure correct mediaType handling and improve example rendering logic. - Enhanced tests to validate mediaType behavior and example section visibility.
- Introduced a new JSON file for the Product Order API minimal specification to support OAS 3.0.1. - Updated .gitignore to include the new demo/product-order-minimal.json file for tracking purposes. - Added tests for ProductOrder examples to ensure correct rendering and inheritance handling in the API documentation.
- Included the new product-order-minimal.json file in the API list to support OAS 3.0. - Ensured consistency in the format of existing entries.
- Introduced a new JSON file for the Product Order API minimal compact specification to support OAS 3.0.1. - Updated .gitignore to include the new demo/product-order-minimal-compact.json file for tracking purposes.
- Added 'product-order-minimal' entry to the API list template in index.js to enhance the demo with the new product order minimal specification.
NazaQuintero
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: Examples Not Displaying in Exchange
The Problem
The issue was in how the examples section was rendered and how
mediaTypewas calculated in theapi-type-documentcomponent.Before the Fix (Problematic Code)
Conditional rendering that removed the section from the DOM:
shouldRenderExampleswasfalse, the entire section was not created in the DOM.Complex
exampleMediaTypecalculation:undefinedin certain cases.mediaTypewasundefined, theapi-resource-example-documentcomponent couldn't render examples correctly.The Solution
After the Fix
The section is always rendered, but hidden with
?hidden:hiddenattribute when_renderMainExampleisfalse.Direct use of
this.mediaType:exampleMediaTypelogic.this.mediaType, simplifying the code and avoiding unexpectedundefinedvalues.Summary
shouldRenderExampleswasfalse, and the complexexampleMediaTypecalculation could result inundefined.?hiddento hide it) andthis.mediaTypeis used directly without additional calculations.mediaTypeis passed consistently.Code Changes
Before:
After:
Impact
This fix resolves the issue where examples defined under
requestBodieswith inherited properties viaallOfin OpenAPI 3.0.1 specifications were not displaying in Exchange.Nested api(Original error):

GRPC:

Verification: ProductOrder Examples Now Displaying Correctly
This screenshot demonstrates that the fix is working correctly. The
product-order-minimal.jsonspecification (which uses OpenAPI 3.0.1 withallOfinheritance) now properly displays all examples.What the Image Shows
Operation:
POST /productOrder- CreateProductOrderKey Evidence of the Fix:
Three examples are visible in the "Code examples" section:
simpleProductOrder(currently selected and displayed)productOrderWithDescriptionproductOrderWithPriorityExample content is properly rendered: The JSON for
simpleProductOrdershows a complete, valid example with:@type: "ProductOrder"description: "A simple product order"productOrderItemarray with nested product detailsInherited properties are recognized: The interface correctly shows:
Media type is correctly set: The request body shows
application/jsonas the media type, confirming thatmediaTypeis being passed correctly to theapi-resource-example-documentcomponent.Technical Details
This screenshot validates that:
?hidden)mediaTypeis correctly passed (application/json) without beingundefined(fix: simplified to usethis.mediaTypedirectly)requestBodieswithallOfinheritance are properly resolved and displayedProductOrder_FVOtype with inherited properties fromEntity_FVOandExtensible_FVOrenders correctlyBefore the fix: This same specification would not show any examples - the examples section would either be missing from the DOM entirely or the examples would be empty/undefined.
After the fix: All three examples are visible and functional, allowing users to see and test different request payload variations.