Skip to content
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

fixes imports when spec contains no schema #352

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/resources/handlebars/Java/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Please follow the [installation](#installation) instruction and execute the foll
{{#apiInfo}}{{#apis}}{{#@first}}{{#operations}}{{#operation}}{{#contents}}{{#@first}}
import {{{invokerPackage}}}.*;
import {{{invokerPackage}}}.auth.*;
import {{{modelPackage}}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{{package}}}.{{{classname}}};

import java.io.File;
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/handlebars/Java/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import com.sun.jersey.api.client.GenericType;
import {{invokerPackage}}.ApiException;
import {{invokerPackage}}.ApiClient;
import {{invokerPackage}}.Configuration;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import {{invokerPackage}}.Pair;

{{#imports}}import {{import}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.format.DateTimeFormatter;
{{/threetenbp}}

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import java.io.IOException;
import java.io.StringReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.format.DateTimeFormatter;
{{/threetenbp}}

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import java.io.IOException;
import java.io.StringReader;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/handlebars/JavaInflector/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import java.io.File;
import java.util.List;

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#imports}}import {{import}};
{{/imports}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
controllerPackage: {{invokerPackage}}
modelPackage: {{modelPackage}}
{{#hasModel}}modelPackage: {{modelPackage}}{{/hasModel}}
swaggerUrl: ./src/main/resources/openapi3.yaml
modelMappings:
# to enable explicit mappings, use this syntax:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/handlebars/JavaJaxRS/api.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;
import {{package}}.factories.{{classname}}ServiceFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#imports}}import {{import}};
{{/imports}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.apache.cxf.jaxrs.ext.multipart.Attachment;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/handlebars/JavaJaxRS/di/api.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;

{{#useOas2}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;
import {{package}}.factories.{{classname}}ServiceFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import com.sun.jersey.multipart.FormDataParam;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import com.sun.jersey.multipart.FormDataParam;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;

{{#useOas2}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#useOas2}}
import io.swagger.annotations.ApiParam;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Method | HTTP request | Description
```kotlin
// Import classes:
//import {{{packageName}}}.infrastructure.*
//import {{{modelPackage}}}.*
//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{! TODO: Auth method documentation examples}}
val apiInstance = {{{classname}}}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Method | HTTP request | Description
```kotlin
// Import classes:
//import {{{packageName}}}.infrastructure.*
//import {{{modelPackage}}}.*
//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{! TODO: Auth method documentation examples}}
val apiInstance = {{{classname}}}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io.ktor.locations.*
import io.ktor.pipeline.PipelineContext
import io.ktor.routing.Route
import io.ktor.routing.method
import {{modelPackage}}.*
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#imports}}
import {{import}}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/Java/JSON.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.threeten.bp.format.DateTimeFormatter;
{{/threetenbp}}

{{#parent.length}}
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{/parent.length}}
import okio.ByteString;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/Java/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Please follow the [installation](#installation) instruction and execute the foll
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
import {{{invokerPackage}}}.*;
import {{{invokerPackage}}}.auth.*;
import {{{modelPackage}}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{{package}}}.{{{classname}}};

import java.io.File;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/Java/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.sun.jersey.api.client.GenericType;
import {{invokerPackage}}.ApiException;
import {{invokerPackage}}.ApiClient;
import {{invokerPackage}}.Configuration;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{invokerPackage}}.Pair;

{{#imports}}import {{import}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.threeten.bp.format.DateTimeFormatter;
{{/threetenbp}}

{{#parent.length}}
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{/parent.length}}

import java.io.IOException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/JavaInflector/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import java.io.File;
import java.util.List;

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#imports}}import {{import}};
{{/imports}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
controllerPackage: {{invokerPackage}}
modelPackage: {{modelPackage}}
{{#hasModel}}modelPackage: {{modelPackage}}{{/hasModel}}
swaggerUrl: ./src/main/swagger/swagger.yaml
modelMappings:
# to enable explicit mappings, use this syntax:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/JavaJaxRS/api.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;
import {{package}}.factories.{{classname}}ServiceFactory;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/JavaJaxRS/apiService.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#imports}}import {{import}};
{{/imports}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import org.apache.cxf.jaxrs.ext.multipart.Attachment;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;
import {{package}}.factories.{{classname}}ServiceFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import com.sun.jersey.multipart.FormDataParam;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

import com.sun.jersey.multipart.FormDataParam;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
import {{package}}.{{classname}}Service;

{{#useOas2}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}};

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package {{package}};

import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{#useOas2}}
import io.swagger.annotations.ApiParam;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package {{package}}.impl;

import {{package}}.*;
import {{modelPackage}}.*;
{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/kotlin-client/api_doc.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Method | HTTP request | Description
```kotlin
// Import classes:
//import {{{packageName}}}.infrastructure.*
//import {{{modelPackage}}}.*
//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{! TODO: Auth method documentation examples}}
val apiInstance = {{{classname}}}()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mustache/kotlin-server/api_doc.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Method | HTTP request | Description
```kotlin
// Import classes:
//import {{{packageName}}}.infrastructure.*
//import {{{modelPackage}}}.*
//{{#hasModel}}import {{modelPackage}}.*;{{/hasModel}}

{{! TODO: Auth method documentation examples}}
val apiInstance = {{{classname}}}()
Expand Down
Loading