-
Notifications
You must be signed in to change notification settings - Fork 492
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
Review/modify: jsonPrinter for datasetFieldType #10472
Comments
Just to clarify, the objects under "fields" stay and the duplicate objects under "childFields" get suppressed?
|
@stevenwinship I think the opposite - if they are child fields we don't want to show them as stand-alone fields so we would include subtypes 4 and 5 only as children of subtype 3. Maybe we could bring it up in the front end meeting to see if there is a preferred method for the SPA. |
Overview of the Feature Request
As written the jsonPrinter for datasetFieldType adds subfields whenever !fld.getChildDatasetFieldTypes().isEmpty() calling the printer recursively. The jsonPrinter for metadatabocks calls the jsonPrinter for datasetfieldtype for all so the subfields appear twice - once as a subfield and once as a stand alone field. It's a little confusing to see these fields twice. A possible solution would be to filter out those subfields where isChild is true - That would work for our current dataset field types but would fail if we ever implement subfields of subfields. We also have to be careful not to disrupt the current users of the getMetadataBlock api endpoint.
The SPA team has noticed the issue and is working around it for CreateDataset see #10418
What kind of user is the feature intended for?
(Example users roles: API User)
What inspired the request?
Work on the PR noted above
What existing behavior do you want changed?
Possibly changing the getMetadataBlock api to only show each datasetFieldType once
Any brand new behavior do you want to add to Dataverse?
Any open or closed issues related to this feature request?
The text was updated successfully, but these errors were encountered: