A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA
Clone or download
semonte Fixed key completion with arrays / duplicate keys
Fixed an issue where, for example, `$ref` key was not suggested
because it was already present in the parameters object:

parameters:
  - $ref: ref1
  - <caret> (no `$ref` suggestion available)

This was caused by an invalid check for a unique key.

Fixes #186
Latest commit 9310aff Sep 4, 2018

README.md

Build Status Coverage Status

Swagger Plugin

Swagger Plugin makes it easy to edit Swagger and OpenAPI specification files inside IntelliJ IDEA. You can find it on JetBrains' plugin page.

Swagger Plugin features

Usage

Open a Swagger or OpenAPI specification file, that's it.

Custom Extensions

You can extend the auto completion in order to provide custom keys and and values. The plugin provides the following extension points for this:

<extensionPoints>
    <extensionPoint qualifiedName="org.zalando.intellij.swagger.customFieldFactory" interface="org.zalando.intellij.swagger.extensions.completion.swagger.SwaggerCustomFieldCompletionFactory"/>
    <extensionPoint qualifiedName="org.zalando.intellij.swagger.customValueFactory" interface="org.zalando.intellij.swagger.extensions.completion.swagger.SwaggerCustomValueCompletionFactory"/>
</extensionPoints>

See the Zalando extension example for details.

Development

Developing the Swagger Plugin is easy, just execute the following command:

./gradlew runIdea

This will start IntelliJ IDEA with the plugin installed.

How to Contribute

To contribute, please fork and create a pull request.

Bug Fixes

If you find a bug, it would be awesome if you created an issue about it. Please include a clear description of the problem so that we can fix it!

Contact:

sebastian.monte@zalando.de

License

The MIT License (MIT) Copyright © 2017 Zalando SE, https://tech.zalando.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.