File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ elif [ "$NODE_INDEX" = "2" ]; then
2424 # install elm-format
2525 npm install -g elm-format
2626
27+ # clear any changes to the samples
28+ git checkout -- .
29+
30+ # look for outdated samples
2731 ./bin/utils/ensure-up-to-date
2832 fi
2933# elif [ "$NODE_INDEX" = "3" ]; then
Original file line number Diff line number Diff line change @@ -29,13 +29,12 @@ SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
2929GENERATOR=" go-gin-server"
3030STUB_DIR=" samples/server/petstore/go-gin-api-server"
3131
32- echo " Removing files and folders under $STUB_DIR "
33- rm -rf $STUB_DIR
32+ echo " Removing auto-generated files and folders under $STUB_DIR "
33+ rm -rf $STUB_DIR /go
3434
3535# if you've executed sbt assembly previously it will use that instead.
3636export JAVA_OPTS=" ${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
3737
3838ags=" generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@ "
3939
4040java $JAVA_OPTS -jar $executable $ags
41- #! /usr/bin/env bash
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
2929GENERATOR=" go-server"
3030STUB_DIR=" samples/server/petstore/go-api-server"
3131
32- echo " Removing files and folders under $STUB_DIR "
33- rm -rf $STUB_DIR
32+ echo " Removing auto-generated files and folders under $STUB_DIR "
33+ rm -rf $STUB_DIR /go
3434
3535# if you've executed sbt assembly previously it will use that instead.
3636export JAVA_OPTS=" ${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ declare -a scripts=(
6161" ./bin/go-experimental-petstore.sh"
6262" ./bin/go-petstore.sh"
6363" ./bin/go-petstore-withxml.sh"
64+ " ./bin/go-petstore-server.sh"
6465" ./bin/go-gin-petstore-server.sh"
6566" ./bin/groovy-petstore.sh"
6667" ./bin/apex-petstore.sh"
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ set GENERATOR=go-gin-server
1111set STUB_DIR = samples\server\petstore\go-gin-api-server
1212
1313echo Removing files and folders under %STUB_DIR%
14- del /F /S /Q %STUB_DIR%
14+ del /F /S /Q %STUB_DIR% \go
1515
1616REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
1717set ags = generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ set GENERATOR=go-server
1111set STUB_DIR = samples\server\petstore\go-api-server
1212
1313echo Removing files and folders under %STUB_DIR%
14- del /F /S /Q %STUB_DIR%
14+ del /F /S /Q %STUB_DIR% \go
1515
1616REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
1717set ags = generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver
1818
1919java %JAVA_OPTS% -jar %executable% %ags%
2020
21- endlocal
21+ endlocal
Original file line number Diff line number Diff line change 11831183 </property >
11841184 </activation >
11851185 <modules >
1186+ <module >samples/server/petstore/go-api-server</module >
1187+ <module >samples/server/petstore/go-gin-api-server</module >
11861188 <!-- clients -->
11871189 <module >samples/openapi3/client/petstore/ruby</module >
11881190 <!-- test java-related projects -->
Original file line number Diff line number Diff line change 1+ <project >
2+ <modelVersion >4.0.0</modelVersion >
3+ <groupId >org.openapitools</groupId >
4+ <artifactId >GoApiServer</artifactId >
5+ <packaging >pom</packaging >
6+ <version >1.0-SNAPSHOT</version >
7+ <name >Go Api Server</name >
8+ <build >
9+ <plugins >
10+ <plugin >
11+ <artifactId >maven-dependency-plugin</artifactId >
12+ <executions >
13+ <execution >
14+ <phase >package</phase >
15+ <goals >
16+ <goal >copy-dependencies</goal >
17+ </goals >
18+ <configuration >
19+ <outputDirectory >${project.build.directory} </outputDirectory >
20+ </configuration >
21+ </execution >
22+ </executions >
23+ </plugin >
24+ <plugin >
25+ <groupId >org.codehaus.mojo</groupId >
26+ <artifactId >exec-maven-plugin</artifactId >
27+ <version >1.2.1</version >
28+ <executions >
29+ <execution >
30+ <id >gofmt-test</id >
31+ <phase >integration-test</phase >
32+ <goals >
33+ <goal >exec</goal >
34+ </goals >
35+ <configuration >
36+ <executable >gofmt</executable >
37+ <arguments >
38+ <argument >-w</argument >
39+ <argument >./main.go</argument >
40+ </arguments >
41+ </configuration >
42+ </execution >
43+ <execution >
44+ <id >gofmt-file-test</id >
45+ <phase >integration-test</phase >
46+ <goals >
47+ <goal >exec</goal >
48+ </goals >
49+ <configuration >
50+ <executable >gofmt</executable >
51+ <arguments >
52+ <argument >-w</argument >
53+ <argument >./go/</argument >
54+ </arguments >
55+ </configuration >
56+ </execution >
57+ </executions >
58+ </plugin >
59+ </plugins >
60+ </build >
61+ </project >
Original file line number Diff line number Diff line change 1+ <project >
2+ <modelVersion >4.0.0</modelVersion >
3+ <groupId >org.openapitools</groupId >
4+ <artifactId >GoGinServer</artifactId >
5+ <packaging >pom</packaging >
6+ <version >1.0-SNAPSHOT</version >
7+ <name >Go Gin Server</name >
8+ <build >
9+ <plugins >
10+ <plugin >
11+ <artifactId >maven-dependency-plugin</artifactId >
12+ <executions >
13+ <execution >
14+ <phase >package</phase >
15+ <goals >
16+ <goal >copy-dependencies</goal >
17+ </goals >
18+ <configuration >
19+ <outputDirectory >${project.build.directory} </outputDirectory >
20+ </configuration >
21+ </execution >
22+ </executions >
23+ </plugin >
24+ <plugin >
25+ <groupId >org.codehaus.mojo</groupId >
26+ <artifactId >exec-maven-plugin</artifactId >
27+ <version >1.2.1</version >
28+ <executions >
29+ <execution >
30+ <id >gofmt-test</id >
31+ <phase >integration-test</phase >
32+ <goals >
33+ <goal >exec</goal >
34+ </goals >
35+ <configuration >
36+ <executable >gofmt</executable >
37+ <arguments >
38+ <argument >-w</argument >
39+ <argument >./main.go</argument >
40+ </arguments >
41+ </configuration >
42+ </execution >
43+ <execution >
44+ <id >gofmt-file-test</id >
45+ <phase >integration-test</phase >
46+ <goals >
47+ <goal >exec</goal >
48+ </goals >
49+ <configuration >
50+ <executable >gofmt</executable >
51+ <arguments >
52+ <argument >-w</argument >
53+ <argument >./go/</argument >
54+ </arguments >
55+ </configuration >
56+ </execution >
57+ </executions >
58+ </plugin >
59+ </plugins >
60+ </build >
61+ </project >
You can’t perform that action at this time.
0 commit comments