Skip to content
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

I'm using Redocly to generate API documentation and I would like to sync the oneOf tiles with the example payload dropdown in the generated UI. Currently, the two elements are not synchronized, and I'm seeking guidance on how to achieve this synchronization. #2346

Open
mayankbhatt07141 opened this issue Jun 28, 2023 · 3 comments

Comments

@mayankbhatt07141
Copy link

Issue Description

Expected Behaviour:
When a user clicks on a oneOf tile, the corresponding option should be selected in the example payload dropdown, and vice versa.

Steps to Reproduce

  1. Generate API documentation using Redocly.
  2. Navigate to the section with oneOf tiles and the example payload dropdown.
  3. Observe that the selection in the oneOf tiles and the example payload dropdown are not synchronized.
  • Redocly Version: 3
Screenshot 2023-06-29 at 12 28 55 AM

Thank you!

@mayankbhatt07141 mayankbhatt07141 changed the title 'm using Redocly to generate API documentation and I would like to sync the oneOf tiles with the example payload dropdown in the generated UI. Currently, the two elements are not synchronized, and I'm seeking guidance on how to achieve this synchronization. I'm using Redocly to generate API documentation and I would like to sync the oneOf tiles with the example payload dropdown in the generated UI. Currently, the two elements are not synchronized, and I'm seeking guidance on how to achieve this synchronization. Jun 28, 2023
@lornajane
Copy link
Contributor

Thanks for this, it's a good suggestion. At the moment, users can choose which documentation and which example they want to view independently; they're not linked. I'll leave this open so that we can discuss adding it to the roadmap in the future.

@mayankbhatt07141
Copy link
Author

Hi @lornajane, is there any other way to give options of 4 to 5 payloads in single request like in oneOf but with synchronous behaviour?

@lornajane
Copy link
Contributor

I can't think of a way to synchronise them and in most cases it wouldn't make sense. The examples are independent and can be used to illustrate many different things, not just mapped to the oneOf options in a 1:1 manner.

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

No branches or pull requests

2 participants