intelis
intelis

Reputation: 8058

Validate DRF response against OpenApi 3 .yml schema

I've specified API schema in a file called apidocs.yml using OpenApi 3 specifications. Now I want to validate Django-rest-framework API response against that particular .yml schema.

How do I go about doing that? I've searched on google and couldn't find any libraries capable of doing that. The closest I've found was a library called flex but it only supports OpenApi version 2.

Is there a python packaged that could validate json response from API against OpenApi 3 .yml schema file?

Upvotes: 2

Views: 825

Answers (1)

y.luis.rojo
y.luis.rojo

Reputation: 1824

I am testing with dredd, which defines itself:

Dredd is a language-agnostic command-line tool for validating API description document against backend implementation of the API.

Although OpenAPI v3 is partially supported.

Upvotes: 1

Related Questions