Skip to content
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

Chore/sof 6429 #41

Closed
wants to merge 24 commits into from
Closed

Chore/sof 6429 #41

wants to merge 24 commits into from

Conversation

azech-hqs
Copy link
Contributor

This PR concerns the addition of a second function to generate the dependencies block using "oneOf" instead of "enum".

* @param {Object[]} nodes - Array of nodes (e.g. `[tree]` or `node.children`)
* @returns {{}|{dependencies: {}}}
*/
export function buildDependenciesOneOf(nodes) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we move this to a file named tree.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes use of a tree structure, yes, but the result of this function is really only useful in the context of schemas. In my opinion, it is already in a good place.

modifyProperties: true,
useEnum: false,
});
// console.log(JSON.stringify(rjsfSchema, null, 4));
Copy link
Member

Choose a reason for hiding this comment

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

Remove

value: "data.functional.slug",
name: "data.functional.name",
value: "data.functional.enum[0]",
name: "data.functional.title",
Copy link
Member

Choose a reason for hiding this comment

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

Per our discussion:

  1. Let's add type to know whether we are dealing with a string or object for enum[0] use
  2. When object, we can have value: data.functional, name: data.functional.name

Base automatically changed from chore/SOF-6428 to main February 4, 2023 01:58
@azech-hqs azech-hqs closed this Mar 17, 2023
@timurbazhirov timurbazhirov deleted the chore/SOF-6429 branch November 22, 2023 06:53
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