Merge pull request #2732 from guohuang/package-name2

added packageName in the codegen option
This commit is contained in:
wing328 2016-04-29 22:33:50 +08:00
commit cd377ba69c
15 changed files with 18 additions and 18 deletions

View File

@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/go -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go -o samples/client/petstore/go/go-petstore" ags="$@ generate -t modules/swagger-codegen/src/main/resources/go -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go -o samples/client/petstore/go/go-petstore -DpackageName=petstore "
java $JAVA_OPTS -jar $executable $ags java $JAVA_OPTS -jar $executable $ags

View File

@ -1,4 +1,4 @@
# Go API client for swagger # Go API client for petstore
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
@ -7,13 +7,13 @@ This API client was generated by the [swagger-codegen](https://github.com/swagge
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-04-23T17:00:49.475-07:00 - Build date: 2016-04-27T21:14:49.805-07:00
- Build package: class io.swagger.codegen.languages.GoClientCodegen - Build package: class io.swagger.codegen.languages.GoClientCodegen
## Installation ## Installation
Put the package under your project folder and add the following in import: Put the package under your project folder and add the following in import:
``` ```
"./swagger" "./petstore"
``` ```
## Documentation for API Endpoints ## Documentation for API Endpoints

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"strings" "strings"

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"net/http" "net/http"

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
) )

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"encoding/base64" "encoding/base64"

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
) )

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"time" "time"

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
) )

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"strings" "strings"

View File

@ -1,10 +1,10 @@
<project> <project>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId> <groupId>com.wordnik</groupId>
<artifactId>Goswagger</artifactId> <artifactId>Gopetstore</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0.0</version> <version>1.0.0</version>
<name>Goswagger</name> <name>Gopetstore</name>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"strings" "strings"

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
) )

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
) )

View File

@ -1,4 +1,4 @@
package swagger package petstore
import ( import (
"strings" "strings"