swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

SwaggerEditor@next(standalone): initial default language should reside locally

Open tim-lai opened this issue 3 years ago • 3 comments

Current: external https call for a definition

Desired: local retrieval of a yaml fixture

Context: current external https call enables easy sync with latest available AsyncAPI definition. However, on public project release, we should not rely on external resources. This maintains existing behavior to be usable inside user's intranets.

Sidenote, we'll likely want to continue to promote Petstore - OAS3.0 rather than AsyncAPI. :)

tim-lai avatar Jul 15 '22 16:07 tim-lai

@tim-lai are you saying that the AsyncAPI definition isn't embedded? I think it would make a good plugin (one or more) for those definitions. So it's not embedded in core code and doesn't require HTTP calls in the demo site (ie *.swagger.io) site.

ponelat avatar Jul 19 '22 11:07 ponelat

are you saying that the AsyncAPI definition isn't embedded? I think it would make a good plugin (one or more) for those definitions. So it's not embedded in core code and doesn't require HTTP calls in the demo site (ie *.swagger.io) site

Correct. The AsyncAPI definition is not currently embedded. Partially reason was to more easily keep up with definition changes.

Plugin(s) to provide definitions is a good idea.

tim-lai avatar Jul 19 '22 17:07 tim-lai

Although not enabled, this is now possible using the REACT_APP_DEFINITION_FILE environment flag. There exists a sample setting in .env as well as a fixture /public/static/petstore-oas3.yml.

tim-lai avatar Jul 27 '22 21:07 tim-lai