Skip to content

apply default in objects and arrays #468

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

Closed
wants to merge 4 commits into from
Closed

apply default in objects and arrays #468

wants to merge 4 commits into from

Conversation

SiemelNaran
Copy link
Contributor

No description provided.

@stevehu stevehu requested a review from prashanthjos October 19, 2021 03:20
@stevehu
Copy link
Contributor

stevehu commented Oct 19, 2021

@SiemelNaran Not sure if your PR is completed or not. If completed, could you please sync with the master so that we can easily compare the difference? @prashanthjos Could you please take a look at the PR to ensure it won't impact your use case? Thanks.

@SiemelNaran
Copy link
Contributor Author

@SiemelNaran Not sure if your PR is completed or not. If completed, could you please sync with the master so that we can easily compare the difference? @prashanthjos Could you please take a look at the PR to ensure it won't impact your use case? Thanks.

I just rebased from upstream.

@prashanthjos
Copy link
Member

@SiemelNaran we have an internal implementation of default keyword (which is not merged into this repo) in the Required validator where we add defaults for only required properties. Looks like we need to consider more complex scenarios like what should be the case if I have a property that refers to a definition through $ref and I have some defaults inside $ref. Should the walk populate the defaults from $ref. Looks this nesting logic is not implemented in your PR. Can you please confirm?

@SiemelNaran
Copy link
Contributor Author

@SiemelNaran we have an internal implementation of default keyword (which is not merged into this repo) in the Required validator where we add defaults for only required properties. Looks like we need to consider more complex scenarios like what should be the case if I have a property that refers to a definition through $ref and I have some defaults inside $ref. Should the walk populate the defaults from $ref. Looks this nesting logic is not implemented in your PR. Can you please confirm?

My PR does not handle references. I could add support for that to my PR (then give me hint to an existing function that pulls properties from referred object into my object), or I can close my PR since you already have one.

@stevehu
Copy link
Contributor

stevehu commented Oct 26, 2021

@SiemelNaran Please don't close the PR. You have reached this far and we really want to see this feature to be completed. I have just sent an invite to you to be a team member. Once accepted, you can create a feature branch here and merge your code into the branch. We can work together in the same branch. Let me know if any think I can do to assist. Thanks.

@SiemelNaran
Copy link
Contributor Author

Closed in view of #477

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.

3 participants