Skip to content
Merged
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 @@ -147,10 +147,13 @@ There are two annotations allowing to discover a component's schema:
@Service
public class UiServices {

@Service
private RecordBuilderFactory factory;

@DiscoverSchema("MyDataSet")
public Schema guessSchema(@Option final MyDataSet dataset) {
// some code
retrurn factory.newSchemaBuilder(Schema.Type.RECORD)
return factory.newSchemaBuilder(Schema.Type.RECORD)
.withEntry(factory.newEntryBuilder()
.withName("DataSetor")
.withType(Schema.Type.STRING)
Expand Down Expand Up @@ -281,9 +284,12 @@ In service class:
@Service
public class UiServices {

@Service
private RecordBuilderFactory factory;

@DiscoverSchema("my_fixed_input_schema")
public Schema guessSchema(@Option final MyDataSet dataset) {
retrurn factory.newSchemaBuilder(Schema.Type.RECORD)
return factory.newSchemaBuilder(Schema.Type.RECORD)
.withEntry(factory.newEntryBuilder()
.withName("header")
.withType(Schema.Type.STRING)
Expand Down
Loading