OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] (UBL-173) JSON improvements and problems

Ken Holman created UBL-173:

             Summary: JSON improvements and problems
                 Key: UBL-173
                 URL: https://issues.oasis-open.org/browse/UBL-173
             Project: OASIS Universal Business Language (UBL) TC
          Issue Type: Bug
          Components: Naming and Design Rules (NDR)
            Reporter: Ken Holman
            Assignee: Ken Holman
            Priority: Minor


1: The "common" and "maindoc" JSON schemas are lacking the $id property,

    From the spec:

    "The "$id" keyword defines a URI for the schema, and the base URI that other URI references within the schema are resolved against. The "$id" keyword itself is resolved against the base URI that the object as a whole appears in."

    So if e.g. the "UBL-Invoice-2.1.json" would define

    "$id": "http://mynet.com/schemas/UBL-Invoice-2.1.json#";

    and the "UBL-CommonBasicComponents-2.1" would define

    "$id": "http://mynet.com/schemas/UBL-CommonBasicComponents-2.1.json#";

    Then references should be written like

    "$ref": "UBL-CommonBasicComponents-2.1.json#/definitions/UBLVersionID"

    Which is much cleaner IMHO than the relative path solution, which also is not a valid URI e.g. "../common/", and also to my knowledge how most tools work.

2: Any plan for updating the schema version to the final version?

3: The DateType in UBL-UnqualifiedDataTypes-2.1.json is defined as 

    allOf: [


                type: "string",

                format: "date-time"



                type: "string",

                pattern: "^-*[^T:-]+-[^T:]+$"



    I believe that to be contradicting since "date-time" is "full-date "T" full-time" [2], that cannot coexist with the regex pattern as well.

I have been unable to find any previous discussion of this, please bear with me if this has been discussed before.

I have uploaded a ZIP file containing a small node script that can do validation of an invoice. Also an upgraded version of the JSON schemas to version 6 is included.

Thank you for your consideration.

[0] https://docs.oasis-open.org/ubl/UBL-2.1-JSON/v1.0/UBL-2.1-JSON-v1.0.html

[1] http://docs.oasis-open.org/ubl/UBL-2.1-JSON/v1.0/cnd02/json-schema/

[2] https://tools.ietf.org/html/rfc3339

[3] https://drive.google.com/file/d/0BwBEXaUe1bJIdTVHaUlpY3J1VXM/view?usp=sharing

This message was sent by Atlassian JIRA

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]