Releases: swagger-api/swagger-editor
Swagger-Editor 3.0.0 Released!
Swagger-Editor
Version 3.0 brings a complete rewrite of Swagger-Editor in React.js 🎉
You should check out the Swagger-UI 3.0 release notes as well. Swagger-Editor 3 is structured as a plugin to Swagger-UI 3, so seeing what's new upstream will help understand what's going on with Swagger-Editor.
What's new?
This version is a rewrite of Swagger-Editor from the the ground up. You get the features in previous versions with benefits:
- Built using the latest technologies, based on React.js.
- Swagger-Editor is now an extension to Swagger-UI.
- Faster than before, handling larger files.
- Significantly easier to customize and extend.
- Unified UI, with the new Swagger-UI project.
- Smaller overall size of the product.
- This version will also make it easier for us to support the next versions of the spec. This version of Swagger-Editor supports version 2 of the Swagger Spec/OAS. Support for older versions have been dropped.
- Improved validation, customized validation errors, to make spec authoring easier.
- Improved auto-suggest, works both for keys and values, contextually.
Known Issues
As a fresh rewrite, some features did not make it in, notably:
- Everything listed in Swagger-UI's Known Issues.
- The integration with the codegen is still missing.
- Importing specs from a URL is not implemented.
- Many of the configuration options are not yet available.
Interface changes
Only the dom_id
configuration option is supported at this time.
index.html
still persists in the root of the project. Opening it directly is the quickest way to get started with Swagger-Editor!
Relationship with Swagger-UI
Swagger-Editor 3 uses Swagger-UI as a library, adding editor functionality through a set of plugins that are provided to Swagger-UI. We also provide a default layout (EditorLayout
) for displaying the Editor and UI alongside each other.
Distribution files & usage
Swagger-Editor places four distribution files in its dist
folder, along with a sourcemap (.map
) for each file:
swagger-editor.js
: Code for the Editor without any dependencies includedswagger-editor.css
: Styling for the editorswagger-editor-bundle.js
: Code for the editor with all dependencies includedvalidation.worker.js
: An external worker file for the validation engine. You won't need this unless you're trying to get validation working in a very old browser.
Developing
Run npm run dev
to start a local dev server that will automatically hot reload any changes you make to Swagger-Editor.
If you'd like to develop Swagger-UI inside Swagger-Editor, you can npm link
your local Swagger-UI to Swagger-Editor.
In order to persist your changes into the dist
folder, npm run build
must be run.
If you're modifying to suit your needs, we suggest writing a plugin and/or a custom layout instead of modifying the core code (see below!).
Prerequisites
- Node 6.x
- NPM 3.x
Extending
See Swagger-UI's section on Extending for more information.
v2.10.5
2.10.4
2.10.3
2.10.2
Important changes in this release:
Move tryoperation.js from directives to controllers
Lots of Unit tests for tryoperation.js
Recursively resolve allOfs in parameter schemas
Add issue and PR templates in Github
Push to DockerHub only on tag [Tony Tam]
Make new services out of tryoperation.js functions
Update dependencies
Remove description column in preview when there is no description.
Set default values for object keys from default value of JSON schema.
Fix overflow error message inside modal on Firefox [Thanasis Katsadas]
fixed content-type from x-www-form-urlencoded
to application/x-www-form-urlencoded
on 'send request'
Fixed Bugs
Add back missing dist
folder. #961
Properly encode query parameters. #976
Fix errors in error annotations #932
Fix the error presenter so it annotates and jumps to the correct line #919
Protractor fixes in CI #916
Fix absolute path issue by using url-loader instead of file loader #933
2.10.1
Version 2.10.1
is a big release for internal build system and code organization. There is also bug fixes and new features in this release.
Build System
- Grunt is replaced with Webpack
- We no longer use Bower for dependencies
- We have sourcemaps for development, production
- npm scripts are used for various tasks instead of Grunt
- CommonJS is used for source dependency management
- Building on Windows is now much more stable
- Web Workers are now included via Webpack. No worker-specific dependencies is used anymore.
- Fonts are not checked into the source code anymore and installed via npm
Test and Lint
- JSHint and JCCS are now replaced with ESLint with stricter lint rules
- Unit tests and End-to-end tests are run in Google Chrome in TravisCI
- Many code style issues were fixed by updating our style guide
- We are now using Mocha reporter for unit test reports
npm
swagger-editor-src
package is now deprecated.swagger-editor
is the only package that we will publish from now on.- We will publish to npm via TravisCI
Fixed bugs
- Changing fold throws an error #866
- Preferences > Reset Editor Settings is broken #880
- And many more
allOf
in parameter schemas are now working properly #676
Misc
- HTTP PATCH method has a better color #851
- Updated dependencies
2.9.9
Important changes in this release
- 0e5f323 Use the correct http-server flag [Ignacio Carbajo]
- da5af5d [Less] Correct the font size in markdown list and table [Sahar Jafari]
- 3462527 Update dependecies version in package.json [Sahar Jafari]
- 4368c4d [Less] Update search box styling [Sahar Jafari]
- 54fe46e Update paste.json textarea color [Sahar Jafari]
- 320cf31 7e0b15a 76ecbc6 [import] Update Sway worker and use the new Sway-worker api signiture in paste JSON [Sahar Jafari]
- 8eea3e3 [less] Refactor Less variables in editor, header, schema-model and security [Sahar Jafari]
- 0068156 [build] Copy ace keybindng files to dist [Sahar Jafari]
- 18a5d75 d1e5d1a cbe67b3 2283320 cad71fc bd962f8 fe34f31 Improved Docker build and Docker image
- b805b15 Fix empty-string optional query parameter showing up in tryoperations [Nicolas Bonnotte]
- 44bcb24 Bugfix: Response headers was never shown [Ricki Runge]
- e6ed64a [preview] Add jump-to-YAML icon [Sahar Jafari]
- d8948e4 [fileloader] Fix issues when importing a yaml file [Sahar Jafari]
- 6dfa6a1 [header] Don't assign preview when there is an error in yaml [Sahar Jafari]
- 4f044bf [preview] Render response examples [Sahar Jafari]
- 8f2c179 [intro] Make image URLs relative [Mohsen Azimi]
- 816bcb0 [codegen] Show error modal when codegen call fails [Mohsen Azimi]
- f6709e4 [menus] Wrap +/- font-size icons in an element [Mohsen Azimi]
- aed66f0 [menus] Add icons to menu items [Mohsen Azimi]
- e6f9f86 [build] Use SSH for repository field in package.json [Mohsen Azimi]
- f571a6a [examples] Add link to source code of heroku pets example [Mohsen Azimi]
- 9825c17 [menus][codegen] Drop "Alpha" badge from code gen menu options [Mohsen Azimi]
- 473ceca install updated version of Source Code Pro from GitHub [Vladimir Rutsky]
- 9521e7f [try] Fix bug in operation#getParameters [Mohsen Azimi]
- 5995d36 [try] make parameter required if allowEmptyValue is set to false [Mohsen Azimi]
- 8e88f10 [preview] Keep fold state when updating the preview [Mohsen Azimi]
- 0f1e071 [test] Fix proxies in karma config [Mohsen Azimi]
- d06dbf5 [test] fix typo in jshintrc file [Mohsen Azimi]
- e3351b1 [import] Fix drag and drop [Mohsen Azimi]
- 4bd5dbc [test][ci] Use "stable" for latest Node.js [Mohsen Azimi]
- 649ab9f [dependencies] update yaml-worker [Mohsen Azimi]
2.9.8
Highlights of this release:
- Composing AST from YAML is back to main thread due to this memory leak bug. Because AST composing is a heavy operation, we disable autocomplete and increase keypress throttle time automatically when Swagger Editor detects a very large Swagger file. When the bug reported above is fixed we will remove this behavior, but for now this is the better option.
- Tags are rendered inline if no tag has a description #645
- It will let user know if code generator service is down #635
- "List all operations" open ups collapsed paths #643
- It's easier to host Swagger Editor in subpaths #647
- No longer mangling file names in dist folder #648
- Bug fixes: #656 #640 #639 #638 #633 #629 #598 #549
2.9.7
There was more than 200 commits and 50 issues were closed since previous release. We mostly focused on performance, accuracy and bug fixes in this release. There was less new feature and more work toward making Swagger Editor more stable.
New Features
- Multi-threaded Swagger processing. Swagger Editor now uses two separate threads to process the Swagger document. This will guarantee Swagger processing is not blocking the UI thread.
- Autocomplete is more accurate and reliable. Swagger Editor is now suggesting enum values on top of known keys. It also suggest values for JSON Pointer (
$ref
) references.
- And a lot more enhancements. See full list of enhancements made
Fixed Bugs
See list of fixed bugs here
2.9.6
New Features
- Renders a deprecated tag on deprecated operations #433
- Human friendly menu options for code-generator
- A new refined menu bar
- A new and more accurate progress/status indicator
- Allows disabling backend health check #437
- Allows empty username/password in basic auth #450
- Allow user to bypass cors-it proxy when importing YAML #455
- Drag and drop file import #455
- Ace editor gets annotated with errors and warnings #445
- Warns user about cross-origin calls #455
- More autocomplete options for JSON Schema #432
- Autocomplete improvements #455 #432
- Try this operation shows validation errors
- Allow loose JSON Schema in body parameter schemas #383
Fixed Bugs
- Allow multiple
formData
parameters #435 - Multiple Try this operation bug fixes: #436
backendEndpoint
resolved based on it's origin(relative/absolute)- Honors
defaults.examplesFolder
when loading examples - Uses browser
localStorage
for saving the state of intro screen - Links in rendered info section open up in a new tab #451
- Honors
developmentPort
for launching the connect server #454 - Styling touchups #461
- Resolves
$ref
indefinitions
in compose time better #444
Internals
- Refactored autocomplete code
- Overhauled documentations
- E2E tests improvements