biothings / discovery-app

The Data Discovery Engine project by the CD2H Data working-group
http://discovery.biothings.io
Apache License 2.0
4 stars 9 forks source link

[Feature Request] Specify type / enum when inheriting a property in Schema Editor #181

Open flaneuse opened 2 years ago

flaneuse commented 2 years ago

Describe the solution you'd like If I'm deriving a schema from a pre-existing schema (like NIAID:Dataset), I can add properties from a parent schema which are not included in that schema (for instance: schema.org:about). However, I can't specify the type or enum properties like you can when you add a completely new property.

gtsueng commented 1 year ago

The enum values are set via the validation editor, which makes sense since this would only apply to profiles (ie- classes with JSON schema validation rules). For the issue surrounding expectedTypes for properties from a parent class, the property will already have an expectedType which you cannot change unless you're redefining the property. For instance the expectedType for schema:about is Thing. You can't change this since it's set by schema.org. If you wanted to change the expectedType to something like DefinedTerm or Text, you would need add it as a new property. I think this behavior makes sense.