...
Code Block |
---|
public class InvalidConfigurationException extends RuntimeException { // payload gets returned in the http response. private final String payload; public InvalidConfigurationException(String message) { this(message, null); } public InvalidConfigurationException(String message, @Nullable String payload) { super(message); this.payload = payload; } } public interface Application<T extends Config> { /** * Configures the Application. * * @param configurer Collects the Application configuration * @param context Used to access the environment, application configuration, and application (deployment) arguments * @throws InvalidConfigurationException if the config is invalid */ void configure(ApplicationConfigurer configurer, ApplicationContext<T> context); } |
...
Code Block |
---|
PUT /apps/{app-name} -H 'Content-Type: application/json' -d '{
"artifact": { ... },
"config": { ... },
"dryrun": true
}'
{
"message": "....",
"payload": "..."
} |
Specific to Hydrator, the etl apps could put the 'pipeline spec', which contains each stage, the artifact used for each plugin, and the input/output schema for each stage, in a program property. The UI could then read this information as well, instead of trying to manage schema themselves.
...