mulesoft / docs-mule-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
Title "Undefined" in the "Defining Parameters" document (https://docs.mulesoft.com/mule-sdk/1.1/define-parameters)
I am using Mule SDK for developing a custom connector. I am working on fetching the necessary metadata.
The following are the two snippets that i use:
WeatherConnectrOperations.java:
public class WeatherConnectrOperations {
public void select(@MetadataKeyId(RecordKeysResolver.class) String type) {
}
}
RecordKeysResolver.java:
public class RecordKeysResolver implements TypeKeysResolver {
@Override
public String getCategoryName() {
return "Records";
}
@Override
public Set<MetadataKey> getKeys(MetadataContext context) throws MetadataResolvingException, ConnectionException {
// First we need to obtain the key IDs that will be used.
// This is where you'd normally use `context.getConfig()`
// or `context.getConnection()` to obtain the entity id's
// from a remote service, for this demo the keys will be fixed
System.out.println("Hello");
List<String> keyIds = Arrays.asList("Author_id", "BookList_id", "Book_id");
HashSet<MetadataKey> keys = new HashSet<>();
for (String id : keyIds) {
// For each possible if, we create a new MetadataKey with that ID
MetadataKeyBuilder builder = MetadataKeyBuilder.newKey(id);
// Then, we add a DisplayName to that MetadataKey,
// this will be the name shown in the UI
builder.withDisplayName(StringUtils.removeEnd(id, "_id"));
// finally, add the key to the Set of known MetadataKeys
keys.add(builder.build());
}
return keys;
}
}
My problem is that, the type field is not getting populated with the necessary keys
I am doing as per this document - https://docs.mulesoft.com/mule-sdk/1.1/metadata-keys
Please attach sample connectors
There should be a better documentation to reflect the complex type in the return based on OutputTypeResolver and the input parameter base on InputTypeResolver.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.