Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #54 from Pakisan/release/1.7.0
Browse files Browse the repository at this point in the history
release: 1.7.0
  • Loading branch information
Pakisan authored Oct 15, 2022
2 parents 7287fcf + 444fbe1 commit 22e82d3
Show file tree
Hide file tree
Showing 67 changed files with 4,308 additions and 63 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.7.0+idea2021
published to:
- [JetBrains marketplace](https://plugins.jetbrains.com/plugin/15673-asyncapi/versions/stable/197680)
- [GitHub](https://github.com/Pakisan/jasyncapi-idea-plugin/releases/tag/1.6.0%2Bidea2021)

### Added
- Compatability with IDEA 2022.2
- Compatability with IDEA 2022.2.1
- Compatability with IDEA 2022.2.2
- Compatability with IDEA 2022.2.3
- AsyncAPI 2.5.0
- Reference to Avro Schemas

### Changed
- was changed `org.jetbrains.intellij` version
- 1.7.0 -> 1.9.0
- was changed `org.junit.jupiter` version
- 5.8.2 -> 5.9.0

## 1.6.0+idea2021
published to:
- [JetBrains marketplace](https://plugins.jetbrains.com/plugin/15673-asyncapi/versions/stable/197680)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Idea plugin for the [java-asyncapi](https://github.com/Pakisan/java-asyncapi) -
## Usage
1. clone repository
```sh
git clone https://github.com/asyncapi/java-asyncapi.git
git clone https://github.com/Pakisan/jasyncapi-idea-plugin.git
```
2. move to asyncapi-plugin-idea
2. move to jasyncapi-idea-plugin
```sh
cd asyncapi-plugin/asyncapi-plugin-idea
cd jasyncapi-idea-plugin
```
3. build plugin
```sh
asyncapi-plugin-idea git:(feature/idea-plugin) ✗ ./gradlew buildPlugin
jasyncapi-idea-plugin git:(feature/idea-plugin) ✗ ./gradlew buildPlugin
...
BUILD SUCCESSFUL in 24s
11 actionable tasks: 11 executed
Expand Down
24 changes: 14 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id("org.jetbrains.intellij") version "1.7.0"
id("org.jetbrains.intellij") version "1.9.0"
java
kotlin("jvm") version "1.6.20"
}

group "com.asyncapi.plugin.idea"
version = "1.6.0+idea2021"
version = "1.7.0+idea2021"

repositories {
mavenCentral()
Expand All @@ -14,23 +14,23 @@ repositories {
dependencies {
implementation(kotlin("stdlib"))
testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.8.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.9.0")
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version.set("2022.1")
version.set("2022.2.3")
plugins.set(listOf("yaml"))
}
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
sinceBuild.set("211")
untilBuild.set("221.*")
untilBuild.set("222.*")
changeNotes.set("""
<b>AsyncAPI Schema auto-completion</b>
<b>New AsyncAPI version - 2.4.0</b>
<b>IDEA: 2022.1.3, 2022.1.4</b>
<p>New AsyncAPI version - 2.5.0</p>
<p>IDEA: 2022.2</p>
<p>References to Avro Schemas</p>
""".trimIndent())
}

Expand All @@ -53,6 +53,10 @@ tasks.getByName<org.jetbrains.intellij.tasks.RunPluginVerifierTask>("runPluginVe
"2022.1.2",
"2022.1.3",
"2022.1.4",
"2022.2",
"2022.2.1",
"2022.2.2",
"2022.2.3"
))
verifierVersion.set("1.284")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class AsyncAPISchemaHtmlRenderer {

private val urlProvider = service<UrlProvider>()
private val schemaTemplateUrl = "/ui/index.html"
private val schemaTemplateCssUrl = "default(1.0.0-next.38).min.css"
private val schemaTemplateJsUrl = "index(1.0.0-next.38).js"
private val schemaTemplateCssUrl = "default(1.0.0-next.43).min.css"
private val schemaTemplateJsUrl = "index(1.0.0-next.43).js"

fun render(request: FullHttpRequest, schemaUrl: String?): String {
schemaUrl ?: return "schema: not found."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AsyncAPISchemaRecognizer {

fun isSupported(version: String?): Boolean {
return when (version) {
"2.0.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0" -> true
"2.0.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0", "2.5.0" -> true
else -> false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class StaticServer : HttpRequestHandler() {
val referenceVirtualFile = LocalFileSystem.getInstance().findFileByIoFile(requestedFile)
referenceVirtualFile ?: return null

if ("avsc" == referenceVirtualFile.extension) {
return Resource("application/avro", requestedFile.readBytes())
}

if (referenceVirtualFile.fileType !is YAMLFileType && referenceVirtualFile.fileType !is JsonFileType) {
return null
}
Expand Down
Loading

0 comments on commit 22e82d3

Please sign in to comment.