Skip to content

Commit

Permalink
java: Suppress warnings for missing javadoc (#128)
Browse files Browse the repository at this point in the history
And test it in CI
  • Loading branch information
mpkorstanje authored Dec 17, 2022
1 parent bd20f68 commit 4cee52d
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ jobs:

- run: mvn test
working-directory: java

- run: mvn clean package javadoc:jar -DskipTests=true
working-directory: java

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOption>-Xdoclint:all,-missing</additionalJOption>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> getMessage() {
return Optional.ofNullable(message);
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/Attachment.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/Exception.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions perl/lib/Cucumber/Messages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions php/src-generated/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 1 addition & 1 deletion php/src-generated/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) {
Expand Down
8 changes: 4 additions & 4 deletions ruby/lib/cucumber/messages.dtos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 4cee52d

Please sign in to comment.