New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ability to override code examples using x-codeSamples
#2574
feat: add ability to override code examples using x-codeSamples
#2574
Conversation
✅ Deploy Preview for stoplight-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for stoplight-elements-demo ready!
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 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 |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - I tested out the storybook examples and it appears to be working!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, after futher testing, it looks like the state is getting stuck when going to select different code samples
Hmm, bummer, wondering if it's incorrect management of the |
2db96f3
to
ec84034
Compare
Don't want to sound rude but I would prefer Stoplight's resources would be spend on my other PR #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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
Thank you for merging :) |
Elements Default PR Template
In general, make sure you have: (check the boxes to acknowledge you've followed this template)
CONTRIBUTING.md
Updates the
RequestSamples
andTryItWithExamples
-components to support thex-codeExamples
vendor extension on a http operation schema.refs #2453