From ec4b07f87c1e345b0e8b66954d4b0afbf8e18ede Mon Sep 17 00:00:00 2001 From: Sophie Janssens Date: Wed, 2 Jun 2021 13:26:15 +0200 Subject: [PATCH 1/2] Fix: added documentation for artifact input feature --- boat-maven-plugin/README.md | 59 +++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/boat-maven-plugin/README.md b/boat-maven-plugin/README.md index baa931737..0d01cbd92 100644 --- a/boat-maven-plugin/README.md +++ b/boat-maven-plugin/README.md @@ -23,6 +23,8 @@ defined on openapi-generator-maven-plugin can be applied here too. Boat maven plugin uses slightly modified templates for html, java and webclient that help generate specs and clients that work best in a Backbase projects. +All inputSpec parameters for this goal may additionally be configured as an artifact. See [Example inputMavenArtifact parameter](#example-inputMavenArtifact-parameter) or integration tests for examples. + ## boat:generate-spring-boot-embedded Same with `generate` but with opinionated defaults for Spring @@ -152,7 +154,11 @@ Available parameters: inputSpec Required: true Input spec directory or file. - + Optionaly inputMavenArtifact parameter can be used instead to configure an artifact input. + + inputMavenArtifact + Input spec artifact + output (Default: ${project.build.directory}/boat-lint-reports) Output directory for lint reports. @@ -171,12 +177,15 @@ Example: ${ignored-lint-rules} true + +To see details and an example of inputMavenArtifact: + [Example inputMavenArtifact parameter](#example-inputMavenArtifact-parameter) To see details about this goal: mvn help:describe -DgroupId=com.backbase.oss -DartifactId=boat-maven-plugin -Dgoal=lint -Ddetail` - - + + ## boat:bundle Bundles a spec by resolving external references. @@ -321,3 +330,47 @@ Configuration example ``` + +## Example inputMavenArtifact parameter + +Example: + +```$xml + + com.backbase.oss.boat.example + openapi-zips + 1.0.0-SNAPSHOT + api + zip + presentation-client-api/openapi.yaml + +``` + +Parameters: + + groupId + Required: true + Input artifacts groupId + artifactId + Required: true + Input artifacts artifactId + version + Required: true + Input artifacts version + classifier + Required: true + Input artifacts classifier (must be api) + type + Required: true + Input artifacts type (must be zip) + fileName + Required: true + directory or file in artifact to be processed by goal + + +This parameter is available as a replacement for the inputSpec parameter in goals [generate](#boat:generate) and [lint](#boat:lint). + +It downloads a copy of the artifact if it is not already present, and uses a specified spec (or directory of specs) +from the artifact as the inputSpec for the goal. + +More examples can be found in integration tests. \ No newline at end of file From cbc6b61db6f4354b88d8d79b6102386655f11b78 Mon Sep 17 00:00:00 2001 From: Sophie Janssens Date: Mon, 7 Jun 2021 14:24:47 +0200 Subject: [PATCH 2/2] Fix: link to relevant it tests for config examples --- boat-maven-plugin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boat-maven-plugin/README.md b/boat-maven-plugin/README.md index 0d01cbd92..0e340c274 100644 --- a/boat-maven-plugin/README.md +++ b/boat-maven-plugin/README.md @@ -23,7 +23,7 @@ defined on openapi-generator-maven-plugin can be applied here too. Boat maven plugin uses slightly modified templates for html, java and webclient that help generate specs and clients that work best in a Backbase projects. -All inputSpec parameters for this goal may additionally be configured as an artifact. See [Example inputMavenArtifact parameter](#example-inputMavenArtifact-parameter) or integration tests for examples. +All inputSpec parameters for this goal may additionally be configured as an artifact. See [Example inputMavenArtifact parameter](#example-inputMavenArtifact-parameter) or [integration tests](https://github.com/Backbase/backbase-openapi-tools/tree/main/boat-maven-plugin/src/it/example/boat-artifact-input) for examples. ## boat:generate-spring-boot-embedded