docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

[FR] Ability to sync Content-Type and Accept with request and response

Open sserrata opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

See #195 and #193 for background. The problem is that, with support for multiple MIME types, we now lack a way to sync the selected MIME/content-type with the corresponding Content-Type in the ApiDemoPanel. Additionally, we lack a way to sync the chosen Accept value in the ApiDemoPanel with the response type.

Describe the solution you'd like

  • Reimplement react-redux to create a new store that extends to both ApiItem and ApiDemoPanel (shared).
  • Map Content-Type to request MIME/media type
  • Map Accept to response MIME/media type

Describe alternatives you've considered

Leave it up to the user to choose the appropriate values.

Additional context

Right now, react-redux provider is only wrapped around ApiDemoPanel.

sserrata avatar Aug 09 '22 19:08 sserrata