SwaggerProvider icon indicating copy to clipboard operation
SwaggerProvider copied to clipboard

OpenApiProvider fails on allowEmptyValue

Open jkone27 opened this issue 3 years ago • 2 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

jkone27 avatar Jun 10 '22 11:06 jkone27

try a schema with allowEmptyValue

@jkone27 do you have sample of such schema?

sergey-tihon avatar Sep 14 '22 06:09 sergey-tihon

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/

jkone27 avatar Sep 14 '22 09:09 jkone27