-
Notifications
You must be signed in to change notification settings - Fork 6k
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
class 'array' not found #189
Comments
Hmm, is it perhaps because those primitives are defined in another library? I noticed that this piece of code is defined in
But that line indicates that the classes should be defined in the current working directory of the generated code files... I am a bit lost on this one. |
I've seen something very similar generating Python and Java code. When I have an 'array' defined in the api-docs as the return type of an operation, with an 'items' : { '$ref' : 'ListEntry' }, my mustache template translates the {{returnType}} as 'Array[ListEntry]' even though the Scala typeMapping is set to translate 'Array' to 'list' in Python or 'List' in Java. If I remove the 'items' in the api-doc, then I get a warning about a missing model, but the {{returnType}} expands to 'list' and in Python my method returns a generic list of dicts which I can live with, but having a list of ListEntry objects is what is supposed to happen. |
hi, i just did a merge which should fix this. Can you pull master and please try again? |
I pulled master last night and tried to use the petstore API with the following test.
Python 3.4 generated this output:
|
I have specified an
array
as a an operation returntype
for my operation, yet I seem to get this message in the when attempting to deserialize the server response.However, according to the swagger-spec listed at the link below,
array
should be a validtype
:https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md
It seems that swagger-codegen is expecting this to be a user defined type, but according to the specification this is similar to a primitive type (at least that is how it reads).
The text was updated successfully, but these errors were encountered: