Skip to content

Instantly share code, notes, and snippets.


Florent Catiau-Tristant Kapcash

View GitHub Profile
Kapcash /
Created Oct 24, 2019
Java Spring validator decorator to restreint possibles values from Enum
@Target({ FIELD })
@Constraint(validatedBy = { EnumRestreintValidator.class })
public @interface EnumRestreint {
String message() default "The enum value is not included in the possibles values.";
String[] authorizedFields() default {};
Class<?>[] groups() default {};
Kapcash / ObservableSequence.ts
Created Sep 27, 2018
Recursive observable sequence, depending on previous response and concatening results
View ObservableSequence.ts
repeatRequests(req, endpoint, callback): any{
// Array of all results, returned to the subscribe
let tempArray = [];
// Recursive lambda function to chain all observables sequentially
const recursive = (req, endpoint, callback) => {
return this.httpService.get(endpoint).pipe(
flatMap((res) => {
// Concat all results in the result array
You can’t perform that action at this time.