SmartBear / intellij-swaggerhub-release

3 stars 0 forks source link

API / DOMAIN Sync Status #9

Closed sehand closed 3 years ago

sehand commented 3 years ago

This would greatly help with working on several items at once and knowing whether my local items are out-of-date or whether I have work that hasn't been pushed up to SwaggerHUB's backend.

emmett008 commented 3 years ago

In the current version, there is not way to see the current local changes in the plugin/IDE.

If you refresh from SwaggerHub you will be notified if there are remote changes which conflict with your local. There is a merge tool available then to proceed.

sehand commented 3 years ago

I am having issues with the sync. I tried to pull down the latest version of one of my APIs and it is not pulling in the changes that I see in the SwaggerHUB UI. Because of this issue, I cannot continue using the Plugin.

If I try to "Sync to SwaggerHUB" for the specific changed API, it says it was successful and 0 items were synced. If I try to "Pull latest from SwaggerHUB" it says it does it, but the changes do not show up within Intellij. If I try to "Refresh" the entire set of APIs, I get the following error, but there is no information about where this issue is occurring for me to correct anything. It doesn't identify what API/DOMAIN is having the issue. (I have pulled down the latest plugin that was released this morning).

java.lang.IllegalStateException: special characters are not allowed
 at [Source: (StringReader); line: 1, column: 1]
    at com.smartbear.swaggerhub.intellij.plugin.validation.schema.AbstractSchema.getFileSchemaName(AbstractSchema.java:68)
    at com.smartbear.swaggerhub.intellij.plugin.validation.schema.AbstractSchema.isAvailable(AbstractSchema.java:30)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.isProviderAvailable(JsonSchemaServiceImpl.java:429)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.getProvidersForFile(JsonSchemaServiceImpl.java:243)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.getSchemasForFile(JsonSchemaServiceImpl.java:179)
    at com.jetbrains.jsonSchema.impl.JsonSchemaServiceImpl.getSchemaFilesForFile(JsonSchemaServiceImpl.java:163)
    at org.jetbrains.plugins.github.extensions.GithubYamlIconProvider.getIcon(GithubYamlIconProvider.kt:24)
    at com.intellij.util.PsiIconUtil.getProvidersIcon(PsiIconUtil.java:17)
    at com.intellij.ide.FileIconPatcherImpl.getIcon(FileIconPatcherImpl.java:37)
    at com.intellij.util.IconUtil.getProvidersIcon(IconUtil.java:222)
    at com.intellij.util.IconUtil.computeFileIcon(IconUtil.java:155)
    at com.intellij.openapi.fileEditor.impl.EditorsSplitters.lambda$updateFileIconAsynchronously$7(EditorsSplitters.java:419)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:187)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException: special characters are not allowed
 at [Source: (StringReader); line: 1, column: 1]
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:409)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4684)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4586)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3516)
    at com.smartbear.swaggerhub.intellij.plugin.validation.schema.AbstractSchema.getFileSchemaName(AbstractSchema.java:58)
    ... 39 more
Caused by: unacceptable code point '
sehand commented 3 years ago

All of my attempts to pull in the changes in SwaggerHUB have caused the change to be LOST. As a result of this, I will discontinue using the plugin for anything other than experimentation.

emmett008 commented 3 years ago

Hi @sehand,

thanks again for your feedback, we found an issue in the syncing functionality. The fix has been applied to the latest version if you would like to update your version, this should be now working as expected.

emmett008 commented 3 years ago

Retested in 1.0.2 and should be working as expected