Skip to content

Encoding Object examples have invalid schema property #3170

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

Closed
jeremyfiel opened this issue Feb 24, 2023 · 7 comments
Closed

Encoding Object examples have invalid schema property #3170

jeremyfiel opened this issue Feb 24, 2023 · 7 comments
Labels
bug media and encoding Issues regarding media type support and how to encode data (outside of query/path params)
Milestone

Comments

@jeremyfiel
Copy link
Contributor

jeremyfiel commented Feb 24, 2023

Reviewing the Encoding Object Examples

The keyword type should be $ref.

         addresses:
            # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
            type: array
            items:
              type: '#/components/schemas/Address'
@jeremyfiel
Copy link
Contributor Author

jeremyfiel commented Feb 24, 2023

I noticed 3.1.0 has a slightly different schema, albeit, valid. Lmk if you want that updated too.

          addresses:
            # default Content-Type for arrays is based on the _inner_ type (object shown, so `application/json` in this example)
            type: array
            items:
              type: object
              $ref: '#/components/schemas/Address'

cc @handrews let me know if this should be fixed too.

@handrews
Copy link
Member

handrews commented Mar 1, 2023

@jeremyfiel I'm not sure what would need to be fixed in the 3.1 schema? I might be missing something.

@jeremyfiel
Copy link
Contributor Author

jeremyfiel commented Mar 1, 2023 via email

@handrews
Copy link
Member

handrews commented Mar 2, 2023

@jeremyfiel I suspect I put it in there just to emphasize that you can put things next to $ref now :-) I don't much care one way or the other, but I think that's why it's like that.

@jeremyfiel
Copy link
Contributor Author

i'm impartial.

@handrews
Copy link
Member

handrews commented Mar 5, 2023

Let's leave it as-is and just fix it for 3.0.4.

@handrews
Copy link
Member

This has been fixed in 3.0.4 and we decided not to change it in 3.1.1.

@handrews handrews added this to the v3.0.4 milestone Jan 27, 2024
@handrews handrews removed the 3.0.4 label Jan 27, 2024
@handrews handrews added bug media and encoding Issues regarding media type support and how to encode data (outside of query/path params) labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug media and encoding Issues regarding media type support and how to encode data (outside of query/path params)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants