Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenApiProvider fails on allowEmptyValue #193

Open
jkone27 opened this issue Jun 10, 2022 · 2 comments
Open

OpenApiProvider fails on allowEmptyValue #193

jkone27 opened this issue Jun 10, 2022 · 2 comments

Comments

@jkone27
Copy link
Contributor

jkone27 commented Jun 10, 2022

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
@sergey-tihon
Copy link
Member

try a schema with allowEmptyValue

@jkone27 do you have sample of such schema?

@jkone27
Copy link
Contributor Author

jkone27 commented Sep 14, 2022

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/

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

No branches or pull requests

2 participants