Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Object with empty property name #7

Closed
IvanGoncharov opened this issue Apr 10, 2016 · 7 comments
Closed

Object with empty property name #7

IvanGoncharov opened this issue Apr 10, 2016 · 7 comments
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@IvanGoncharov
Copy link

Reported by @sergey-tihon as APIs-guru/openapi-directory#56

Object with empty property name, see:
https://github.com/sendgrid/sendgrid-swagger/blob/master/swagger.yaml#L10583-L10584
You probably meant hash, to do this in JSON Schema you should use additionalProperties, see:
http://json-schema.org/latest/json-schema-validation.html#anchor64

@thinkingserious
Copy link
Contributor

Thanks! We've added this to our backlog.

@IvanGoncharov
Copy link
Author

@thinkingserious Any progress on this?
Does it make sense if I submit PR or Swagger files autogenerated?

@thinkingserious
Copy link
Contributor

@IvanGoncharov feel free to submit a PR, so I can then add the change in our automation workflow.

Thanks!

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: help wanted requesting help from the community labels May 23, 2016
@mbernier
Copy link
Contributor

@IvanGoncharov can you please inspect the file again and see if this is still an issue?

@IvanGoncharov
Copy link
Author

@mbernier Yes, it still is 😞
Just search for '': in YAML or "": in JSON.
For example:

reply_to:
  description: An email object containing the email address and name of the individual who should receive responses to your email.
  properties:
    '':
      $ref: '#/definitions/email_object'
  type: object

To fix this just replace

properties: 
  '':

with additionalProperties, for example:

reply_to:
  description: An email object containing the email address and name of the individual who should receive responses to your email.
  additionalProperties:
    $ref: '#/definitions/email_object'
  type: object

@thinkingserious
Copy link
Contributor

@IvanGoncharov,

This will be fixed in a few minutes with the next release. Thanks!

@IvanGoncharov
Copy link
Author

@thinkingserious Thank you 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

3 participants