add basic support for tool resource metadata schemas#55
Conversation
| if len(creator_order_numbers) != len(set(creator_order_numbers)): | ||
| raise ValueError("creator_order values must be unique") | ||
| #if len(creator_order_numbers) != len(set(creator_order_numbers)): | ||
| # raise ValueError("creator_order values must be unique") |
There was a problem hiding this comment.
This validation was failing for a single resource with many creators. I just removed this validation check to allow the metadata to be written to disk.
pkdash
left a comment
There was a problem hiding this comment.
Does support for the web app resource have any effect on hsclient?
Yes, it means that web app resources can be retrieved and updated by hsclient now. Though a user will only be able to access the core metadata fields. You have me thinking more deeply about this now... I think if a user updates metadata fields with this schema, the other fields would be removed when saving. We don't necessarily need to make this release available to hsclient at this time though. |
This accounts for validation issues happening with metadata extraction because ToolResource (Web App Connector) was not supported by hsmodels.
I intentionally left out the Web App Connector specific fields to implement this quickly and those fields are not being used currently. These changes recognize the ToolResource type and treat it like any other resource.
There were just under 300 resources failing validation either here in hsmodels or in the resulting cloud native schemas. I went through each issue and loosened up the validation based on those resources.