mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
update go readme, update pom go dependencies (#274)
This commit is contained in:
parent
8730f910b2
commit
799b033c22
@ -5,7 +5,7 @@
|
|||||||
{{/appDescription}}
|
{{/appDescription}}
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
|
This API client was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
- API version: {{appVersion}}
|
- API version: {{appVersion}}
|
||||||
- Package version: {{packageVersion}}
|
- Package version: {{packageVersion}}
|
||||||
@ -18,6 +18,16 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
|||||||
{{/infoUrl}}
|
{{/infoUrl}}
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
Install the following dependencies:
|
||||||
|
```
|
||||||
|
go get github.com/stretchr/testify/assert
|
||||||
|
go get golang.org/x/oauth2
|
||||||
|
go get golang.org/x/net/context
|
||||||
|
go get gopkg.in/go-resty/resty.v0
|
||||||
|
go get github.com/antihax/optional
|
||||||
|
```
|
||||||
|
|
||||||
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:
|
||||||
```golang
|
```golang
|
||||||
import "./{{packageName}}"
|
import "./{{packageName}}"
|
||||||
|
@ -3,13 +3,23 @@
|
|||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
|
This API client was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
Install the following dependencies:
|
||||||
|
```
|
||||||
|
go get github.com/stretchr/testify/assert
|
||||||
|
go get golang.org/x/oauth2
|
||||||
|
go get golang.org/x/net/context
|
||||||
|
go get gopkg.in/go-resty/resty.v0
|
||||||
|
go get github.com/antihax/optional
|
||||||
|
```
|
||||||
|
|
||||||
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:
|
||||||
```golang
|
```golang
|
||||||
import "./petstore"
|
import "./petstore"
|
||||||
|
@ -100,11 +100,11 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
default: available
|
||||||
enum:
|
enum:
|
||||||
- available
|
- available
|
||||||
- pending
|
- pending
|
||||||
- sold
|
- sold
|
||||||
default: available
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -613,20 +613,20 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
default: $
|
||||||
enum:
|
enum:
|
||||||
- '>'
|
- '>'
|
||||||
- $
|
- $
|
||||||
default: $
|
|
||||||
- name: enum_header_string
|
- name: enum_header_string
|
||||||
in: header
|
in: header
|
||||||
description: Header parameter enum test (string)
|
description: Header parameter enum test (string)
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
default: -efg
|
||||||
enum:
|
enum:
|
||||||
- _abc
|
- _abc
|
||||||
- -efg
|
- -efg
|
||||||
- (xyz)
|
- (xyz)
|
||||||
default: -efg
|
|
||||||
- name: enum_query_string_array
|
- name: enum_query_string_array
|
||||||
in: query
|
in: query
|
||||||
description: Query parameter enum test (string array)
|
description: Query parameter enum test (string array)
|
||||||
@ -635,20 +635,20 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
default: $
|
||||||
enum:
|
enum:
|
||||||
- '>'
|
- '>'
|
||||||
- $
|
- $
|
||||||
default: $
|
|
||||||
- name: enum_query_string
|
- name: enum_query_string
|
||||||
in: query
|
in: query
|
||||||
description: Query parameter enum test (string)
|
description: Query parameter enum test (string)
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
default: -efg
|
||||||
enum:
|
enum:
|
||||||
- _abc
|
- _abc
|
||||||
- -efg
|
- -efg
|
||||||
- (xyz)
|
- (xyz)
|
||||||
default: -efg
|
|
||||||
- name: enum_query_integer
|
- name: enum_query_integer
|
||||||
in: query
|
in: query
|
||||||
description: Query parameter enum test (double)
|
description: Query parameter enum test (double)
|
||||||
@ -677,18 +677,18 @@ paths:
|
|||||||
description: Form parameter enum test (string array)
|
description: Form parameter enum test (string array)
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
default: $
|
||||||
enum:
|
enum:
|
||||||
- '>'
|
- '>'
|
||||||
- $
|
- $
|
||||||
default: $
|
|
||||||
enum_form_string:
|
enum_form_string:
|
||||||
type: string
|
type: string
|
||||||
description: Form parameter enum test (string)
|
description: Form parameter enum test (string)
|
||||||
|
default: -efg
|
||||||
enum:
|
enum:
|
||||||
- _abc
|
- _abc
|
||||||
- -efg
|
- -efg
|
||||||
- (xyz)
|
- (xyz)
|
||||||
default: -efg
|
|
||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: Invalid request
|
description: Invalid request
|
||||||
@ -1100,11 +1100,11 @@ components:
|
|||||||
name: Name
|
name: Name
|
||||||
EnumClass:
|
EnumClass:
|
||||||
type: string
|
type: string
|
||||||
|
default: -efg
|
||||||
enum:
|
enum:
|
||||||
- _abc
|
- _abc
|
||||||
- -efg
|
- -efg
|
||||||
- (xyz)
|
- (xyz)
|
||||||
default: -efg
|
|
||||||
List:
|
List:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -32,12 +32,12 @@ FakeApiService
|
|||||||
Test serialization of outer boolean types
|
Test serialization of outer boolean types
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
|
* @param optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
|
||||||
* @param "BooleanPostBody" (optional.Bool) - Input boolean as post body
|
* @param "Body" (optional.Bool) - Input boolean as post body
|
||||||
@return bool
|
@return bool
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type FakeOuterBooleanSerializeOpts struct {
|
type FakeOuterBooleanSerializeOpts struct {
|
||||||
BooleanPostBody optional.Bool
|
Body optional.Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
|
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
|
||||||
@ -74,8 +74,8 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
if localVarOptionals != nil && localVarOptionals.BooleanPostBody.IsSet() {
|
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
|
||||||
localVarPostBody = localVarOptionals.BooleanPostBody.Value()
|
localVarPostBody = localVarOptionals.Body.Value()
|
||||||
}
|
}
|
||||||
|
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
|
@ -34,7 +34,7 @@ Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeO
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**booleanPostBody** | **optional.Bool**| Input boolean as post body |
|
**body** | **optional.Bool**| Input boolean as post body |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -82,6 +82,20 @@
|
|||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>go-get-resty</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>go</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>get</argument>
|
||||||
|
<argument>github.com/antihax/optional</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>go-test</id>
|
<id>go-test</id>
|
||||||
<phase>integration-test</phase>
|
<phase>integration-test</phase>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user