Skip to content

Issue with schema validation #23

@boris-ning-usds

Description

@boris-ning-usds

Hi,

My name is Boris Ning, and I'm the implementation engineer for Centers for Disease Control & Prevention (CDC)'s ShareIT Act.

I'm trying to figure out some alignment of fields for code.json, and ran into some difficulties validating my code.json; I figured that I should run some examples with the setup provided and couldn't get it working either.
Do you have a better way of validating against the provided schema quickly?

What I've tried

I'm using both this website and the jsonschema CLI tool on the schema-1.0.0.json and code.json, both files within this repository.

The website for jsonschemavalidator.net doesn't seem to think "description" is a properties.item field, so that parser is probably wrong. I also tried with the jsonschema tool, and I ran into issues parsing the code.json provided...

jsonschema validate schema-1.0.0.json code.json

The output:

fail: /home/distro/Downloads/code.json
error: Schema validation failure
  The value was expected to be an object that defines properties "categories", "contact", "contractNumber", "date", "description", "feedbackMechanisms", "laborHours", "languages", "localisation", "longDescription", "maintenance", "name", "organization", "permissions", "platforms", "repositoryURL", "repositoryVisibility", "reuseFrequency", "softwareType", "status", "tags", and "vcs"
    at instance location ""
    at evaluate path "/required"

Will there be a schema json file for the array version of code.json that agencies should produce at the top level; since this schema.json is intended for single repository code.json.

Thank you!
-Boris

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions