Sinar / ocds-scripts

Scripts to convert Malaysian contract data/info into OCDS standard release and records
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

Is the online validator working properly? #4

Closed kmubiin closed 4 years ago

kmubiin commented 6 years ago

This is a follow up from issue #3 that attempted to validate pasted JSON.

This issue raises a question whether the online validator (Open Contracting Data Standard Validator) is working properly or not. To investigate this matter, I have used the "Worked Example" that is found in Merging - OCDS 1.1.0 Documentation.

Steps to reproduce issue:

  1. In a Web Browser, visit the Merging - OCDS 1.1.0 Documentation.
  2. Select item "record" from the drop-down box (This will change the content area below it).
  3. Expand the contents of all fields in the content area.
  4. Copy content area and paste into a new document of Text Editor.
  5. Clean up [*a] pasted JSON in the Text Editor (We want a valid JSON).
  6. In a Web Browser, visit the online validator page and select "Paste" section.
  7. Copy the modified text from the Text Editor into the "Paste" section
  8. Finally, click "Submit" button and view the validation result.

Note [*a]: The "Worked Example" has two errors: A duplicate line in "packages" field (Remove the last line containing "http://...json#ocds-213czf-000-00002-01-tender") and a missing "version" field (add "version": "1.1", at top).

~Following above steps, the validation result can be seen in this result page and pasted valid JSON can be viewed in this JSON original page~ Link expired very long time ago

Some text from validation result have been pasted at below.

Headlines

Passed validation against http://standard.open-contracting.org/schema/1__1__1/record-package-schema.json. At a glance

  • This file contains 1 record.
  • There is 1 unique OCID.
  • The publisher named in the file is Open Data Services Co-operative Limited.
  • This file uses 1 additional field not used in the standard.
  • Data uploaded on Thursday, 21 September 2017 03:08PM UTC

Despite the result is passed, the "award" section is not recognized as part of the schema 1.1.

Additional Fields (fields in data not in schema)

Field Path to Field Usage Count
award /records/compiledRelease 1

Repeat the validation with the schema 1.0, in addition to "award", few other fields are not recognized as part of the schema also.

Additional Fields (fields in data not in schema)

Field Path to Field Usage Count
version   1
award /records/compiledRelease 1
parties /records/compiledRelease 1
id /records/compiledRelease/buyer 1
amendments /records/compiledRelease/tender 1

The "Worked Example" in OCDS Documentation supposed to be correct. ~Then, why the online validator does not recognize the "award"?~ What is the expected validation result?

P.S.: Seems working properly now (as of OCDS 1.1.4)

kmubiin commented 4 years ago

I will self-answer this very old question: Just follow the steps as per above, expand and clean up--remove the circled minus characters-- as valid JSON, paste and submit to the online validator.

Passed structural checks against OCDS record package schema version 1.1.
At a glance

Result from: https://standard.open-contracting.org/review/data/43f9b674-1d8e-4951-8d2b-bb3c5b708005 (link expires after 7 days from now)

Tested with the "worked example" from OCDS 1.1.4 documentation.