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

Tidy up schema to make null vs. empty list more intentional #438

Open
edeutsch opened this issue Jun 22, 2023 · 0 comments
Open

Tidy up schema to make null vs. empty list more intentional #438

edeutsch opened this issue Jun 22, 2023 · 0 comments
Milestone

Comments

@edeutsch
Copy link
Collaborator

In the TRAPI 1.4 schema we have not been diligent about handling of nulls vs empty lists consistently. We should go through the schema and make everything tidy and consistent, or be intentional about what null vs [ ] means.

Cannot be null, but could be an empty list:

        logs:
          description: >-
            A list of LogEntry items, containing errors, warnings, debugging
            information, etc. List items MUST be in chronological order with
            earliest first. The most recent entry should be last. Its timestamp
            will be compared against the current time to see if there is
            still activity.
          type: array
          items:
            $ref: '#/components/schemas/LogEntry'
          nullable: false

Can be null or could be an empty list:

        results:
          description: >-
            List of all returned Result objects for the query posed.
            The list SHOULD NOT be assumed to be ordered. The 'score' property,
             if present, MAY be used to infer result rankings.
          type: array
          items:
            $ref: '#/components/schemas/Result'
          nullable: true

Can be null or, if a list, it must have at least one item:

        ids:
          type: array
          items:
            $ref: '#/components/schemas/CURIE'
          minItems: 1
          example: [OMIM:603903]
          description: CURIE identifier for this node
          nullable: true
@edeutsch edeutsch added this to the v1.5 milestone Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant