-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Catalog): Add CamelCatalogSchemaEnhancer #1960
feat(Catalog): Add CamelCatalogSchemaEnhancer #1960
Conversation
definitions.fields().forEachRemaining(entry -> { | ||
String javaType = entry.getKey(); | ||
ObjectNode node = (ObjectNode) entry.getValue(); | ||
|
||
camelCatalog.findModelNames().stream().findFirst().ifPresent(modelName -> { | ||
var model = camelCatalog.eipModel(modelName); | ||
if (model == null) { | ||
return; | ||
} | ||
|
||
if (model.getJavaType().equals(javaType)) { | ||
fillRequiredPropertiesIfNeeded(modelName, node); | ||
} | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shivamG640, this code goes from org.apache.camel.model.language.ConstantExpression
to the constant
model from the Camel Catalog, I think you're gonna need something like this for the sorting, if that's the case, I think we can extract the query part and create a method that receives a lambda where you can place the sorting code and I can place this required code.
9f225b9
to
18a2539
Compare
606271f
to
ad3b054
Compare
ad3b054
to
29a7f8e
Compare
* @param modelNode the JSON schema node of the model | ||
*/ | ||
void sortPropertiesAccordingToCatalog(EipModel model, ObjectNode modelNode) { | ||
// TODO: Sort properties according to the Camel catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shivamG640 Here we need to place your Sorting code, and it will be sorting both Schemas and definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lordrip
|
8c027e5
into
KaotoIO:feat/form-with-anyof-support
part of: #1939