jsonix-schema-compiler icon indicating copy to clipboard operation
jsonix-schema-compiler copied to clipboard

JSON Schema no longer works since jsonix.org is offline

Open pwmcintyre opened this issue 1 year ago • 1 comments

Hey team,

Looks like when converting to JSON Schema, all the types do not use primitives, but rather refer to an external schema hosted on jsonix.org.

Example:

{
    "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/dateTime"
}

This site appears to have gone offline, rendering these schemas useless.

Wondering:

  • is this intentional?
  • are these available on GitHub?

Seeking advice

pwmcintyre avatar Jul 17 '24 03:07 pwmcintyre

workaround

It looks as though the above DateTime definition is being used where a property has type xsd:dateTime.

This appears to be ISO8601 compliant, and so the JSON Schema equivalent is simply a string type with format: "date-time".

This conversation could be simplified to use primitive JSON Schema types.

In the meantime I will do this manually.

refs:

  • https://www.w3schools.com/xml/schema_dtypes_date.asp
  • https://json-schema.org/understanding-json-schema/reference/string#dates-and-times

⚠️ NOTE: The docs below seem to convert xsd:dateTime into a complex object where year/month/day are split into nested types: https://github.com/highsource/jsonix-schema-compiler/wiki/JSON-Schema-for-XML-Schema

pwmcintyre avatar Jul 17 '24 03:07 pwmcintyre