elements icon indicating copy to clipboard operation
elements copied to clipboard

feat: add support for vendor extension renderers

Open weyert opened this issue 3 months ago • 7 comments

Adds support for defining vendor extension renderers in @stoplight/elements so vendor extensions throughout a OpenAPI specification can be visually renderer.

Elements Default PR Template

In general, make sure you have: (check the boxes to acknowledge you've followed this template)

  • [X] Read CONTRIBUTING.md

weyert avatar Mar 11 '24 12:03 weyert

Deploy Preview for stoplight-elements-demo ready!

Name Link
Latest commit 2cf633876c77eb391ca7b96383c1e0fd7ef97242
Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/6628d36bc69efc0008cb7032
Deploy Preview https://deploy-preview-2545--stoplight-elements-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 11 '24 12:03 netlify[bot]

Deploy Preview for stoplight-elements ready!

Name Link
Latest commit 2cf633876c77eb391ca7b96383c1e0fd7ef97242
Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/6628d36b0409e700081931f5
Deploy Preview https://deploy-preview-2545--stoplight-elements.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 11 '24 12:03 netlify[bot]

@daniel-white @brendarearden I have updated the PR based on your feedback

weyert avatar Apr 22 '24 16:04 weyert

Storybook renditions below, note that both have the vendor extension renderer working for the x-enum-descriptions-extension

Article

CleanShot 2024-04-22 at 17 17 11

HTTP operation

CleanShot 2024-04-22 at 17 17 22

weyert avatar Apr 22 '24 16:04 weyert

@brendarearden @daniel-white I am assigned this week to do work related to Elements. Would love to get some feedback on this PR.

weyert avatar Apr 24 '24 16:04 weyert

@weyert due to the size of this PR, we will have to dedicate specific time in our work flow to review this. We have added an issue for this work to our backlog and will prioritize it.

brendarearden avatar Apr 26 '24 18:04 brendarearden

@weyert due to the size of this PR, we will have to dedicate specific time in our work flow to review this. We have added an issue for this work to our backlog and will prioritize it.

Okay, then I will try to make a small enhancement to it that we would like to have internally. We think it would be useful to also have access to the schema-level vendor extensions when rendering a property of the schema and then always call the renderer when at least one of the two are not empty.

As we would like to render a marking when the property is expandable but define it on the schema level instead of x-expandableField-extension per property.

On another topic I would love to be able to email with someone about the allOf merging behaviour of Elements or json-schema-tree so we can fix some issues related to it but that code is a bit difficult to follow

weyert avatar Apr 26 '24 18:04 weyert