Closed beepsoft closed 10 months ago
That has to be a bug. I will look into it. All of the properties in a profile should be visible regardless of whether they overlap with an existing schema.org definition.
Ok. Having a look at this some more it's not a bug but the behaviour is odd and misleading.
Describo doesn't automatically verify definitions in the profile against schema.org in order to fill in missing info for fields that are defined there. Without the id the profile is invalid and describo removes it. You can check profiles at https://describo.github.io/profiles/ and see that it reports the missing id as an error. If you add id's to all of the entries in your profile you will see that the profile validates.
The design idea is that profiles are things that are written by metadata experts, verified and then made available to the user community. So, describo assumes that the profile is correct and complete and defines exactly what the author wants the user to be able to do. By not providing an id, describo can't handle that entry. It won't try to fill in missing information from schema.org which I think would complicate things unnecessarily and lead to potentially unexpected behaviour.
Ok, it is completely fine to expect a completely authored profile with id-s. I just thought you do some magic about schema.org definitions and that's why schema.org symbols work without id-s - sometimes, at least.
I have created a use case for this issue in the development app here:
https://github.com/dsd-sztaki-hu/crate-builder-component/tree/file-profile-problem
Use the "Single file" crate and the "A profile for single-file.json test".
Here's the problem I found. I have this crate with a single File:
I try to use it with this profile:
Both the Dataset and the File class has
encodingFormat
property with the same input definition.Now, when I try to edit this crate with this profile I can see an input for "encodingFormat" appear in the Dataset,
but not in File:
encodingFormat
is part of schema.org. I also addedcontentSize
anddescription
to File class and I could overridecontentSize
and have an input for it, but not fordescription
just like withencodingFormat
.If I add an explicit schema.org id to the input definition, then it appears:
How do you think this supposed to work?
I tested this with 0.38.3 but this behavior also appears in 0.37.2.