• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 3921
53%
master: %

Build:
Build:
LAST BUILD BRANCH: v2.9.4.8
DEFAULT BRANCH: master
Ran 15 Jan 2018 11:49AM UTC
Jobs 1
Files 87
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3921

push

travis-ci

asoorm
Adds JSON Schema validation to the gateway

Fixes #1163
Based on https://github.com/TykTechnologies/tyk/pull/1180

Adds a new JSON Validation middleware that can be configured as follows:

```
"version_data": {
  "not_versioned": true,
  "versions": {
    "default": {
      "name": "default",
      "use_extended_paths": true,
      "extended_paths": {
        "validate_json": [{
          "method": "POST",
          "path": "me",
          "validate_with": "BASE64 ENCODED SCHEMA"
        }]
      }
    }
  }
},
```

The schema must be a draft v4 JSON Schema spec. The gateway will attempt
to validate the inbound request against it, if fields are failing the
validation process, a detailed error response is provided for the user
to fix their payload.

This will require a new Dashboard UI to handle input.

make Base64 Schema readable in tests

removing base64 as not necessary

using make for known length slice

72 of 72 new or added lines in 3 files covered. (100.0%)

7365 of 14004 relevant lines covered (52.59%)

0.58 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
8
100.0
mw_validate_json.go

Uncovered Existing Lines

Lines Coverage ∆ File
16
100.0
api_loader.go
131
100.0
api_definition.go
Jobs
ID Job ID Ran Files Coverage
1 3921.1 (LATEST_GO=true) 15 Jan 2018 11:49AM UTC 0
52.59
Travis Job 3921.1
Source Files on build 3921
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3921
  • c4bf4da7 on github
  • Prev Build on json-validation-ahm (#3919)
  • Next Build on json-validation-ahm (#3967)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc