Skip to content

allow for custom code example tabs #589

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

Conversation

joecrop
Copy link

@joecrop joecrop commented Jun 3, 2023

Description

There seems to be some support for an x-code-samples property to display custom code samples. However, when doing this, the CodeTabs component is only aware of the default auto-generated samples. So when you click on a tab for a custom code sample, the component can't find the Language and bombs.

It's not clear to me that the x-code-samples property is intended to be fully supported. I can't find any documentation about support or a working example, so it's unclear to me if there are tests that should be added/updated.

Motivation and Context

When using x-code-samples, clicking on a tab for a custom code sample, the component can't find the Language and bombs.

How Has This Been Tested?

This was tested manually using an openAPI spec with and without the x-code-samples property.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@welcome-to-palo-alto-networks
Copy link

🎉 Thanks for opening this pull request! We really appreciate contributors like you! 🙌

@github-actions
Copy link

github-actions bot commented Jul 19, 2023

Visit the preview URL for this PR (updated for commit ae2a34e):

https://docusaurus-openapi-36b86--pr589-r20tl7aq.web.app

(expires Sun, 29 Oct 2023 20:23:09 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@sserrata sserrata closed this Sep 29, 2023
@sserrata sserrata reopened this Sep 29, 2023
@sserrata
Copy link
Member

Hi @joecrop, I was curious if you have any plans to move to v2.0.0? I haven't tested but I'm wondering if the same issue occurs with v2.

@lucasassisrosa lucasassisrosa mentioned this pull request Jan 11, 2024
4 tasks
@lucasassisrosa
Copy link
Contributor

Hi @joecrop, I was curious if you have any plans to move to v2.0.0? I haven't tested but I'm wondering if the same issue occurs with v2.

I could replicate the same issue with v2 after fixing the typo on x-codeSamples extension usage

@joecrop
Copy link
Author

joecrop commented Jan 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants