hubverse-org / schemas

JSON schemas for modeling hubs
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

"submissions_due.relative_to" property should be optional #3

Closed elray1 closed 1 year ago

elray1 commented 1 year ago

The relative_to property of submissions_due is listed as required here, but I think it should be optional -- a hub may want to specify an exact range of submission due dates as in the example scenario hub here.

annakrystalli commented 1 year ago

The submission_due has two options for how it can be defined indicated by the oneOf keyword. relative_to is only required when submission_due matches the first pattern. At the bottom of the submission_due property specification it states that only "start" and "end" are required (but that might actually be unnecessary come to think of it!

          "submissions_due": {
            "type": "object",
            "oneOf": [{
                "properties": {
                  "relative_to": {
                    "type": "string"
                  },
                  "start": {
                    "type": "integer"
                  },
                  "end": {
                    "type": "integer"
                  }
                },
                "required": [
                  "relative_to",
                  "start",
                  "end"
                ]
              },
              {
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date"
                  },
                  "end": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "required": [
                  "start",
                  "end"
                ]
              }
            ],
            "required": [
              "start",
              "end"
            ]
          },
elray1 commented 1 year ago

Got it, thanks for the clarification!