GfSE / SpecIF

Specification Integration Facility - schema, constraint checker and examples
Apache License 2.0
15 stars 6 forks source link

Schema: Define properties for files #14

Closed odungern closed 5 years ago

odungern commented 5 years ago

Define the properties of the properties of the items in 'files', such as:

"files": {
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "description": "In case of a file, the id is ideally an absolute or relative URL.",
        "$ref": "#/definitions/id"
      },
      "title": {
        "type": "string"
      },
      "type": {
        "description": "The media type of the file (formerly MIME-type) according to https://www.iana.org/assignments/media-types/media-types.xhtml.",
        "type": "string"
      },
      "changedAt": {
        "$ref": "#/definitions/dateTime"
      },
      "changedBy": {
        "type": "string"
      }
    },
    "required": [ "id", "title", "type", "changedAt" ]
  }
}
odungern commented 5 years ago

Done with https://specif.de/v0.10.7/schema and https://specif.de/v0.11.7/schema.