Skip to content

[Java] Fix invalid imports when model name prefix/suffix is present #2284

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

Merged
merged 1 commit into from
Mar 1, 2016
Merged

[Java] Fix invalid imports when model name prefix/suffix is present #2284

merged 1 commit into from
Mar 1, 2016

Conversation

xhh
Copy link
Contributor

@xhh xhh commented Mar 1, 2016

When generating Java clients with mode name prefix/suffix given, there are invalid imports on Date and File, e.g. for the Petstore sample (with model name prefix set to "My" and suffix set to "Model"):

import io.swagger.client.model.MyfileModel;
import io.swagger.client.model.MyDateModel;

This PR fixes it to:

import java.io.File;
import java.util.Date;

When generating Java clients with mode name prefix/suffix given, there
are invalid imports on Date and File, e.g. for the Petstore sample
(with model name prefix set to "My" and suffix set to "Model"):

    import io.swagger.client.model.MyfileModel;
    import io.swagger.client.model.MyDateModel;

This commit fixes it to:

    import java.io.File;
    import java.util.Date;
@wing328 wing328 added this to the v2.1.6 milestone Mar 1, 2016
wing328 added a commit that referenced this pull request Mar 1, 2016
[Java] Fix invalid imports when model name prefix/suffix is present
@wing328 wing328 merged commit ea3232c into swagger-api:master Mar 1, 2016
@wing328
Copy link
Contributor

wing328 commented Mar 1, 2016

Related to #2211

@xhh xhh deleted the java-file-date-model-name-fix branch March 2, 2016 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants