fsprojects / SwaggerProvider

F# generative Type Provider for Swagger

Home Page:https://fsprojects.github.io/SwaggerProvider/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenApiProvider fails on allowEmptyValue

jkone27 opened this issue · comments

Description

parameters:
        - in: query
          name: metadata
          schema:
            type: boolean
          allowEmptyValue: true  # <----- validation of this field fails

https://swagger.io/docs/specification/describing-parameters/

but validation gives errors

allowEmptyValue is not a valid property @ ...

Repro steps

try a schema with allowEmptyValue

Expected behavior

should not give any errors

Actual behavior

Fails parsing/validation

Known workarounds

remove the field from openapi spec

Affected Type Providers

  • [X ] OpenApiClientProvider

Related information

  • MacOS
  • master
  • .NET6

try a schema with allowEmptyValue

@jkone27 do you have sample of such schema?

i don't atm, not sure where i took it from, but i think you can test adding that parameter definition in some test route and get the openapi from here?

 - in: query
          name: metadata
          schema:
            type: boolean
          allowEmptyValue: true  # <----- validation of this field fails

https://editor.swagger.io/