elements
elements copied to clipboard
feat: add support for vendor extension renderers
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
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@daniel-white @brendarearden I have updated the PR based on your feedback
Storybook renditions below, note that both have the vendor extension renderer working for the x-enum-descriptions
-extension
Article
HTTP operation
@brendarearden @daniel-white I am assigned this week to do work related to Elements. Would love to get some feedback on this PR.
@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.
@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