-
-
Notifications
You must be signed in to change notification settings - Fork 227
Support object schemas in responses #162
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
Comments
@pawamoy you didn't do anything wrong, it looks like we just don't support inline object schemas in responses, only references. Responses are still pretty limited, the plan is to ultimately share more of their logic with the input properties but I haven't gotten around to that yet. This is the same idea as #93 though I probably need to make a more general issue for combining the logic. This could also be alleviated by #115 so if we haven't added support for a type of response yet you can get the raw version. |
Got it, thank you for the explanation! |
Just realized this is also the same issue as #140, not sure how I didn't see that one before. |
Oh jeez and also #125. I guess I really ought to implement this one. |
I pinned this issue just because it's a very common one to duplicate, so hopefully adding a little visibility will reduce the duplication. |
Plan is to name generated classes the same way suggested in #191. There are several different places a generic object can appear, so it'll vary a bit how to try to auto-name it, but generally it will be prefixed with some identifier of the component it's inside of. This might be These can get pretty ugly pretty fast with nesting but I think it's best to be explicit and unique and allow users to override class names using the existing |
I am not sure what is happening here, so opening this as a question.
I have this response defined in my spec file:
It gives me the following warning when generating a client (I removed all the
None
fields and indented properly):Do you have an idea why this cannot be parsed or transformed as code? What am I doing wrong in my spec 🙂 ?
The text was updated successfully, but these errors were encountered: