Skip to content

Example with object that has an empty property name fails. #759

Closed

Description

@darrelmiller
openapi: 3.0.1
info:
  title: sdsdsd
  version: 1.0.0
paths:
  /:
    get:
      responses:
        200:
          description: OK
          content:
            application/json: 
              example:
                '': "hello"

Failed to parse input: The argument 'name' is null, empty or consists only of white-space. (Parameter 'name')

Activity

  1. added
    priority:p2Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 days
    on Mar 1, 2022
  2. added this to the 2.0 milestone on Mar 1, 2022
  3. modified the milestones: 2.0, 1.4 on Mar 29, 2022
  4. irvinesunday commented on Aug 3, 2022

    @irvinesunday
    Contributor

    Darrel (@darrelmiller) in what scenario would we have empty property names?

  5. matt9ucci commented on Aug 3, 2022

    @matt9ucci
    Contributor

    As far as I know, it is not often the case that an OpenAPI json has empty names. It would be helpful for ordinary cases to raise warings/errors about empty names so that users could notice their mistake.

    If some users have an extra reason to define empty names, they should write their custom validation rule for them. (It is nice that OpenAPI.NET officially provides the validation rule, not set as default.)

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

Metadata

Metadata

Labels

priority:p2Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 daystype:bugA broken experience

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions