Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Request/Responce body validated not according to Swagger 2.0 spec. #197

Closed
IvanGoncharov opened this issue Apr 19, 2015 · 1 comment
Closed

Comments

@IvanGoncharov
Copy link
Contributor

According to spec swagger inside schema object support only limited subset of JSON Schema draft4 and extend it with custom keywords.

Right now, you using "z-schema" validator which is work according to Draft4 spec.
So, you don't use "discriminator" and "readOnly" keywords during validation that mean you don't fully support Swagger 2.0 spec. At the same time your library successfully validate schemes which use such keywords.

Personally, I think it's a problem in Swagger spec.
So I created OAI/OpenAPI-Specification#333 feature request to make Swagger compatible with JSON Schema.
In other case we could have situation in which there is official spec but no one following it 😞
And I want library authors took part in that discussion.

@whitlockjc
Copy link
Member

We're limited by Swagger's spec so I think I will close this and watch swagger-api/swagger-spec#333.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants