Skip to content

Commit 3c9ac29

Browse files
Dewey joseDewey jose
authored andcommitted
fixed javadoc
1 parent 7cf87f9 commit 3c9ac29

File tree

6 files changed

+49
-18
lines changed

6 files changed

+49
-18
lines changed

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/Logger.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
import org.apache.maven.plugin.logging.Log;
44
import org.slf4j.helpers.MessageFormatter;
55

6-
/**
7-
* Logger class for logging messages to the Maven logger.
8-
*/
6+
/** Logger class for logging messages to the Maven logger. */
97
public class Logger {
108
private static volatile Log mavenLog;
119

12-
/**
13-
* Private constructor to prevent instantiation.
14-
*/
10+
/** Private constructor to prevent instantiation. */
1511
private Logger() {}
1612

1713
/**
@@ -61,6 +57,7 @@ public static void warn(String format, Object... args) {
6157

6258
/**
6359
* Logs an error message.
60+
*
6461
* @param format
6562
* @param args
6663
*/

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/parameters/IntrospectionRequest.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,33 @@
44
import lombok.Getter;
55
import lombok.Setter;
66

7+
/**
8+
* Represents a request for introspection of a GraphQL schema.
9+
*/
710
@Getter
811
@Setter
912
public class IntrospectionRequest {
13+
/**
14+
* The URL of the GraphQL endpoint to introspect.
15+
*/
1016
private String url;
17+
18+
/**
19+
* The query to use for the introspection.
20+
*/
1121
private String query;
22+
/**
23+
* The operation name for the introspection query.
24+
*/
1225
private String operationName;
26+
27+
/**
28+
* Additional HTTP headers to include in the introspection request.
29+
*/
1330
private Map<String, String> headers;
1431

15-
public IntrospectionRequest() {}
32+
/**
33+
* Constructs a new IntrospectionRequest.
34+
*/
35+
public IntrospectionRequest() {}
1636
}

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/services/Constants.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
package io.github.deweyjose.graphqlcodegen.services;
22

3+
/**
4+
* Constants for the GraphQL code generator.
5+
*/
36
public class Constants {
7+
/**
8+
* The default operation name for the introspection query.
9+
*/
410
public static final String DEFAULT_OPERATION_NAME = "IntrospectionQuery";
11+
12+
/**
13+
* The default query for the introspection query.
14+
*/
515
public static final String DEFAULT_QUERY =
616
"""
717
query IntrospectionQuery {

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/services/RemoteSchemaService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public String getRemoteSchemaFile(String url) throws IOException, InterruptedExc
7575
* @param operation the introspection operation (query and operation name)
7676
* @param headers additional HTTP headers to include in the request
7777
* @return the GraphQL schema SDL as a String
78-
* @throws IOException if the request fails or returns a non-200 status
7978
*/
8079
@SneakyThrows
8180
public String getIntrospectedSchemaFile(

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/services/SchemaFileService.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,23 @@ public class SchemaFileService {
3030
private Set<File> schemaPaths;
3131
private List<File> schemaJarFilesFromDependencies;
3232

33+
/**
34+
* Constructs a new SchemaFileService with the given output directory and manifest.
35+
*
36+
* @param outputDir the output directory to save the schema files
37+
* @param manifest the manifest service to use
38+
*/
3339
public SchemaFileService(File outputDir, SchemaManifestService manifest) {
3440
this(outputDir, manifest, new RemoteSchemaService());
3541
}
3642

43+
/**
44+
* Constructs a new SchemaFileService with the given output directory, manifest, and remote schema service.
45+
*
46+
* @param outputDir the output directory to save the schema files
47+
* @param manifest the manifest service to use
48+
* @param remoteSchemaService the remote schema service to use
49+
*/
3750
public SchemaFileService(
3851
File outputDir, SchemaManifestService manifest, RemoteSchemaService remoteSchemaService) {
3952
this.schemaPaths = new HashSet<>();
@@ -80,8 +93,6 @@ public void loadSchemaJarFilesFromDependencies(
8093
* schemaPaths.
8194
*
8295
* @param schemaUrls the array of schema URLs to load
83-
* @throws IOException if an I/O error occurs while saving the schema
84-
* @throws InterruptedException if the thread is interrupted while fetching the schema
8596
*/
8697
@SneakyThrows
8798
public void loadSchemaUrls(String[] schemaUrls) {
@@ -95,8 +106,6 @@ public void loadSchemaUrls(String[] schemaUrls) {
95106
* Loads introspected schemas from the given collection of IntrospectionRequest objects.
96107
*
97108
* @param schemaUrls the collection of IntrospectionRequest objects to load
98-
* @throws IOException if an I/O error occurs while saving the schema
99-
* @throws InterruptedException if the thread is interrupted while fetching the schema
100109
*/
101110
@SneakyThrows
102111
public void loadIntrospectedSchemas(Collection<IntrospectionRequest> schemaUrls) {

graphqlcodegen-maven-plugin/src/main/java/io/github/deweyjose/graphqlcodegen/services/SchemaManifestService.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ public SchemaManifestService(File manifestDir, File projectPath) {
4949
* Generates an MD5 checksum for the given file.
5050
*
5151
* @param path the file to checksum
52-
* @return the checksum as a hex string
53-
* @throws java.io.IOException if an I/O error occurs reading the file
54-
* @throws java.security.NoSuchAlgorithmException if MD5 algorithm is not available
52+
* @return the checksum as a hex string
5553
*/
5654
@SneakyThrows
5755
public static String generateChecksum(File path) {
@@ -94,9 +92,7 @@ public Set<File> getChangedFiles() {
9492
}
9593

9694
/**
97-
* Syncs the manifest with the current set of files, writing their checksums to disk.
98-
*
99-
* @throws java.io.IOException if an I/O error occurs writing the manifest
95+
* Syncs the manifest with the files.
10096
*/
10197
@SneakyThrows
10298
public void syncManifest() {

0 commit comments

Comments
 (0)