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

meaningless entryTypeDefinition.aCollectionOf property defiition #114

Open
redmitry opened this issue Oct 24, 2023 · 2 comments
Open

meaningless entryTypeDefinition.aCollectionOf property defiition #114

redmitry opened this issue Oct 24, 2023 · 2 comments

Comments

@redmitry
Copy link
Collaborator

Hi all,

There is invalid entryTypeDefinition.aCollectionOf property definition in the spec.

"aCollectionOf": {
    "description": "If the entry type is a collection of other entry types, (e.g. a Dataset is a collection of Records), then this attribute must list the entry types that could be included. One collection type could be defined as included more than one entry type (e.g. a Dataset could include Individuals or Genomic Variants), in such cases the entries are alternative, meaning that a given instance of this entry type could be of only one of the types (e.g. a given Dataset contains Individuals, while another Dataset could contain Genomic Variants, but not both at once).",
    "includedConcepts": {
        "$ref": "../common/basicElement.json",
        "type": "array"
    }
},

"includedConcepts" here is something to be ignored by schemas, so basically equivalent

"aCollectionOf": {}

Best,

Dmitry

@datsirul
Copy link

@jrambla This issue by @redmitry was also found by our work on the code generator. The file /entryTypeDefinition.yaml curently has:

  aCollectionOf:
    description: If the entry type...
    includedConcepts:
      type: array
      $ref: ../common/basicElement.yaml

I'm not sure what is the reason for the includedConcepts key, but for it to be a valid OpenAPI object it should be removed, like so:

  aCollectionOf:
    description: If the entry type...
    type: array
    $ref: ../common/basicElement.yaml

Note:
After fixing the .yaml files, the .json should be fixed as well by running the schema conversion script located in the bin folder

@jrambla
Copy link
Contributor

jrambla commented Jul 12, 2024

This one is trickier , IMO, as it will break the current implementations.
The reason for includedConcepts was to make clear what the aCollectionOf attributes mean.
It could be redudant, but could not be removed now w/o a proper deprecation.
Could the alternative be considering aCollectionOf as an object that has only one property and ammend the spec like that w/o breaking changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants