From 4cee52d8d72f564bf64a1adaaeddb2a19dfe1db2 Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Sat, 17 Dec 2022 15:11:42 +0100 Subject: [PATCH] java: Suppress warnings for missing javadoc (#128) And test it in CI --- .github/workflows/test-java.yml | 4 ++++ CHANGELOG.md | 2 ++ java/pom.xml | 7 +++++++ .../java/io/cucumber/messages/types/Attachment.java | 6 +++--- .../java/io/cucumber/messages/types/Exception.java | 2 +- jsonschema/Attachment.json | 2 +- jsonschema/Exception.json | 2 +- messages.md | 2 +- perl/lib/Cucumber/Messages.pm | 8 ++++---- php/src-generated/Attachment.php | 6 +++--- php/src-generated/Exception.php | 2 +- ruby/lib/cucumber/messages.dtos.rb | 8 ++++---- 12 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test-java.yml b/.github/workflows/test-java.yml index 7ba04d21..58ad458e 100644 --- a/.github/workflows/test-java.yml +++ b/.github/workflows/test-java.yml @@ -61,3 +61,7 @@ jobs: - run: mvn test working-directory: java + + - run: mvn clean package javadoc:jar -DskipTests=true + working-directory: java + diff --git a/CHANGELOG.md b/CHANGELOG.md index ad6ab43e..6f7b3c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- [Java] Suppress warnings for missing javadoc ([#128](https://github.com/cucumber/messages/pull/128)) ## [21.0.0] - 2022-12-17 ### Added diff --git a/java/pom.xml b/java/pom.xml index 7bff87eb..7a53e1ac 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -112,6 +112,13 @@ true + + org.apache.maven.plugins + maven-javadoc-plugin + + -Xdoclint:all,-missing + + diff --git a/java/src/generated/java/io/cucumber/messages/types/Attachment.java b/java/src/generated/java/io/cucumber/messages/types/Attachment.java index 8250ac11..91e3fe25 100644 --- a/java/src/generated/java/io/cucumber/messages/types/Attachment.java +++ b/java/src/generated/java/io/cucumber/messages/types/Attachment.java @@ -70,9 +70,9 @@ public String getBody() { * Content encoding is *not* determined by the media type, but rather by the type * of the object being attached: * - * - string => IDENTITY - * - byte array => BASE64 - * - stream => BASE64 + * - string: IDENTITY + * - byte array: BASE64 + * - stream: BASE64 */ public AttachmentContentEncoding getContentEncoding() { return contentEncoding; diff --git a/java/src/generated/java/io/cucumber/messages/types/Exception.java b/java/src/generated/java/io/cucumber/messages/types/Exception.java index cd71808e..d29a505a 100644 --- a/java/src/generated/java/io/cucumber/messages/types/Exception.java +++ b/java/src/generated/java/io/cucumber/messages/types/Exception.java @@ -35,7 +35,7 @@ public String getType() { } /** - * The message of exception that caused this result. E.g. expected: <"a"> but was: <"b"> + * The message of exception that caused this result. E.g. expected: "a" but was: "b" */ public Optional getMessage() { return Optional.ofNullable(message); diff --git a/jsonschema/Attachment.json b/jsonschema/Attachment.json index d1ebd2c0..91de12c9 100644 --- a/jsonschema/Attachment.json +++ b/jsonschema/Attachment.json @@ -14,7 +14,7 @@ "type": "string" }, "contentEncoding": { - "description": "*\n Whether to interpret `body` \"as-is\" (IDENTITY) or if it needs to be Base64-decoded (BASE64).\n\n Content encoding is *not* determined by the media type, but rather by the type\n of the object being attached:\n\n - string => IDENTITY\n - byte array => BASE64\n - stream => BASE64", + "description": "*\n Whether to interpret `body` \"as-is\" (IDENTITY) or if it needs to be Base64-decoded (BASE64).\n\n Content encoding is *not* determined by the media type, but rather by the type\n of the object being attached:\n\n - string: IDENTITY\n - byte array: BASE64\n - stream: BASE64", "enum": [ "IDENTITY", "BASE64" diff --git a/jsonschema/Exception.json b/jsonschema/Exception.json index 56240dd9..a8187b58 100644 --- a/jsonschema/Exception.json +++ b/jsonschema/Exception.json @@ -13,7 +13,7 @@ }, "message": { "type": "string", - "description": "The message of exception that caused this result. E.g. expected: <\"a\"> but was: <\"b\">" + "description": "The message of exception that caused this result. E.g. expected: \"a\" but was: \"b\"" } }, "type": "object" diff --git a/messages.md b/messages.md index 0e17206d..8c89a599 100644 --- a/messages.md +++ b/messages.md @@ -49,8 +49,8 @@ will only have one of its fields set, which indicates the payload of the message | Field | Type | Required | Description | | ----- | ---- | ----------- | ----------- | +| `type` | string | yes | | | `message` | string | no | | -| `type` | string | no | | ## GherkinDocument diff --git a/perl/lib/Cucumber/Messages.pm b/perl/lib/Cucumber/Messages.pm index 4df84b3c..b9422498 100644 --- a/perl/lib/Cucumber/Messages.pm +++ b/perl/lib/Cucumber/Messages.pm @@ -120,9 +120,9 @@ has body => Content encoding is *not* determined by the media type, but rather by the type of the object being attached: - - string => IDENTITY - - byte array => BASE64 - - stream => BASE64 + - string: IDENTITY + - byte array: BASE64 + - stream: BASE64 Available constants for valid values of this field: @@ -571,7 +571,7 @@ has type => =head4 message -The message of exception that caused this result. E.g. expected: <"a"> but was: <"b"> +The message of exception that caused this result. E.g. expected: "a" but was: "b" =cut diff --git a/php/src-generated/Attachment.php b/php/src-generated/Attachment.php index 155eefd6..8bf48b2f 100644 --- a/php/src-generated/Attachment.php +++ b/php/src-generated/Attachment.php @@ -49,9 +49,9 @@ public function __construct( * Content encoding is *not* determined by the media type, but rather by the type * of the object being attached: * - * - string => IDENTITY - * - byte array => BASE64 - * - stream => BASE64 + * - string: IDENTITY + * - byte array: BASE64 + * - stream: BASE64 */ public readonly Attachment\ContentEncoding $contentEncoding = Attachment\ContentEncoding::IDENTITY, diff --git a/php/src-generated/Exception.php b/php/src-generated/Exception.php index 7883e913..dca44cac 100644 --- a/php/src-generated/Exception.php +++ b/php/src-generated/Exception.php @@ -32,7 +32,7 @@ public function __construct( public readonly string $type = '', /** - * The message of exception that caused this result. E.g. expected: <"a"> but was: <"b"> + * The message of exception that caused this result. E.g. expected: "a" but was: "b" */ public readonly ?string $message = null, ) { diff --git a/ruby/lib/cucumber/messages.dtos.rb b/ruby/lib/cucumber/messages.dtos.rb index c71d373a..a0268b3f 100644 --- a/ruby/lib/cucumber/messages.dtos.rb +++ b/ruby/lib/cucumber/messages.dtos.rb @@ -41,9 +41,9 @@ class Attachment < ::Cucumber::Messages::Message # Content encoding is *not* determined by the media type, but rather by the type # of the object being attached: # - # - string => IDENTITY - # - byte array => BASE64 - # - stream => BASE64 + # - string: IDENTITY + # - byte array: BASE64 + # - stream: BASE64 attr_reader :content_encoding @@ -237,7 +237,7 @@ class Exception < ::Cucumber::Messages::Message attr_reader :type ## - # The message of exception that caused this result. E.g. expected: <"a"> but was: <"b"> + # The message of exception that caused this result. E.g. expected: "a" but was: "b" attr_reader :message