Closed weyert closed 7 months ago
@P0lip @marbemac Sorry, for bugging you. I would love to contribute this functionality. I already got the appropriate approvals from my work to contribute. Would it be possible to discuss my proposal?
@falsaffa @mnaumanali94 thoughts? ^
@paulatulis @P0lip @falsaffa @mnaumanali94 Any feedback? Do you dislike my approach? Shall I keep my own fork instead of merge it upstream?
@P0lip Just checkin in if there is still interest
This would be a great addition. We have several custom keywords that we would like to have displayed on the docs.
:tada: This issue has been resolved in version 4.16.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I would like to purpose the ability to render or visualise vendor extensions within the JSON Schema Viewer.
Context
I have vendor extensions which I want to visualise or show up in the schema definition
Current Behavior
No ability to display vendor extensions
Expected Behavior
I want to have function similar to
renderRowAddon
to allow render vendor extensionsPossible Solution(s)
I have been working on implementing a function named
renderExtensionAddon
with the signature:As you can see the function will return a React node back which can be rendered by the component, and the responsibility for returning the component is off loaded to the consumer of
JsonSchemaViewer
.This would be used by the
TopLevelSchemaRow
andSchemaRow
components, in a way, such as:Note: Currently, there is no way to easily extract vendor extensions from a schema node, only way is to grab it from
fragment
-property and then get all properties prefixed withx-
.In the
SchemaRow
-component a similar code can be added as above:A potential implementation of the
renderExtensionAddon
could be:I am happy to raise a pull request for these changes. I have been using it in a fork of the component and so far it works as expected.