Skip to content

Conversation

@ssahayaraj8777
Copy link
Collaborator

This is the fix for setting fields as required. It works fine even after converting to OASv3.x, please review..

} else if (node instanceof LeafSchemaNode) {
LeafSchemaNode lN = (LeafSchemaNode) node;
prop = getPropertyByType(lN);
if (prop != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you decided to set required only for simple fields? Swagger allows you to define it at any property as well as YANG defines it at DataSchemaNode so it can be applied for all types of nodes

Copy link
Collaborator

@bartoszm bartoszm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution - so far so good.
However, I have a suggestion for how the required field should be implemented.
In addition, I would expect to see unit tests for the functionality you add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants