forked from loafle/openapi-generator-original
Do not check status code for default response (#3322)
* Do not check status code for default response * Updated generated code/docs Because Circle CI said > Please run 'bin/utils/ensure-up-to-date' locally and commit > changes (UNCOMMITTED CHANGES ERROR)
This commit is contained in:
committed by
William Cheng
parent
2cab048d41
commit
cb2bf4d2bf
@@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault,
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 0 {
|
||||
var v InlineResponseDefault
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
@@ -92,8 +91,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -193,7 +192,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -295,7 +293,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -393,7 +390,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -491,7 +487,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -717,7 +712,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -110,7 +110,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -243,6 +243,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string)
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -331,6 +332,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -433,6 +435,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -694,7 +697,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -800,7 +802,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -176,7 +176,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -271,6 +270,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -359,6 +359,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order,
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -366,6 +366,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -455,6 +456,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | Pointer to **string** | | [optional]
|
||||
**Foo** | Pointer to **string** | | [optional]
|
||||
**Bar** | Pointer to **string** | | [optional] [readonly]
|
||||
**Foo** | Pointer to **string** | | [optional] [readonly]
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | Pointer to **int32** | |
|
||||
**SnakeCase** | Pointer to **int32** | | [optional]
|
||||
**SnakeCase** | Pointer to **int32** | | [optional] [readonly]
|
||||
**Property** | Pointer to **string** | | [optional]
|
||||
**Var123Number** | Pointer to **int32** | | [optional]
|
||||
**Var123Number** | Pointer to **int32** | | [optional] [readonly]
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | Pointer to **string** | | [optional]
|
||||
**Bar** | Pointer to **string** | | [optional] [readonly]
|
||||
**Baz** | Pointer to **string** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault,
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 0 {
|
||||
var v InlineResponseDefault
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
@@ -92,8 +91,6 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -193,7 +192,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -295,7 +293,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -393,7 +390,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -491,7 +487,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -717,7 +712,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -692,7 +692,6 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
@@ -798,7 +797,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
@@ -174,7 +174,6 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user