openapi-schema-validator icon indicating copy to clipboard operation
openapi-schema-validator copied to clipboard

The type of properties is not validated

Open david-caro opened this issue 5 months ago • 0 comments

Not sure if this is an issue or not, but at least I did not expect it :)

Having for example a schema like:

---
openapi: "3.1.0"
info:
  title: "Test properties types"
  version: "0.0.0"
paths:
  /some/{someparam}:
    get:
      parameters:
        - name: someparam
          in: path
          required: true
          schema:
            type: idontexistasatype

Passes the validation:

dcaro@acme$ openapi-spec-validator test.yaml 
test.yaml: OK

Currently using the latest commit from this repo:

dcaro@acme$ pip freeze | grep openapi-spec-validator
openapi-spec-validator @ git+https://github.com/python-openapi/openapi-spec-validator@118ad6125b35df075ed78d61f4f90d6a0abc1c88

I was expecting it to fail saying that the type idontexistasatype is not valid.

david-caro avatar Aug 13 '25 10:08 david-caro