elements
elements copied to clipboard
feat: add ability to override code examples using `x-codeSamples`
Elements Default PR Template
In general, make sure you have: (check the boxes to acknowledge you've followed this template)
- [X] Read
CONTRIBUTING.md
Updates the RequestSamples
and TryItWithExamples
-components to support the x-codeExamples
vendor extension on a http operation schema.
refs #2453
Deploy Preview for stoplight-elements ready!
Name | Link |
---|---|
Latest commit | ec84034af4befae7d5db1d255b3a9d53be953dcd |
Latest deploy log | https://app.netlify.com/sites/stoplight-elements/deploys/664b84291ea50c0008154970 |
Deploy Preview | https://deploy-preview-2574--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.
Deploy Preview for stoplight-elements-demo ready!
Name | Link |
---|---|
Latest commit | ec84034af4befae7d5db1d255b3a9d53be953dcd |
Latest deploy log | https://app.netlify.com/sites/stoplight-elements-demo/deploys/664b8429842de70008d51c84 |
Deploy Preview | https://deploy-preview-2574--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.
@weyert Hey! Thank you for the contribution. Were you going for x-codeexamples or was it supposed to be x-codesamples?
x-codesamples is generally what we see being used in the industry.
Oh sorry, my bad. I am happy to update it. You are totally right. I am not sure if we would like to remap support mappings from other views (E.g. redly) to the values that Elements is expecting?
I am not sure if we would like to remap support mappings from other views (E.g. redly) to the values that Elements is expecting?
I am not sure what you mean by this? is redly using a different overriding code example x extension?
I am not sure if we would like to remap support mappings from other views (E.g. redly) to the values that Elements is expecting?
I am not sure what you mean by this? is redly using a different overriding code example x extension?
Sorry, I meant Redocly and others might use a different naming convention for the language
, e.g. shell
vs bash
etc. I think we are fine for Read.me version of doing this, though.
Sorry, I meant Redocly and others might use a different naming convention for the
language
, e.g.shell
vsbash
etc. I think we are fine for Read.me version of doing this, though.
Gotcha. We don't need to do the remapping as part of this, but would you open a separate issue for the remapping?
Gotcha. We don't need to do the remapping as part of this, but would you open a separate issue for the remapping?
Sure, happy to do that.
Hmm, bummer, wondering if it's incorrect management of the isStale
-variable?
Don't want to sound rude but I would prefer Stoplight's resources would be spend on my other PR https://github.com/stoplightio/elements/pull/2545 which would allow me to stop using my fork of Elements. This PR was just a nice improvement.
@weyert this PR overlapped with a feature request from our product team, so it was a higher priority in the backlog. I appreciate you letting us know though and we will make sure your other PR is moved up in priority! hopefully we will be able to get you unforked soon!
Thank you for merging :)