Skip to content

Expand types of lists that can be returned in responses #93

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
ghost opened this issue Jul 15, 2020 · 2 comments
Closed

Expand types of lists that can be returned in responses #93

ghost opened this issue Jul 15, 2020 · 2 comments
Labels
✨ enhancement New feature or improvement 🆘 help wanted Extra attention is needed
Milestone

Comments

@ghost
Copy link

ghost commented Jul 15, 2020

The following line wrongly requires a $ref on every item:
https://github.com/triaxtec/openapi-python-client/blob/cba6fa2eeee96bb60161dde5c552887cbff573b6/openapi_python_client/openapi_parser/responses.py#L101

@ghost ghost changed the title $ref is optional and should not be mandatory for items $ref should be optional for items Jul 15, 2020
@dbanty
Copy link
Collaborator

dbanty commented Jul 15, 2020

Our response types in general are pretty basic compared to our "properties" (inputs). The right move here is probably to unify those two types, maybe by having a generic response with a single root Property that makes it up.

I need to do some research into what's allowed first though. I'm not sure if you actually can return all the same things you can take as inputs (or if the schema is defined the same).

If you (or anyone else) knows off hand or wants to do some reading in the docs to find out, that would go a long way toward moving this forward.

@dbanty dbanty added the 🆘 help wanted Extra attention is needed label Jul 15, 2020
@dbanty dbanty changed the title $ref should be optional for items Expand types of lists that can be returned in responses Jul 15, 2020
@dbanty dbanty added the ✨ enhancement New feature or improvement label Jul 21, 2020
@dbanty dbanty added this to the 0.7.0 milestone Aug 18, 2020
@dbanty
Copy link
Collaborator

dbanty commented Sep 26, 2020

#165 actually added a bunch of additional list types so I think that solves this particular issue. I do still plan on expanding the available response types, but it will be done against some other issues.

@dbanty dbanty closed this as completed Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or improvement 🆘 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant