Skip to content

Commit 4ee21c0

Browse files
committed
Update README.md
1 parent dee019b commit 4ee21c0

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

README.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,39 @@ Please refer to:
1313

1414
## Supported Options
1515

16-
| Key | Data Type | Default value | Description |
17-
| ------------------------- | ------------------ | ------------------------------------- | ----------- |
18-
| graphqlSchemaPaths | List(String) | None | GraphQL schema locations. You can supply multiple paths to GraphQL schemas. |
19-
| packageName | String | Empty | Java package for generated classes. |
20-
| outputDir | String | None | The output target directory into which code will be generated. |
21-
| apiPackage | String | Empty | Java package for generated api classes (Query, Mutation, Subscription). |
22-
| modelPackage | String | Empty | Java package for generated model classes (type, input, interface, enum, union). |
23-
| generateApis | Boolean | True | Specifies whether api classes should be generated as well as model classes. |
24-
| customTypesMapping | Map(String,String) | Empty | Can be used to supply custom mappings for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaType) <br/> * Map of (GraphqlType) to (JavaType) |
25-
| customAnnotationsMapping | Map(String,String) | Empty | Can be used to supply custom annotations (serializers) for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaType) <br/> * Map of (GraphqlType) to (JavaType) |
16+
| Key | Data Type | Default value | Description |
17+
| ------------------------- | ------------------ | ----------------------------------------- | ----------- |
18+
| graphqlSchemaPaths | List(String) | None | GraphQL schema locations. You can supply multiple paths to GraphQL schemas. |
19+
| packageName | String | Empty | Java package for generated classes. |
20+
| outputDir | String | None | The output target directory into which code will be generated. |
21+
| apiPackage | String | Empty | Java package for generated api classes (Query, Mutation, Subscription). |
22+
| modelPackage | String | Empty | Java package for generated model classes (type, input, interface, enum, union). |
23+
| generateApis | Boolean | True | Specifies whether api classes should be generated as well as model classes. |
24+
| customTypesMapping | Map(String,String) | Empty | Can be used to supply custom mappings for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaType) <br/> * Map of (GraphqlType) to (JavaType) |
25+
| customAnnotationsMapping | Map(String,String) | Empty | Can be used to supply custom annotations (serializers) for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaType) <br/> * Map of (GraphqlType) to (JavaType) |
2626
| modelValidationAnnotation | String | @javax.validation.<br>constraints.NotNull | Annotation for mandatory (NonNull) fields. Can be null/empty. |
27-
| modelNamePrefix | String | Empty | Sets the prefix for GraphQL model classes (type, input, interface, enum, union). |
28-
| modelNameSuffix | String | Empty | Sets the suffix for GraphQL model classes (type, input, interface, enum, union). |
29-
| subscriptionReturnType | String | Empty | Return type for subscription methods. For example: `org.reactivestreams.Publisher`, `io.reactivex.Observable`, etc. |
30-
| generateEqualsAndHashCode | Boolean | False | Specifies whether generated model classes should have equals and hashCode methods defined. |
31-
| generateToString | Boolean | False | Specifies whether generated model classes should have toString method defined. |
32-
33-
### Inspired by
27+
| modelNamePrefix | String | Empty | Sets the prefix for GraphQL model classes (type, input, interface, enum, union). |
28+
| modelNameSuffix | String | Empty | Sets the suffix for GraphQL model classes (type, input, interface, enum, union). |
29+
| subscriptionReturnType | String | Empty | Return type for subscription methods. For example: `org.reactivestreams.Publisher`, `io.reactivex.Observable`, etc. |
30+
| generateEqualsAndHashCode | Boolean | False | Specifies whether generated model classes should have equals and hashCode methods defined. |
31+
| generateToString | Boolean | False | Specifies whether generated model classes should have toString method defined. |
32+
| jsonConfigurationFile | String | Empty | Path to an external mapping configuration. |
33+
34+
### External mapping configuration
35+
36+
Provide a path to external file via property `jsonConfigurationFile`
37+
Sample content of the file:
38+
39+
```json
40+
{
41+
"generateApis": true,
42+
"packageName": "com.kobylynskyi.graphql.testconfigjson",
43+
"customTypesMapping": {
44+
"Price.amount": "java.math.BigDecimal"
45+
}
46+
}
47+
```
48+
49+
## Inspired by
3450
[swagger-codegen](https://github.com/swagger-api/swagger-codegen)
3551

0 commit comments

Comments
 (0)