Skip to content

Commit

Permalink
feat: integrate DGS codegen 6.2.4 and add support for date suppressio…
Browse files Browse the repository at this point in the history
…n in Generated annotation
  • Loading branch information
deweyjose committed Aug 23, 2024
1 parent 847f616 commit bc7908a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,17 @@ Example
<generateIsGetterForPrimitiveBooleanFields>false</generateIsGetterForPrimitiveBooleanFields>
```

## disableDatesInGeneratedAnnotation

- Type: boolean
- Required: false
- Default: false

Example

```xml
<disableDatesInGeneratedAnnotation>true</disableDatesInGeneratedAnnotation>
```

# Usage

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>io.github.deweyjose</groupId>
<artifactId>graphqlcodegen-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.61.2</version>
<version>1.61.3</version>

<name>GraphQL Code Generator</name>
<description>Maven port of the Netflix DGS GraphQL Codegen gradle build plugin</description>
Expand Down Expand Up @@ -35,7 +35,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<graphql-dgs-codegen-core.version>6.2.2</graphql-dgs-codegen-core.version>
<graphql-dgs-codegen-core.version>6.2.4</graphql-dgs-codegen-core.version>
<java.version>1.8</java.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/io/github/deweyjose/graphqlcodegen/Codegen.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ public class Codegen extends AbstractMojo {
@Parameter(property = "onlyGenerateChanged", defaultValue = "true")
private boolean onlyGenerateChanged;

@Parameter(property = "disableDatesInGeneratedAnnotation", defaultValue = "false")
private boolean disableDatesInGeneratedAnnotation;

@Parameter(property = "generateIsGetterForPrimitiveBooleanFields", defaultValue = "false")
private boolean generateIsGetterForPrimitiveBooleanFields;

Expand Down Expand Up @@ -244,6 +247,7 @@ public void execute() {
});
}


final CodeGenConfig config = new CodeGenConfig(
emptySet(),
schemaPaths,
Expand Down Expand Up @@ -286,6 +290,7 @@ public void execute() {
javaGenerateAllConstructor,
implementSerializable,
addGeneratedAnnotation,
disableDatesInGeneratedAnnotation,
addDeprecatedAnnotation
);

Expand Down

0 comments on commit bc7908a

Please sign in to comment.