-
Notifications
You must be signed in to change notification settings - Fork 39
Schema component named Request
generates ambiguous code
#180
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
This is definitely related to #84, but this isn't necessarily a bug. Probably the only solution is to use However, we could probably display a warning if a schema object name would conflict. |
I don't necessarily disagree with it not being a bug, but it did initially confuse and disappoint me slightly so I can imagine the few others hitting this share that sentiment :) I was not aware of One solution that comes to mind is to always call it as |
Came across the same issue when interacting with the @kean your examples on the |
At the very least, it would be good for CreateAPI to warn about naming conflicts as we probably can tell when this might happen 👍 As for renaming |
Gave
create-api
a quick whirl with our schema, looks like having a type namedRequest
confuses the compiler with theRequest<Response>
fromGet
:API/Sources/Paths.swift:31:57 Cannot specialize non-generic type 'Request'
as the compiler tries to use the following generated struct from
Entities.swift
instead ofGet.Request<Response>
:schema snippet:
The text was updated successfully, but these errors were encountered: