Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way to validate inbound JSON objects with JSON Schema #1163

Closed
lonelycode opened this issue Sep 28, 2017 · 3 comments · Fixed by #1343
Closed

Add way to validate inbound JSON objects with JSON Schema #1163

lonelycode opened this issue Sep 28, 2017 · 3 comments · Fixed by #1343

Comments

@lonelycode
Copy link
Member

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Currently inbound requests can;t be validated against a strict schema

What is the expected behavior?
I should be able to vlaidate inbound object into my API against a JSON Schema

@lonelycode lonelycode added this to the Release 2.4 milestone Sep 28, 2017
@lonelycode lonelycode self-assigned this Sep 28, 2017
@lonelycode
Copy link
Member Author

Relevant PR (because the link failed, again): #1180

@buger
Copy link
Member

buger commented Oct 2, 2017

@lonelycode you need include task number to issue comment not header, to make links work

@lonelycode lonelycode assigned buger and unassigned lonelycode Oct 3, 2017
@lonelycode lonelycode modified the milestones: Release 2.4, Release 2.5 Oct 7, 2017
@lonelycode lonelycode modified the milestone: Release 2.5 Dec 4, 2017
asoorm pushed a commit that referenced this issue Dec 11, 2017
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Dec 13, 2017
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Dec 13, 2017
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Dec 13, 2017
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Dec 13, 2017
Fixes #1163
Based on #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.
@nickReyn
Copy link

asoorm pushed a commit that referenced this issue Jan 14, 2018
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Jan 15, 2018
Fixes #1163
Based on #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.
asoorm pushed a commit that referenced this issue Jan 15, 2018
Fixes #1163
Based on #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
asoorm pushed a commit that referenced this issue Jan 15, 2018
Fixes #1163
Based on #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
asoorm pushed a commit that referenced this issue Jan 15, 2018
Fixes #1163
Based on #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
asoorm pushed a commit that referenced this issue Jan 21, 2018
Fixes #1163
Based on #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
@buger buger modified the milestones: Release 2.5, Release 2.6 Jan 22, 2018
asoorm pushed a commit that referenced this issue Jan 22, 2018
Fixes #1163
Based on #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": {
            "title": "Person",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "age": {
                "description": "Age in years",
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["firstName", "lastName"]
          }
        }]
      }
    }
  }
},
```

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
asoorm pushed a commit that referenced this issue Jan 31, 2018
Fixes #1163
Based on #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": {
            "title": "Person",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "age": {
                "description": "Age in years",
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["firstName", "lastName"]
          }
        }]
      }
    }
  }
},
```

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
asoorm pushed a commit that referenced this issue Feb 11, 2018
Fixes #1163
Based on #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": {
            "title": "Person",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "age": {
                "description": "Age in years",
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["firstName", "lastName"]
          }
        }]
      }
    }
  }
},
```

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
buger pushed a commit that referenced this issue Feb 14, 2018
Fixes #1163
Based on #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": {
            "title": "Person",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "age": {
                "description": "Age in years",
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["firstName", "lastName"]
          }
        }]
      }
    }
  }
},
```

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
asoorm added a commit to asoorm/tyk that referenced this issue Feb 22, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- fix: SchemaVersion unnessesary. Schema itself versioned
- lint: snake case to camel case
asoorm added a commit to asoorm/tyk that referenced this issue Feb 22, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- lint: snake case to camel case
asoorm added a commit to asoorm/tyk that referenced this issue Feb 26, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Removed caching temporarily because implemented incorrectly
- lint: snake case to camel case
asoorm added a commit to asoorm/tyk that referenced this issue Feb 26, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Fix caching so that the schema loads and caches at compile stage
- lint: snake case to camel case
asoorm added a commit to asoorm/tyk that referenced this issue Feb 26, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Fix caching so that the schema loads and caches at compile stage
- lint: snake case to camel case
asoorm added a commit to asoorm/tyk that referenced this issue Feb 26, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Fix caching so that the schema loads and caches at compile stage
- lint: snake case to camel case
- fix: use fork of gojsonschema instead of original
asoorm added a commit to asoorm/tyk that referenced this issue Feb 26, 2018
- feature: TykTechnologies#1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: TykTechnologies#1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Fix caching so that the schema loads and caches at compile stage
- lint: snake case to camel case
- fix: use fork of gojsonschema instead of original
buger pushed a commit that referenced this issue Feb 28, 2018
- feature: #1163 B64 encodes schema for storage. Decodes for sending to
gateway & exporting.
- feature: #1163 If $schema supplied, check that is Draft-04
- fix: SchemaVersion unnessesary. Schema itself versioned
- bug: Fix caching so that the schema loads and caches at compile stage
- lint: snake case to camel case
- fix: use fork of gojsonschema instead of original
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment