Skip to content

Commit

Permalink
feat(gateway/oas-validation): OpenAPI 3.1.0 documentation (#7310)
Browse files Browse the repository at this point in the history
* feat(gateway/oas-validation): OpenAPI 3.1.0 documentation

* update

* formatting and conditional tagging fixes

---------

Co-authored-by: lena-larionova <[email protected]>
  • Loading branch information
vm-001 and lena-larionova authored May 3, 2024
1 parent dac62cb commit 73354a6
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions app/_hub/kong-inc/oas-validation/overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
nav_title: Overview
---

Validate HTTP requests and responses based on an API specification.
Supports both Swagger v2 and OpenAPI v3 specifications JSON request and response bodies, with support for schema definitions described using JSON Schema draft v4.
For JSON Schema draft 4 type schemas, see the [JSON Schema documentation](https://json-schema.org/) for details on the format and examples.
Validate HTTP requests and responses against an OpenAPI Specification.


{% if_version lte:3.6.x %}

The plugin supports both Swagger (v2) and OpenAPI (3.0.x) specifications, with the support of JSON Schema [Draft-04](https://json-schema.org/specification-links#draft-4).

{% endif_version %}
{% if_version gte:3.7.x %}

The plugin supports both Swagger (v2) and OpenAPI (3.0.x and 3.1.0) specifications with a JSON Schema validator that supports [Draft 2019-09](https://json-schema.org/specification-links#draft-2019-09-(formerly-known-as-draft-8)).

{% endif_version %}

{% if_plugin_version gte:3.2.x %}
{:.important .no-icon}
Expand All @@ -23,6 +33,20 @@ To enable the plugin, use one of the following methods:

{% endif_plugin_version %}

{% if_version gte:3.7.x %}

## Supported OpenAPI 3.1.0 specification features

| Category | Supported | Not supported |
|---------------------------------|--------------------------------|--------------------------------------------------------------------------|
| Request Body | `application/json` | `application/xml`<br>`multipart/form-data`<br>`text/plain`<br>`text/xml`<br> |
| Response Body | `application/json` | - |
| Request Parameters | `path`, `query`, `header`, `cookie` | - |
| Schema | `allOf`<br>`oneOf`<br>`anyOf`<br> | - |
| Parameter Serialization | `style`, `explode ` | - |

{% endif_version %}

## Tutorial

This example tutorial steps you through ensuring an API request conforms to the associated API specification. This example uses the [sample Petstore spec](https://petstore.swagger.io/).
Expand Down

0 comments on commit 73354a6

Please sign in to comment.