zalando / intellij-swagger Goto Github PK
View Code? Open in Web Editor NEWA plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA
Home Page: https://plugins.jetbrains.com/plugin/8347
License: MIT License
A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA
Home Page: https://plugins.jetbrains.com/plugin/8347
License: MIT License
When a field is auto completed, we should append a colon (":") if the field is new.
Consider:
swagger: 2.0
paths:
/pets:
get:
responses:
200:
schema:
$ref: #<caret>
definitions:
Pets:
Error:
Here, the #
is recognised as a start of yaml comment, so no completion is currently suggested.
If user explicitly escaped '#
then both #/definitions/Pets
and #definitions/Error
are correctly suggested.
However, the need for escaping of the #
symbol is not obvious, so it would be nice if the same completion set would be suggested (and choosing one of them automatically escaped the reference).
Note that in this case user may only type sc<completion><enter>$<completion><enter>#<completion>
to finish with the correct response definition
I have found this plugin the most convenient way for me to edit swagger files (i prefer it over the swagger-editor, for example).
What I'd really love to see is an auto-refresh feature for the excellent browser preview - so that whenever I save, the page in the browser reloads or updates the relevant parts, similar to what the various markdown plugins do.
Hi,
looks like the SwaggerUI distribution that you use is a bit dated and it seems to have problems with externalized schemas. When I try previewing, I just get
fetching resource list: ; Please wait.
and looking at the Chrome JS output reveals that there was an exception:
Uncaught TypeError: Cannot read property 'split' of null
in line 261 of spec-converter.js.
This happens with both my own swagger files and with https://github.com/OAI/OpenAPI-Specification/tree/master/examples/v2.0/yaml/petstore-separate/spec
Would be great if somebody could have a look and uplift the SwaggerUI version.
Thanks!
Tags seems to be repititive by their nature in swagger.
Canonical Uber example has 5 tags fields with values: User
, User
, Estimates
, Estimates
and Products
.
Probably it makes sense to suggest already existing tags when user tries to enter a new one
It would be useful to have a preview tab for the Swagger UI.
A blog article about "How to split a Swagger spec into smaller files"
1.It would be better if this plugin can resolve splited swagger files!Resolve means for $ref a relative path yaml,then we can click it like a hyperlink and jump to the target yaml file!
2.Also,when i edit User.yaml file which is mentioned in above article,autocomplete feature does not work...It would be good if autocomplete feature work in this situation!
Default children are not generated in the following case
{ "swagger": "2.0", "inf<caret>" }
For example, autocompleting info would produce the following block:
"info": {
"version": "",
"title": ""
}
In file: LightVirtualFile: /swagger.json: Argument for @NotNull parameter 'element' of com/intellij/json/psi/JsonPsiUtil.isPropertyKey must not be null
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'element' of com/intellij/json/psi/JsonPsiUtil.isPropertyKey must not be null
at com.intellij.json.psi.JsonPsiUtil.isPropertyKey(JsonPsiUtil.java)
at org.zalando.intellij.swagger.traversal.JsonTraversal.isKey(JsonTraversal.java:35)
at org.zalando.intellij.swagger.traversal.JsonTraversal.getKeyNameIfKey(JsonTraversal.java:40)
at org.zalando.intellij.swagger.validator.field.FieldsValidator.validate(FieldsValidator.java:25)
at org.zalando.intellij.swagger.annotator.JsonValidKeyAnnotator.annotate(JsonValidKeyAnnotator.java:25)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:303)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:433)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1054)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:426)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:425)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'element' of com/intellij/json/psi/JsonPsiUtil.isPropertyKey must not be null
at com.intellij.json.psi.JsonPsiUtil.isPropertyKey(JsonPsiUtil.java)
at org.zalando.intellij.swagger.traversal.JsonTraversal.isKey(JsonTraversal.java:35)
at org.zalando.intellij.swagger.traversal.JsonTraversal.getKeyNameIfKey(JsonTraversal.java:40)
at org.zalando.intellij.swagger.validator.field.FieldsValidator.validate(FieldsValidator.java:25)
at org.zalando.intellij.swagger.annotator.JsonValidKeyAnnotator.annotate(JsonValidKeyAnnotator.java:25)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:303)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:433)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1054)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:426)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:425)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
I use IDEA 2016.3 and swagger plugin v0.0.21.
We use https://github.com/zircote/swagger-php and have annonation in our PHP files (prefixed to the implementing function), much like phpdoc. We find it very useful to document our fast evolving JSON REST API.
But right now this syntax in PhpStorm is just grey blob of text, so not very practical at all. Some code styling to help prevent syntax errors or typos. For me in particular quick navigation to definitions would be of use.
Is it feasable for the plugin to support these PHP annonations ?
Or might this be easyer to integrate in new, or other existing plugin like https://github.com/Haehnchen/idea-php-annotation-plugin (phpdoc) ?
Possible values are http, https, ws and wss.
From https://plugins.jetbrains.com/plugin/8347:
[email protected] wrote:
Would it make sense to support openapi.yml as the filename as well? I haven't seen any examples so I'm not sure if people are putting a dash in the name or not.
Consider
swagger: "2.0"
info:
title: Test
version: "1.0.0"
host: somewhere.com
basePath: /basePath
parameters:
limitParam:
name: limit
in: query
required: false
type: integer
format: int32
paths:
/products:
get:
parameters:
- $ref: <caret-1>
responses:
"200":
description: description is required
schema:
type: array
items:
$ref: <caret-2>
definitions:
Product:
properties:
product_id:
type: string
Here <caret-1>
can only reference parameters, while <caret-2>
can only reference definitions.
However, plugin suggests both types of records (and something else) for both cases:
Parameters (note that allowEmptyValue
is also questionable here):
Similar support as #1 to tag elements.
OAI spec supports the following types:
I would expect that plugin simplifies entering / editing the types
type
and format
values shall be implemented.Affected Version: 0.0.11
In this example, "$ref" would be marked as invalid key:
"User": {
"type": "object",
"description": "User",
"properties": {
"contact": {
"$ref": "#/definitions/Contact"
}
}
}
Suggestions for invalid field contain 'email', 'name', and 'url'. Changing property name to something else fixes the issue.
"ExampleList": {
"type": "array",
"description": "valid",
"items": {
"type": "string",
"description": "invalid key"
}
}
It did not happen before 0.20 (if I remember well)
Every time I start IntelliJ I get this exception:
To reindex this file IDEA has to be restarted: com.intellij.openapi.fileTypes.impl.AbstractFileType cannot be cast to com.intellij.openapi.fileTypes.LanguageFileType
java.lang.ClassCastException: com.intellij.openapi.fileTypes.impl.AbstractFileType cannot be cast to com.intellij.openapi.fileTypes.LanguageFileType
at com.intellij.util.indexing.FileContentImpl.createFileFromText(FileContentImpl.java:97)
at com.intellij.util.indexing.FileContentImpl.getPsiFile(FileContentImpl.java:75)
at org.zalando.intellij.swagger.index.SwaggerDataIndexer.map(SwaggerDataIndexer.java:34)
at org.zalando.intellij.swagger.index.SwaggerDataIndexer.map(SwaggerDataIndexer.java:25)
at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:457)
at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1633)
at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$8(FileBasedIndexImpl.java:1559)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:505)
at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1516)
at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1501)
at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:107)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:219)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:236)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:232)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I am using external JSON schema files (v3/v4 compliant) and also using your Swagger Plugin in PyCharm.
I found out, that the Swagger-UI provided by your plugin, does not work correctly with external json files.
E.g. the following response:
responses:
200:
description: laboratory results
schema:
$ref: 'http://localhost/lab-result-1014.json'
Your plugin (and the integrated swagger-ui) returns nothing:
The newest swagger-ui returns the correct schema:
Thanks a lot!
Hey,
I tried to install your swagger plugin via the PHPStorm plugin repository but there's only version 0.0.1 available (which doesn't work. It's always grayed out after installing it):
So I downloaded the zip file with ne newest version (0.0.17) and tried to install it manually. But now it tells me:
What can I do to get it working?
Regards,
Verry
Version 0.0.9 introduced following bugs/regressions in NodeJS projects:
All errors are gone if Swagger plugin is disabled.
From #48:
"2.Also,when i edit User.yaml file which is mentioned in above article,autocomplete feature does not work...It would be good if autocomplete feature work in this situation!"
From https://plugins.jetbrains.com/plugin/8347:
"I am unable to install plugin 0.0.13 (Plugin Swagger Plugin is incopatible with this installation) on WebStorm 2016.2 EAP Build #WS-162.917.18, built on June 15, 2016 JRE: 1.8.0_76-release-b216 x86 JVM: OpenJDK Server VM by JetBrains s.r.o Plugin version 0.0.2 from repository do not work. Is possible to fix it or are there any workaround? THX Lubor"
Consider following completion:
{
"swagger": "2.0",
"info": {
"tit<caret>
"description": "Move your app forward with the Uber API",
"version": "1.0.0"
}
...
Completion for the field "title" is already implemented, but it would be nice if, after accepting the suggested field the final state would be:
{
"swagger": "2.0",
"info": {
"title": "<caret>",
"description": "Move your app forward with the Uber API",
"version": "1.0.0"
}
...
(note the added quotes, placement of cursor and added comma).
For YAML flow there is no additional required markup, so it seems to be JSON-specific enhancement
From #48
"It would be better if this plugin can resolve splited swagger files!Resolve means for $ref a relative path yaml,then we can click it like a hyperlink and jump to the target yaml file!"
Auto completion should work with reference properties. For example, ../common.yaml#/definitions/Security
or ../definitions.yaml#/Security
. Swagger auto completion should work in referenced files.
Consider:
swagger: 2.0
paths:
/pets:
get:
responses:
200:
schema:
$ref: '#<caret>
definitions:
Pets:
Error:
Here the actual code correctly suggests references for both Pets
and Error
.
However, it seems that for actual editing it is more common to have a per-response definitions (except may be a common error definitions). E.g, canonical Uber example contains 5 paths, each of them referencing its own unique definition (and a shared Error).
So it might be useful to provide additional "new-definition" template completion that would
#/definitions/<caret>
at the $refdefinitions
objectI am currently writing swagger spec in multiple files and combine them before I use the swagger spec as follows:
├── swagger.yaml
└── yaml
├── definitions
│ ├── book.yaml
│ └── user.yaml
└── index.yaml
In this example, swagger.yaml
is concatenated file of book.yaml
, user.yaml
and index.yaml
. In index.yaml
, "swagger" field exists so this plugin is activated, while I can not use this plugin in book.yaml
and user.yaml
because they do not have "swagger" field.
Please provide optional comment to activate this plugin for files without swagger field as follows:
# intellij-swagger: activate
When I was trying to build the plugin by gradlew.bat runIdea
, I ran into a compile error complaining:
E:\repos\intellij-swagger>gradlew.bat runIdea
:compileJava
E:\repos\intellij-swagger\src\main\java\org\zalando\intellij\swagger\ui\SwaggerUiUrlProvider.java:45: error: getUrl(OpenInBrowserRequest,VirtualFile) in SwaggerUiUrlProvider cannot override getUrl(OpenInBrowserRequest,VirtualFile) in BuiltInWebBrowserUrlProvider
protected Url getUrl(@NotNull OpenInBrowserRequest request, @NotNull VirtualFile file) throws BrowserException {
^
overridden method does not throw BrowserException
1 error
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.721 secs
E:\repos\intellij-swagger>
I tried cleaning the temp dir for any gradle downloads as well as the .gradle dir under user folder, but same result.
Also, when I opened the source code and tried to go to the definition of the accused BuiltInWebBrowserUrlProvider, it opened a file called BuiltInWebBrowserUrlProvider.kt from C:\Users\gjyuan.gradle\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\LATEST-EAP-SNAPSHOT\94051ecd254e3276ca2ee955f8f888465e7724ee\ideaIC-LATEST-EAP-SNAPSHOT-sources.jar
The definition points to a kotlin file, is this expected?
Swagger Plugin is incompatible with Intellij IDEA 2016.2 (build 162.1121).
Expected:
swagger: 2.0
paths:
/pets:
get:
parameters:
- <caret>
Actual:
swagger: 2.0
paths:
/pets:
get:
parameters:
- <caret>
This is a generic feature for editing of the YAML document with known structure.
Consider the following:
swagger: "2.0"
info:
title: Uber API
version: "1.0.0"
description: Move your app forward with the Uber API
ho<caret>
Here user has just entered the last field of the info
object, pressed enter and possibly now wants to get back to editing of the main object.
However, in order to enter e.g the host
field, user is forced to get to the correct indentation level first, and only then she will be able to type ho<completion>
.
It would be nice if the same would work without the need to correct an indentation.
Things to consider:
ho
in the snippet is important, and the host
completion would NOT be suggested if the last line were empty)Mark unknown fields as error.
If a reference does not exist, show an error.
In file: LightVirtualFile: /apiv3-swagger.yaml
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Optional.<init>(Optional.java:96)
at java.util.Optional.of(Optional.java:108)
at org.zalando.intellij.swagger.traversal.YamlTraversal.getKeyNameIfKey(YamlTraversal.java:37)
at org.zalando.intellij.swagger.validator.field.FieldsValidator.validate(FieldsValidator.java:25)
at org.zalando.intellij.swagger.annotator.YamlValidKeyAnnotator.annotate(YamlValidKeyAnnotator.java:26)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:303)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:433)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1054)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:425)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
PyCharm 2016.3 EAP
Build #PY-163.7743.16, built on November 8, 2016
PyCharm EAP User
Expiration date: December 8, 2016
JRE: 1.8.0_112-release-408-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
File causing the NPE:
MIME types are hard to remember, we should auto complete MIME types.
Consider following sample:
swagger: 2.0
paths:
/pets:
get:
responses:
200:
schema:
$ref: '#/definitions/Pets'
definitions:
Pe<caret>ts:
Here pressing Shift-F6 (for Refactor/Rename) opens Rename dialog as follows, leading to the expectation that rename will actually update the usages. (Especially now when the navigation from $ref to Pets
is implemented).
However, entering PetsNew
in the dialog only updates the declaration and not the usages.
We should auto complete $ref values. For example
$ref: '#/definitions/P<caret>'
should be completed to $ref: '#/definitions/Pets'
if Pets definition exists.
Template should contain all required fields.
Take into account that parameter's collectionFormat values differ from items and headers object.
There was request at https://www.reddit.com/r/IntelliJIDEA/comments/4ioud1/swagger_plugin/ about being able to navigate from a $ref element to definition. For example, clicking ctrl clicking on count would jump to the definition.
"$ref": "#/parameters/count"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.