Skip to content

file uri #166

@awalterschulze

Description

@awalterschulze

Hi this is a great implementation of JSON Schema, congratulations, I only found one issue

Given the following schema

{
  "$id": "https://json.schemastore.org/chart-lock.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "properties": {
    "generated": {
      "description": "Generated is the date the lock file was last generated.",
      "type": "string",
      "format": "date-time"
    },
    "digest": {
      "description": "Digest is a hash of the dependencies in Chart.yaml.",
      "type": "string"
    },
    "dependencies": {
      "type": "array",
      "description": "In Helm, one chart may depend on any number of other charts. These dependencies can be dynamically linked using the dependencies field in Chart.yaml or brought in to the charts/ directory and managed manually.\nThe charts required by the current chart are defined as a list in the dependencies field.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "version",
          "repository"
        ],
        "properties": {
          "name": {
            "description": "The name of the chart",
            "type": "string"
          },
          "version": {
            "description": "The version of the chart",
            "type": "string"
          },
          "repository": {
            "description": "The repository URL or alias",
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "required": [
    "generated",
    "digest",
    "dependencies"
  ],
  "title": "Helm Chart.lock",
  "type": "object"
}

It struggles to validate the following json input:

{"dependencies": [{"name": "oblx-service-template", "repository": "file://../../oblx-service-template", "version": "23.6.0"}], "digest": "sha256:ba9fb900522c7746e4c7236fe4a2beeb2404f93629ad87e015ce02b85a7464ca", "generated": "2023-06-21T12:06:39.498915142Z"}

Here is the project
https://github.com/katydid/validator-jsonschema-benchmarks/
To reproduce run

make IMPLEMENTATIONS='opis' SCHEMAS='helm-chart-lock'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions