[W-14846319] Imported Schema or XML Example does not show in Documentation Panel #63
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.
Here's a step-by-step description:
It first retrieves the
@id
property from the first element ofreferenceIdData
array and assigns it to referenceId.It calls the
_computeReferences
method withthis.amf
as an argument to get the root references and assigns the result torootReferences
.It maps over each item in root
references
, and for each item, it computes references twice in a nested manner. It then gets the second element fromexternalFragments
and computes its encodes. The result of this map operation is an array of encoded external fragments, which is assigned toencodesOfExternalFragments
.It finds an element in
encodesOfExternalFragments
where the@id
property matches referenceId and assigns it toexmapleExternalFragmentByReferenceId
.It gets the raw key by calling the
_getAmfKey
method withthis.ns.aml.vocabularies.document.raw
as an argument and assigns it torawKey
.Finally, it calls the
_getValue
method withexmapleExternalFragmentByReferenceId
and rawKey as arguments and assigns the result toraw
.Testing on API-Console
Screen.Recording.2024-01-30.at.14.10.47.mov