From 5f2e58de4fa49cc4cc5fb351e938e69323f7431b Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Thu, 26 Mar 2020 10:04:18 -0500 Subject: [PATCH 1/7] update to version 1.3.3 --- hello-world-java/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello-world-java/gradle.properties b/hello-world-java/gradle.properties index 2e538cd..4574e8b 100644 --- a/hello-world-java/gradle.properties +++ b/hello-world-java/gradle.properties @@ -1 +1 @@ -micronautVersion=1.2.0 \ No newline at end of file +micronautVersion=1.3.3 \ No newline at end of file From cfc4e377f2de7384bf5057466083694c14cbb325 Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Thu, 26 Mar 2020 11:10:41 -0500 Subject: [PATCH 2/7] changed logback.xml for windows users --- hello-world-groovy/gradle.properties | 2 +- hello-world-groovy/src/main/resources/logback.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hello-world-groovy/gradle.properties b/hello-world-groovy/gradle.properties index 2e538cd..4574e8b 100644 --- a/hello-world-groovy/gradle.properties +++ b/hello-world-groovy/gradle.properties @@ -1 +1 @@ -micronautVersion=1.2.0 \ No newline at end of file +micronautVersion=1.3.3 \ No newline at end of file diff --git a/hello-world-groovy/src/main/resources/logback.xml b/hello-world-groovy/src/main/resources/logback.xml index d928025..ec4baa0 100644 --- a/hello-world-groovy/src/main/resources/logback.xml +++ b/hello-world-groovy/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - true + false From dcb6959bd3ee829d520e6c05e28f733993f129e1 Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Fri, 3 Apr 2020 12:57:19 -0500 Subject: [PATCH 3/7] update to micronaut 1.3.3 --- hello-world-groovy/build.gradle | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hello-world-groovy/build.gradle b/hello-world-groovy/build.gradle index 4d9ee84..8583c50 100644 --- a/hello-world-groovy/build.gradle +++ b/hello-world-groovy/build.gradle @@ -1,6 +1,6 @@ plugins { id "groovy" - id "com.github.johnrengelman.shadow" version "5.0.0" + id "com.github.johnrengelman.shadow" version "5.2.0" id "application" } @@ -18,6 +18,7 @@ configurations { } dependencies { + annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") compileOnly platform("io.micronaut:micronaut-bom:$micronautVersion") compileOnly "io.micronaut:micronaut-inject-groovy" compileOnly "io.micronaut.configuration:micronaut-openapi" @@ -29,13 +30,13 @@ dependencies { implementation "io.micronaut:micronaut-http-client" runtimeOnly "ch.qos.logback:logback-classic:1.2.3" testCompileOnly platform("io.micronaut:micronaut-bom:$micronautVersion") + testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion") testImplementation("org.spockframework:spock-core") { exclude group: "org.codehaus.groovy", module: "groovy-all" } testImplementation "io.micronaut:micronaut-inject-groovy" testImplementation "io.micronaut.test:micronaut-test-spock" testImplementation "io.micronaut.test:micronaut-test-junit5" - testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.5.0" } test.classpath += configurations.developmentOnly @@ -49,5 +50,7 @@ shadowJar { mergeServiceFiles() } -run.classpath += configurations.developmentOnly -run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote') +tasks.withType(JavaExec) { + classpath += configurations.developmentOnly + jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote') +} From 613c6f8368903098a5a0492cae8eb6da5fd799fc Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Fri, 3 Apr 2020 14:58:16 -0500 Subject: [PATCH 4/7] changed gradle folder to v 6 --- hello-world-groovy/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello-world-groovy/gradle/wrapper/gradle-wrapper.properties b/hello-world-groovy/gradle/wrapper/gradle-wrapper.properties index b0acbdc..ba94df8 100644 --- a/hello-world-groovy/gradle/wrapper/gradle-wrapper.properties +++ b/hello-world-groovy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 3676c8b1b5b0120b5e1bf88b8da80c763113f0b1 Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Wed, 6 May 2020 10:26:02 -0500 Subject: [PATCH 5/7] upgrade to mn version 1.3.4 --- hello-world-groovy/build.gradle | 1 + hello-world-groovy/gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hello-world-groovy/build.gradle b/hello-world-groovy/build.gradle index 8583c50..6f726f5 100644 --- a/hello-world-groovy/build.gradle +++ b/hello-world-groovy/build.gradle @@ -26,6 +26,7 @@ dependencies { implementation "io.swagger.core.v3:swagger-annotations" implementation "io.micronaut:micronaut-runtime-groovy" implementation "io.micronaut:micronaut-validation" + implementation "javax.annotation:javax.annotation-api" implementation "io.micronaut:micronaut-http-server-netty" implementation "io.micronaut:micronaut-http-client" runtimeOnly "ch.qos.logback:logback-classic:1.2.3" diff --git a/hello-world-groovy/gradle.properties b/hello-world-groovy/gradle.properties index 4574e8b..e6517ec 100644 --- a/hello-world-groovy/gradle.properties +++ b/hello-world-groovy/gradle.properties @@ -1 +1 @@ -micronautVersion=1.3.3 \ No newline at end of file +micronautVersion=1.3.4 \ No newline at end of file From 0268cccc37bf0d821524b3236bcd917f80e1670f Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Mon, 11 May 2020 10:50:08 -0500 Subject: [PATCH 6/7] convert to mn version 1.3.5 --- hello-world-groovy/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello-world-groovy/gradle.properties b/hello-world-groovy/gradle.properties index e6517ec..e95c26f 100644 --- a/hello-world-groovy/gradle.properties +++ b/hello-world-groovy/gradle.properties @@ -1 +1 @@ -micronautVersion=1.3.4 \ No newline at end of file +micronautVersion=1.3.5 \ No newline at end of file From 701f4c3896d1bef89dc9e1143743d4151de3160f Mon Sep 17 00:00:00 2001 From: Holly Williams Date: Tue, 12 May 2020 09:58:48 -0500 Subject: [PATCH 7/7] added openapi code --- .../main/groovy/example/Application.groovy | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/hello-world-groovy/src/main/groovy/example/Application.groovy b/hello-world-groovy/src/main/groovy/example/Application.groovy index a93c26b..13b3152 100644 --- a/hello-world-groovy/src/main/groovy/example/Application.groovy +++ b/hello-world-groovy/src/main/groovy/example/Application.groovy @@ -15,11 +15,51 @@ */ package example +import groovy.transform.CompileStatic import io.micronaut.runtime.Micronaut +import io.swagger.v3.oas.annotations.ExternalDocumentation +import io.swagger.v3.oas.annotations.OpenAPIDefinition +import io.swagger.v3.oas.annotations.info.Contact +import io.swagger.v3.oas.annotations.info.Info +import io.swagger.v3.oas.annotations.info.License +import io.swagger.v3.oas.annotations.security.SecurityRequirement +import io.swagger.v3.oas.annotations.servers.Server +import io.swagger.v3.oas.annotations.servers.ServerVariable +import io.swagger.v3.oas.annotations.tags.Tag +@OpenAPIDefinition( + info = @Info( + title = "the title", + version = "0.0", + description = "My API", + license = @License(name = "Apache 2.0", url = "http://foo.bar"), + contact = @Contact(url = "http://gigantic-server.com", name = "Fred", email = "Fred@gigantic-server.com") + ), + tags = [ + @Tag(name = "Tag 1", description = "desc 1", externalDocs = @ExternalDocumentation(description = "docs desc")), + @Tag(name = "Tag 2", description = "desc 2", externalDocs = @ExternalDocumentation(description = "docs desc 2")), + @Tag(name = "Tag 3") + ], + externalDocs = @ExternalDocumentation(description = "definition docs desc"), + security = [ + @SecurityRequirement(name = "req 1", scopes = ["a", "b"]), + @SecurityRequirement(name = "req 2", scopes = ["b", "c"]) + ], + servers = [ + @Server( + description = "server 1", + url = "http://foo", + variables = [ + @ServerVariable(name = "var1", description = "var 1", defaultValue = "1", allowableValues = ["1", "2"]), + @ServerVariable(name = "var2", description = "var 2", defaultValue = "1", allowableValues = ["1", "2"]) + ]) + ] +) + +@CompileStatic class Application { static void main(String[] args) { - Micronaut.run(getClass()) + Micronaut.run(Application) } }