Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
import org.talend.sdk.component.api.meta.Documentation;

@Ui
@Documentation("Advanced layout to place properties by row, this is exclusive with `@OptionsOrder`.\n"
+ "\nNOTE: the logic to handle forms (gridlayout names) is to use the only layout if there is only one defined, "
+ "else to check if there are `Main` and `Advanced` and if at least `Main` exists, use them, else "
+ "use all available layouts.")
@Documentation("""
Advanced layout to place properties by row, this is exclusive with `@OptionsOrder`.

NOTE: the logic to handle forms (gridlayout names) is to use the only layout if there is only one defined, \
else to check if there are `Main` and `Advanced` and if at least `Main` exists, use them, else \
use all available layouts.""")
@Target(TYPE)
@Retention(RUNTIME)
@Repeatable(GridLayouts.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
@ActionType(value = "validation", expectedReturnedType = ValidationResult.class)
@Target(METHOD)
@Retention(RUNTIME)
@Documentation("Mark a method as being used to validate a configuration.\n\nIMPORTANT: this is a server validation "
+ "so only use it if you can't use other client side validation to implement it.")
@Documentation("""
Mark a method as being used to validate a configuration.

IMPORTANT: this is a server validation \
so only use it if you can't use other client side validation to implement it.""")
public @interface AsyncValidation {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@
import lombok.Data;
import lombok.NoArgsConstructor;

@Partial("This API should support nested schema but the Studio is not yet ready.\n\n"
+ "The cloud platform also doesn't use it yet.\n\nAlso prefer to use "
+ "`org.talend.sdk.component.api.record.Schema` over this partial default implementation.")
@Partial("""
This API should support nested schema but the Studio is not yet ready.

The cloud platform also doesn't use it yet.

Also prefer to use \
`org.talend.sdk.component.api.record.Schema` over this partial default implementation.""")
@Data
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,36 @@ public interface BulkReadResource {
description = "The request payloads.",
content = @Content(mediaType = APPLICATION_JSON))
CompletionStage<BulkResponses> bulk(@RequestBody(
description = "The requests list as json objects containing a list of request objects. \n" +
"If your request contains multiple identifiers, you must use a list of string. \n" +
"Example : \n" +
"`{ \n" +
"\"requests\" : [ \n" +
"{ \n" +
" \"path\" : \"/api/v1/component/index\", \n" +
" \"queryParameters\" : {\"identifiers\" : [\"12345\", \"6789A\"]}, \n" +
" \"verb\" : \"GET\", \n" +
" \"headers\" : {...}, \n" +
"}, \n" +
"{ [...]} \n" +
"] \n" +
"}`",
description = """
The request body is a JSON object containing a list of request objects.
If your request contains multiple identifiers, you must use a list of strings.
Example:

```json
{
"requests": [
{
"path": "/api/v1/component/index",
"queryParameters": {
"identifiers": [
"12345",
"6789A"
]
},
"verb": "GET",
"headers": {}
},
{
"path": "/api/v1/component/details",
"queryParameters": {
"identifier": "12345"
},
"verb": "GET",
"headers": {}
}
]
}
```""",
required = true,
content = @Content(mediaType = APPLICATION_JSON)) final BulkRequests requests);
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ public class ComponentServerConfiguration {
private Boolean supportsEnvironment;

@Inject
@Documentation("A folder available for the server - don't forget to mount it in docker if you are using the "
+ "image - which accepts subfolders named as component plugin id "
+ "(generally the artifactId or jar name without the version, ex: jdbc). Each family folder can contain:\n\n"
+ "- a `user-configuration.properties` file which will be merged with component configuration system "
+ "(see services). This properties file enables the function `userJar(xxxx)` to replace the jar named `xxxx` "
+ "by its virtual gav (`groupId:artifactId:version`),\n"
+ "- a list of jars which will be merged with component family classpath\n")
@Documentation("""
A folder available for the server - don't forget to mount it in docker if you are using the \
image - which accepts subfolders named as component plugin id \
(generally the artifactId or jar name without the version, ex: jdbc). Each family folder can contain:

- a `user-configuration.properties` file which will be merged with component configuration system \
(see services). This properties file enables the function `userJar(xxxx)` to replace the jar named `xxxx` \
by its virtual gav (`groupId:artifactId:version`),
- a list of jars which will be merged with component family classpath
""")
@ConfigProperty(name = "talend.component.server.user.extensions.location")
private Optional<String> userExtensions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,38 @@ void checkSchemaSerialization() {
.request(APPLICATION_JSON_TYPE)
.post(Entity.entity(emptyMap(), APPLICATION_JSON_TYPE), String.class);
final String expected =
"{\n \"entries\":[\n {\n \"elementSchema\":{\n \"entries\":[\n ],\n" +
" \"metadata\":[\n ],\n \"props\":{\n\n },\n \"type\":\"STRING\"\n"
+
" },\n \"errorCapable\":false," +
"\n \"metadata\":false,\n \"name\":\"array\",\n \"nullable\":false,\n" +
" \"props\":{\n\n },\n \"type\":\"ARRAY\",\n" +
" \"valid\":true\n }\n ],\n \"metadata\":[\n" +
" ],\n \"props\":{\n \"talend.fields.order\":\"array\"\n },\n \"type\":\"RECORD\"\n}";
"""
{
"entries":[
{
"elementSchema":{
"entries":[
],
"metadata":[
],
"props":{

},
"type":"STRING"
},
"errorCapable":false,
"metadata":false,
"name":"array",
"nullable":false,
"props":{

},
"type":"ARRAY",
"valid":true
}
],
"metadata":[
],
"props":{
"talend.fields.order":"array"
},
"type":"RECORD"
}""";
assertEquals(expected, schema);
}

Expand Down
Loading
Loading