openapi-format icon indicating copy to clipboard operation
openapi-format copied to clipboard

Online playground

Open eggplants opened this issue 2 years ago • 3 comments

To be easy to try openapi-format online, I need online playground!

Good example: https://prettier.io/playground.

eggplants avatar Apr 04 '22 01:04 eggplants

@eggplants This a really good suggestion.

Do you know of any open-source JS playground tool, that we could leverage to offer this?

thim81 avatar Apr 13 '22 09:04 thim81

Thank you for your response.

I counldn't find any magical library to generate the playground from commander's CLI implementation. So need to create it from scratch.

(If you don't mind it taking longer, I'll implement it in React, which I'm not very good at...)

eggplants avatar Apr 13 '22 12:04 eggplants

@eggplants I think I have found a good starting point to build like "openapi-format" playground.

My idea was to re-use the excellent work from @boyney123 and the eventbridge-transformer application.

Idea: provide a 3 panel UI:

  • Panel 1: Original OpenAPI doc
  • Panel 2: openapi-format configurations
  • Panel 3: the formatted OpenAPI doc

It will take time to build it, and my current availability is rather low at the moment, so if you want to contribute, feel free to go in that direction.

thim81 avatar Apr 29 '22 16:04 thim81

hi @eggplants

Wanted to share the we launched an online openapi-format playground a couple weeks ago: https://openapi-format-playground.vercel.app/

Features

  • Format OpenAPI documents to enhance readability
  • Sort OpenAPI document sections for consistency
  • Filter OpenAPI document content, with an easy option to select elements
  • Support for both JSON and YAML formats
  • Download formatted OpenAPI documents
  • Share the OpenAPI document and configuration
  • Compare the difference before and after the formatting

Usage

  1. Paste your OpenAPI document into the input editor.
  2. Configure the sorting and filtering options as needed.
  3. View the formatted document in the output editor.
  4. Download the formatted document using the download button.

thim81 avatar Jun 28 '24 11:06 thim81