Skip to content

Add conformance tests for errors format #102

Description

@Artifizer

Need to develop error detection conformance tests:

  1. Errors must be structured and return line number, json document string, error message
  2. GTS errors must have the same message across various tools - gts-python, gts-rust, gts-go, gts-ts, gts-csharp

Example of bad message:

% ./target/release/gts validate-json --path .gts-spec-local/examples 
{
  "ok": false,
  "files": 64,
  "documents": 80,
  "gts_entities": 80,
  "schemas": 31,
  "instances": 49,
  "issues": [
    {
      "file": "/Users/aandreev/git/github/gts-spec/examples/events/types/gts.x.core.events.type.v1~x.core.audit.type.v1~.schema.json",
      "stage": "derived-type",
      "message": "Schema 'gts.x.core.events.type.v1~x.core.audit.type.v1~' is not compatible with base 'gts.x.core.events.type.v1~': derived schema 'gts.x.core.events.type.v1~x.core.audit.type.v1~' is not included in base 'gts.x.core.events.type.v1~': Schema at '$.type' changes type incompatibly from any to \"string\""
    },
    {
      "file": "/Users/aandreev/git/github/gts-spec/examples/events/types/gts.x.core.events.type.v1~x.core.audit.type.v1~x.core.iam.settings_changed.v1~.schema.json",
      "stage": "derived-type",
      "message": "Schema 'gts.x.core.events.type.v1~x.core.audit.type.v1~' is not compatible with base 'gts.x.core.events.type.v1~': derived schema 'gts.x.core.events.type.v1~x.core.audit.type.v1~' is not included in base 'gts.x.core.events.type.v1~': Schema at '$.type' changes type incompatibly from any to \"string\""
    }
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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