From da3ba4a5c77904f85088813d6106f0c8a6f311c7 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 22 Jun 2022 14:57:42 -0400 Subject: [PATCH 01/30] Testing --- accelerator.yaml | 6 ++++-- pom.xml | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index a7eba54d..fadbe125 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,12 +1,14 @@ accelerator: - displayName: Tanzu Java Web App - description: A sample Spring Boot web application built with Tanzu supply-chain + displayName: Tanzu Java Api Provider + description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: - java - spring - web - tanzu + - openAPI + - api options: - name: repositoryPrefix diff --git a/pom.xml b/pom.xml index 2f9fff47..263adf5b 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,12 @@ test + + org.springdoc + springdoc-openapi-ui + 1.6.9 + + org.springframework.boot From fb5f3329e3bea07bd9500db67e92bbde1407ff21 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 22 Jun 2022 15:01:23 -0400 Subject: [PATCH 02/30] Uploaded workload --- config/workload.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/workload.yaml b/config/workload.yaml index 218e13d7..7cf02a93 100644 --- a/config/workload.yaml +++ b/config/workload.yaml @@ -5,6 +5,9 @@ metadata: labels: apps.tanzu.vmware.com/workload-type: web app.kubernetes.io/part-of: tanzu-java-web-app + app.tanzu.vmware.com/register-api: "true" + annotations: + openapi-spec-endpoint: "/v3/api-docs" spec: params: - name: annotations From 5b897ab260348c43d3885d6b9773d3813dccaf49 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Thu, 23 Jun 2022 15:39:24 -0400 Subject: [PATCH 03/30] Added additional annotation --- config/workload.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/workload.yaml b/config/workload.yaml index 7cf02a93..764e10c8 100644 --- a/config/workload.yaml +++ b/config/workload.yaml @@ -6,6 +6,7 @@ metadata: apps.tanzu.vmware.com/workload-type: web app.kubernetes.io/part-of: tanzu-java-web-app app.tanzu.vmware.com/register-api: "true" + apps.tanzu.vmware.com/has-tests: "true" annotations: openapi-spec-endpoint: "/v3/api-docs" spec: From 908b82e643498082b2f4f1fc23ff53e460b08f26 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Mon, 27 Jun 2022 16:14:13 -0400 Subject: [PATCH 04/30] Adds option to not expose openAPI endpoint --- accelerator.yaml | 20 ++++++++++++++++++-- src/main/resources/application.yml | 7 ++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index fadbe125..b14a18f8 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Api Provider + displayName: Tanzu Java Api Provider (11) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -16,11 +16,21 @@ accelerator: label: Prefix for the container image repository defaultValue: dev.local required: true + - name: exposeOpenAPIEndpoint + label: Expose OpenAPI endpoint + inputType: select + display: true + defaultValue: "true" + choices: + - text: "true" + value: "true" + - text: "false" + value: "false" engine: merge: - include: [ "**/*" ] - exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**" ] + exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**", "src/main/resources/*.yml" ] - include: [ "config/*.yaml", "Tiltfile" ] chain: - type: ReplaceText @@ -45,3 +55,9 @@ engine: with: "#artifactId" - type: RewritePath rewriteTo: "#filename" + - include: [ "src/main/resources/*.yml" ] + chain: + - type: ReplaceText + substitutions: + - text: expose-open-api-endpoint + with: "#exposeOpenAPIEndpoint" diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 03ce5d08..dd9b3dc4 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -8,4 +8,9 @@ management: include: "*" endpoint: health: - show-details: always \ No newline at end of file + show-details: always + +springdoc: + api-docs: + enabled: expose-open-api-endpoint + From a2eb274c6f58518e97e9f7280c743384784b6fa6 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Tue, 28 Jun 2022 10:33:49 -0400 Subject: [PATCH 05/30] Testing --- accelerator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index b14a18f8..883ed093 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Api Provider (11) + displayName: Tanzu Java Spring Api Provider description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: From e5fdfa42004518a308d17078cca1bb7863a11ec4 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:08:33 -0400 Subject: [PATCH 06/30] Testing --- accelerator.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 883ed093..5c73278c 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider + displayName: Tanzu Java Spring Api Provider (20) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -16,6 +16,11 @@ accelerator: label: Prefix for the container image repository defaultValue: dev.local required: true + - name: toggle + label: Will This Project Expose an API? + display: true + dataType: boolean + defaultValue: true - name: exposeOpenAPIEndpoint label: Expose OpenAPI endpoint inputType: select From d6d38b0cbfcc68432d3e76029d951c4de1b67f4a Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:09:05 -0400 Subject: [PATCH 07/30] Testing --- accelerator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 5c73278c..c2fa1c43 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -31,7 +31,7 @@ accelerator: value: "true" - text: "false" value: "false" - +#Testing engine: merge: - include: [ "**/*" ] From fed109773b3e8782541162ca11a1f534c8355ace Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:11:26 -0400 Subject: [PATCH 08/30] Testing --- accelerator.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/accelerator.yaml b/accelerator.yaml index c2fa1c43..6384abce 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -21,6 +21,12 @@ accelerator: display: true dataType: boolean defaultValue: true + - name: exposeOpenAPIEndpoint2 + label: 'depends on toggle' + description: Visibility depends on the value of the toggle option being true. + dependsOn: + name: toggle + defaultValue: text value - name: exposeOpenAPIEndpoint label: Expose OpenAPI endpoint inputType: select From 27cda3dcba57a2ef4268888a13917c6e38ec7347 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:11:53 -0400 Subject: [PATCH 09/30] Testing --- accelerator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 6384abce..323621de 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (20) + displayName: Tanzu Java Spring Api Provider (21) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: From 48f7bd465e775bda9b0cc5b9fee5dfe83d2ad39e Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:16:23 -0400 Subject: [PATCH 10/30] Testing --- accelerator.yaml | 11 +++++++++-- pom.xml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 323621de..c8511a92 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (21) + displayName: Tanzu Java Spring Api Provider (22) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -41,7 +41,7 @@ accelerator: engine: merge: - include: [ "**/*" ] - exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**", "src/main/resources/*.yml" ] + exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**", "src/main/resources/*.yml", "pom.xml" ] - include: [ "config/*.yaml", "Tiltfile" ] chain: - type: ReplaceText @@ -72,3 +72,10 @@ engine: substitutions: - text: expose-open-api-endpoint with: "#exposeOpenAPIEndpoint" + + +# +# org.springdoc +# springdoc-openapi-ui +# 1.6.9 +# \ No newline at end of file diff --git a/pom.xml b/pom.xml index 263adf5b..8e87a228 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ test + org.springdoc springdoc-openapi-ui From cafc9f85b58acdcc901290598f25e3771764e5d4 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:20:23 -0400 Subject: [PATCH 11/30] Testing --- accelerator.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index c8511a92..6dda1c0c 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (22) + displayName: Tanzu Java Spring Api Provider (23) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -72,6 +72,13 @@ engine: substitutions: - text: expose-open-api-endpoint with: "#exposeOpenAPIEndpoint" + - include: [ "pom.xml" ] + chain: + - type: ReplaceText + condition: "#toggle" + substitutions: + - text: + with: "#artifactId" # From 621e13f496f8a501e01fa0d54b4cab03ec069ad9 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:26:57 -0400 Subject: [PATCH 12/30] Testing --- accelerator.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 6dda1c0c..fe3cc4ba 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (23) + displayName: Tanzu Java Spring Api Provider (24) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -79,6 +79,11 @@ engine: substitutions: - text: with: "#artifactId" + - type: ReplaceText + condition: "#toggle == false" + substitutions: + - text: + with: "" # From 133cb55a00d8df2d66a35157dfb2ddb3164ce383 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:28:48 -0400 Subject: [PATCH 13/30] Testing --- accelerator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index fe3cc4ba..f0b812a9 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (24) + displayName: Tanzu Java Spring Api Provider (25) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -83,7 +83,7 @@ engine: condition: "#toggle == false" substitutions: - text: - with: "" + with: "T" # From 9bf199013543a577c1f0f4e77f9fbe80d50e5d20 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:30:41 -0400 Subject: [PATCH 14/30] Testing --- accelerator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index f0b812a9..35309599 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (25) + displayName: Tanzu Java Spring Api Provider (26) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -80,7 +80,7 @@ engine: - text: with: "#artifactId" - type: ReplaceText - condition: "#toggle == false" + condition: "#toggle == 'false'" substitutions: - text: with: "T" From 8bd1e81a59869391b2421996aded8d15950f3cd1 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:31:45 -0400 Subject: [PATCH 15/30] Testing --- accelerator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 35309599..2c9faa0e 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -80,7 +80,7 @@ engine: - text: with: "#artifactId" - type: ReplaceText - condition: "#toggle == 'false'" + condition: "#toggle" substitutions: - text: with: "T" From f000531eb789b198d355e222382d8652fcf17d81 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:31:55 -0400 Subject: [PATCH 16/30] Testing --- accelerator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accelerator.yaml b/accelerator.yaml index 2c9faa0e..9ea3a0bb 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (26) + displayName: Tanzu Java Spring Api Provider (27) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: From 4b2ccdc64fe9b698c2d050e435784f959fbbb0e6 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:32:47 -0400 Subject: [PATCH 17/30] Testing --- accelerator.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 9ea3a0bb..41a4d121 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (27) + displayName: Tanzu Java Spring Api Provider (28) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -79,11 +79,11 @@ engine: substitutions: - text: with: "#artifactId" - - type: ReplaceText - condition: "#toggle" - substitutions: - - text: - with: "T" +# - type: ReplaceText +# condition: "#toggle" +# substitutions: +# - text: +# with: "T" # From 54dcc86ef381753ed58315ed010ad107c397d767 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:35:22 -0400 Subject: [PATCH 18/30] Testing --- accelerator.yaml | 4 ++-- pom.xml | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 41a4d121..75034f75 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (28) + displayName: Tanzu Java Spring Api Provider (29) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,7 @@ engine: condition: "#toggle" substitutions: - text: - with: "#artifactId" + with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" # substitutions: diff --git a/pom.xml b/pom.xml index 8e87a228..0062f742 100644 --- a/pom.xml +++ b/pom.xml @@ -43,11 +43,13 @@ - - org.springdoc - springdoc-openapi-ui - 1.6.9 - + + + + + + + From c286770d133229dc9209da321d5001ba81e9700c Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:38:43 -0400 Subject: [PATCH 19/30] Testing --- accelerator.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 75034f75..a753c4b2 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (29) + displayName: Tanzu Java Spring Api Provider (30) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,8 @@ engine: condition: "#toggle" substitutions: - text: - with: " \n org.springdoc" + with: "SAMPLE" +# with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" # substitutions: From 0298a06c55c00fa65eeea4379c8da10a96bbd56d Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:40:17 -0400 Subject: [PATCH 20/30] Testing --- accelerator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index a753c4b2..cb5c91fa 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (30) + displayName: Tanzu Java Spring Api Provider (31) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,7 @@ engine: condition: "#toggle" substitutions: - text: - with: "SAMPLE" + with: "'SAMPLE'" # with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" From 2521c9e8a92122795660cc783bcd6dcaf9d7480c Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:41:09 -0400 Subject: [PATCH 21/30] Testing --- accelerator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index cb5c91fa..52772d33 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (31) + displayName: Tanzu Java Spring Api Provider (32) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,7 @@ engine: condition: "#toggle" substitutions: - text: - with: "'SAMPLE'" + with: "' \n org.springdoc'" # with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" From 73a5285595ea966009be9957aa52cbdc559b81cc Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:42:43 -0400 Subject: [PATCH 22/30] Testing --- accelerator.yaml | 4 ++-- pom.xml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 52772d33..3c794ed5 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (32) + displayName: Tanzu Java Spring Api Provider (33) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,7 @@ engine: condition: "#toggle" substitutions: - text: - with: "' \n org.springdoc'" + with: "'\n org.springdoc\n springdoc-openapi-ui'" # with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" diff --git a/pom.xml b/pom.xml index 0062f742..8ff2a261 100644 --- a/pom.xml +++ b/pom.xml @@ -45,11 +45,11 @@ - - - - - + + org.springdoc + springdoc-openapi-ui + 1.6.9 + From 1b4e96ae888e89880c279305356758b6ef5a3049 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:44:44 -0400 Subject: [PATCH 23/30] Testing --- accelerator.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 3c794ed5..f159e98d 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (33) + displayName: Tanzu Java Spring Api Provider (34) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -78,7 +78,7 @@ engine: condition: "#toggle" substitutions: - text: - with: "'\n org.springdoc\n springdoc-openapi-ui'" + with: "'\n org.springdoc\n springdoc-openapi-ui\n 1.6.9\n '" # with: " \n org.springdoc" # - type: ReplaceText # condition: "#toggle" From e5914b47bab4cc8009965ec85f322a7e79079d89 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 10:49:19 -0400 Subject: [PATCH 24/30] Testing --- accelerator.yaml | 12 ++++++------ pom.xml | 7 ------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index f159e98d..38bfb66f 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (34) + displayName: Tanzu Java Spring Api Provider (35) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -80,11 +80,11 @@ engine: - text: with: "'\n org.springdoc\n springdoc-openapi-ui\n 1.6.9\n '" # with: " \n org.springdoc" -# - type: ReplaceText -# condition: "#toggle" -# substitutions: -# - text: -# with: "T" + - type: ReplaceText + condition: "#toggle" + substitutions: + - text: + with: "'T'" # diff --git a/pom.xml b/pom.xml index 8ff2a261..d95d87ed 100644 --- a/pom.xml +++ b/pom.xml @@ -44,13 +44,6 @@ - - - org.springdoc - springdoc-openapi-ui - 1.6.9 - - org.springframework.boot From bad66905eeaf7e42e12b72a00b986dbfbb918996 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 12:50:23 -0400 Subject: [PATCH 25/30] Testing --- accelerator.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 38bfb66f..2c650c00 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (35) + displayName: Tanzu Java Spring Api Provider (36) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -79,7 +79,6 @@ engine: substitutions: - text: with: "'\n org.springdoc\n springdoc-openapi-ui\n 1.6.9\n '" -# with: " \n org.springdoc" - type: ReplaceText condition: "#toggle" substitutions: From c72ab651e089c5741f481946bded7c6755797a47 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 13:08:01 -0400 Subject: [PATCH 26/30] Testing --- accelerator.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index 2c650c00..fb9e132e 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (36) + displayName: Tanzu Java Spring Api Provider (37) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -80,14 +80,7 @@ engine: - text: with: "'\n org.springdoc\n springdoc-openapi-ui\n 1.6.9\n '" - type: ReplaceText - condition: "#toggle" + condition: "!#toggle" substitutions: - text: with: "'T'" - - -# -# org.springdoc -# springdoc-openapi-ui -# 1.6.9 -# \ No newline at end of file From 4fdfdb07c274fa69c034a2f793af5a78d327cca0 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 13:13:11 -0400 Subject: [PATCH 27/30] Testing --- accelerator.yaml | 40 +++++++++------------------------------- pom.xml | 2 +- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index fb9e132e..f678e378 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (37) + displayName: Tanzu Java Spring Api Provider (38) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -16,32 +16,16 @@ accelerator: label: Prefix for the container image repository defaultValue: dev.local required: true - - name: toggle + - name: exposeOpenAPIEndpoint label: Will This Project Expose an API? display: true dataType: boolean defaultValue: true - - name: exposeOpenAPIEndpoint2 - label: 'depends on toggle' - description: Visibility depends on the value of the toggle option being true. - dependsOn: - name: toggle - defaultValue: text value - - name: exposeOpenAPIEndpoint - label: Expose OpenAPI endpoint - inputType: select - display: true - defaultValue: "true" - choices: - - text: "true" - value: "true" - - text: "false" - value: "false" -#Testing + engine: merge: - include: [ "**/*" ] - exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**", "src/main/resources/*.yml", "pom.xml" ] + exclude: [ "config/*.yaml", "Tiltfile", "README.md", "grype.yaml", "catalog/*.yaml", ".github/workflows/**", "pom.xml" ] - include: [ "config/*.yaml", "Tiltfile" ] chain: - type: ReplaceText @@ -66,21 +50,15 @@ engine: with: "#artifactId" - type: RewritePath rewriteTo: "#filename" - - include: [ "src/main/resources/*.yml" ] - chain: - - type: ReplaceText - substitutions: - - text: expose-open-api-endpoint - with: "#exposeOpenAPIEndpoint" - include: [ "pom.xml" ] chain: - type: ReplaceText - condition: "#toggle" + condition: "#exposeOpenAPIEndpoint" substitutions: - - text: + - text: with: "'\n org.springdoc\n springdoc-openapi-ui\n 1.6.9\n '" - type: ReplaceText - condition: "!#toggle" + condition: "!#exposeOpenAPIEndpoint" substitutions: - - text: - with: "'T'" + - text: + with: "''" diff --git a/pom.xml b/pom.xml index d95d87ed..044a8f01 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ test - + From ace72ef71a5dcdc4b639e51e7d1ffe5893081af9 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 29 Jun 2022 13:23:27 -0400 Subject: [PATCH 28/30] Testing --- accelerator.yaml | 6 +++--- pom.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index f678e378..f726b8b0 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (38) + displayName: Tanzu Java Spring Api Provider (39) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: @@ -17,10 +17,10 @@ accelerator: defaultValue: dev.local required: true - name: exposeOpenAPIEndpoint - label: Will This Project Expose an API? + label: Expose OpenAPI endpoint? display: true dataType: boolean - defaultValue: true + defaultValue: false engine: merge: diff --git a/pom.xml b/pom.xml index 044a8f01..fe094192 100644 --- a/pom.xml +++ b/pom.xml @@ -42,8 +42,6 @@ test - - org.springframework.boot @@ -51,6 +49,8 @@ true + + From c7f6994e222220dc3f89e5d5ac64f123e3ec529c Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 17 Aug 2022 13:15:04 -0400 Subject: [PATCH 29/30] Testing --- accelerator.yaml | 2 +- config/workload.yaml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/accelerator.yaml b/accelerator.yaml index f726b8b0..3cf1a9c9 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -1,5 +1,5 @@ accelerator: - displayName: Tanzu Java Spring Api Provider (39) + displayName: Tanzu Java Spring Api Provider (40) description: A sample Spring Boot web application built with Tanzu supply-chain that uses sprindocs to generate an openAPI document. iconUrl: https://github.com/sample-accelerators/icons/raw/master/icon-boot.png tags: diff --git a/config/workload.yaml b/config/workload.yaml index 764e10c8..5ee1553f 100644 --- a/config/workload.yaml +++ b/config/workload.yaml @@ -7,13 +7,19 @@ metadata: app.kubernetes.io/part-of: tanzu-java-web-app app.tanzu.vmware.com/register-api: "true" apps.tanzu.vmware.com/has-tests: "true" - annotations: - openapi-spec-endpoint: "/v3/api-docs" + apis.apps.tanzu.vmware.com/register-api: "true" spec: params: - name: annotations value: autoscaling.knative.dev/minScale: "1" + - name: api_descriptor + value: + type: openapi + location: + path: "/v3/api-docs" + owner: team-petclinic + description: "A set of API endpoints to manage the resources within the petclinic app." source: git: url: https://github.com/sample-accelerators/tanzu-java-web-app From 1e703e833b5a4e098d5d480180dfe5494dfa98c8 Mon Sep 17 00:00:00 2001 From: Joel Shaffer Date: Wed, 17 Aug 2022 14:00:48 -0400 Subject: [PATCH 30/30] Removed expose-open-api-endpoint from properties file --- src/main/resources/application.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index dd9b3dc4..d614a3a5 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -10,7 +10,3 @@ management: health: show-details: always -springdoc: - api-docs: - enabled: expose-open-api-endpoint -