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

[Golang][client] delete sample output dir before rebuild #477

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
3 changes: 3 additions & 0 deletions bin/go-petstore-withxml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ then
mvn -B clean package
fi

echo "Removing files and folders under samples/client/petstore/go/go-petstore-withXml"
rm -rf samples/client/petstore/go/go-petstore-withXml

# 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"
ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore-withXml -DpackageName=petstore,withXml=true $@"
Expand Down
3 changes: 3 additions & 0 deletions bin/go-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ then
mvn -B clean package
fi

echo "Removing files and folders under samples/client/petstore/go/go-petstore"
rm -rf samples/client/petstore/go/go-petstore

# 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"
ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore -DpackageName=petstore $@"
Expand Down
3 changes: 3 additions & 0 deletions samples/client/petstore/go/go-petstore-withXml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite |
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number |
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string |
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema |
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params |
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Expand Down Expand Up @@ -83,6 +84,8 @@ Class | Method | HTTP request | Description
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
- [File](docs/File.md)
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
- [FormatTest](docs/FormatTest.md)
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [List](docs/List.md)
Expand Down
39 changes: 39 additions & 0 deletions samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,22 @@ paths:
summary: To test special tags
tags:
- $another-fake?
/fake/body-with-file-schema:
put:
description: For this test, the body for this request much reference a schema named `File`.
operationId: testBodyWithFileSchema
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FileSchemaTestClass'
required: true
responses:
200:
content: {}
description: Success
tags:
- fake
/fake/{petId}/uploadImageWithRequiredFile:
post:
operationId: uploadFileWithRequiredFile
Expand Down Expand Up @@ -1413,6 +1429,21 @@ components:
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
Expand Down Expand Up @@ -1475,6 +1506,14 @@ components:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
example:
sourceURI: sourceURI
properties:
sourceURI:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
Expand Down
Loading