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:
Thiago Arrais 2019-10-14 14:29:46 -03:00 committed by William Cheng
parent 2cab048d41
commit cb2bf4d2bf
56 changed files with 377 additions and 219 deletions

View File

@ -2665,6 +2665,11 @@ public class DefaultCodegen implements CodegenConfig {
op.isResponseFile = Boolean.TRUE;
}
}
op.responses.sort((a, b) -> {
int aDefault = "0".equals(a.code) ? 1 : 0;
int bDefault = "0".equals(b.code) ? 1 : 0;
return aDefault - bDefault;
});
op.responses.get(op.responses.size() - 1).hasMore = false;
if (methodResponse != null) {

View File

@ -319,7 +319,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams
}
{{#responses}}
{{#dataType}}
{{^wildcard}}
if localVarHTTPResponse.StatusCode == {{{code}}} {
{{/wildcard}}
var v {{{dataType}}}
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
@ -327,8 +329,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
}
newErr.model = v
{{#hasMore}}
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
{{/hasMore}}
{{^wildcard}}
}
{{/wildcard}}
{{/dataType}}
{{/responses}}
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr

View File

@ -317,7 +317,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams
}
{{#responses}}
{{#dataType}}
{{^wildcard}}
if localVarHTTPResponse.StatusCode == {{{code}}} {
{{/wildcard}}
var v {{{dataType}}}
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
@ -325,8 +327,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
}
newErr.model = v
{{#hasMore}}
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
{{/hasMore}}
{{^wildcard}}
}
{{/wildcard}}
{{/dataType}}
{{/responses}}
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr

View File

@ -595,6 +595,25 @@ public class DefaultCodegenTest {
Assert.assertEquals(co2.path, "/some/path");
}
@Test
public void testDefaultResponseShouldBeLast() {
OpenAPI openAPI = TestUtils.createOpenAPI();
Operation myOperation = new Operation().operationId("myOperation").responses(
new ApiResponses()
.addApiResponse(
"default", new ApiResponse().description("Default"))
.addApiResponse(
"422", new ApiResponse().description("Error"))
);
openAPI.path("/here", new PathItem().get(myOperation));
final DefaultCodegen codegen = new DefaultCodegen();
codegen.setOpenAPI(openAPI);
CodegenOperation co = codegen.fromOperation("/here", "get", myOperation, null);
Assert.assertEquals(co.responses.get(0).message, "Error");
Assert.assertEquals(co.responses.get(1).message, "Default");
}
@Test
public void testResponseWithNoSchemaInHeaders() {
OpenAPI openAPI = TestUtils.createOpenAPI();

View File

@ -21,9 +21,9 @@ import Json.Encode as Encode
{-| Describes the result of uploading an image resource
-}
type alias ApiResponse =
{ code : Maybe Int
, type_ : Maybe String
, message : Maybe String
{ code : Maybe (Int)
, type_ : Maybe (String)
, message : Maybe (String)
}
@ -35,15 +35,22 @@ decoder =
|> optional "message" (Decode.nullable Decode.string) Nothing
encode : ApiResponse -> Encode.Value
encode model =
Encode.object
[ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) )
, ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) )
, ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) )
]
toString : ApiResponse -> String
toString =
Encode.encode 0 << encode

View File

@ -21,8 +21,8 @@ import Json.Encode as Encode
{-| A category for a pet
-}
type alias Category =
{ id : Maybe Int
, name : Maybe String
{ id : Maybe (Int)
, name : Maybe (String)
}
@ -33,14 +33,21 @@ decoder =
|> optional "name" (Decode.nullable Decode.string) Nothing
encode : Category -> Encode.Value
encode model =
Encode.object
[ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) )
, ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) )
]
toString : Category -> String
toString =
Encode.encode 0 << encode

View File

@ -22,12 +22,12 @@ import Json.Encode as Encode
{-| An order for a pets from the pet store
-}
type alias Order_ =
{ id : Maybe Int
, petId : Maybe Int
, quantity : Maybe Int
, shipDate : Maybe DateTime
, status : Maybe Status
, complete : Maybe Bool
{ id : Maybe (Int)
, petId : Maybe (Int)
, quantity : Maybe (Int)
, shipDate : Maybe (DateTime)
, status : Maybe (Status)
, complete : Maybe (Bool)
}
@ -37,6 +37,7 @@ type Status
| Delivered
decoder : Decoder Order_
decoder =
decode Order_
@ -48,6 +49,7 @@ decoder =
|> optional "complete" (Decode.nullable Decode.bool) (Just False)
encode : Order_ -> Encode.Value
encode model =
Encode.object
@ -57,14 +59,18 @@ encode model =
, ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) )
, ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) )
, ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) )
]
toString : Order_ -> String
toString =
Encode.encode 0 << encode
statusDecoder : Decoder Status
statusDecoder =
Decode.string
@ -85,6 +91,7 @@ statusDecoder =
)
encodeStatus : Status -> Encode.Value
encodeStatus model =
case model of
@ -96,3 +103,7 @@ encodeStatus model =
Delivered ->
Encode.string "delivered"

View File

@ -23,12 +23,12 @@ import Json.Encode as Encode
{-| A pet for sale in the pet store
-}
type alias Pet =
{ id : Maybe Int
, category : Maybe Category
{ id : Maybe (Int)
, category : Maybe (Category)
, name : String
, photoUrls : List String
, tags : Maybe (List Tag)
, status : Maybe Status
, photoUrls : (List String)
, tags : Maybe ((List Tag))
, status : Maybe (Status)
}
@ -38,6 +38,7 @@ type Status
| Sold
decoder : Decoder Pet
decoder =
decode Pet
@ -49,6 +50,7 @@ decoder =
|> optional "status" (Decode.nullable statusDecoder) Nothing
encode : Pet -> Encode.Value
encode model =
Encode.object
@ -58,14 +60,18 @@ encode model =
, ( "photoUrls", (Encode.list << List.map Encode.string) model.photoUrls )
, ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list << List.map Tag.encode) model.tags) )
, ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) )
]
toString : Pet -> String
toString =
Encode.encode 0 << encode
statusDecoder : Decoder Status
statusDecoder =
Decode.string
@ -86,6 +92,7 @@ statusDecoder =
)
encodeStatus : Status -> Encode.Value
encodeStatus model =
case model of
@ -97,3 +104,7 @@ encodeStatus model =
Sold ->
Encode.string "sold"

View File

@ -21,8 +21,8 @@ import Json.Encode as Encode
{-| A tag for a pet
-}
type alias Tag =
{ id : Maybe Int
, name : Maybe String
{ id : Maybe (Int)
, name : Maybe (String)
}
@ -33,14 +33,21 @@ decoder =
|> optional "name" (Decode.nullable Decode.string) Nothing
encode : Tag -> Encode.Value
encode model =
Encode.object
[ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) )
, ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) )
]
toString : Tag -> String
toString =
Encode.encode 0 << encode

View File

@ -21,14 +21,14 @@ import Json.Encode as Encode
{-| A User who is purchasing from the pet store
-}
type alias User =
{ id : Maybe Int
, username : Maybe String
, firstName : Maybe String
, lastName : Maybe String
, email : Maybe String
, password : Maybe String
, phone : Maybe String
, userStatus : Maybe Int
{ id : Maybe (Int)
, username : Maybe (String)
, firstName : Maybe (String)
, lastName : Maybe (String)
, email : Maybe (String)
, password : Maybe (String)
, phone : Maybe (String)
, userStatus : Maybe (Int)
}
@ -45,6 +45,7 @@ decoder =
|> optional "userStatus" (Decode.nullable Decode.int) Nothing
encode : User -> Encode.Value
encode model =
Encode.object
@ -56,9 +57,15 @@ encode model =
, ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) )
, ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) )
, ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) )
]
toString : User -> String
toString =
Encode.encode 0 << encode

View File

@ -34,4 +34,4 @@ decodeIsoString str =
toString : DateTime -> String
toString =
toIsoString
toIsoString

View File

@ -12,8 +12,8 @@
module Request.Pet exposing (addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile)
import Data.ApiResponse as ApiResponse exposing (ApiResponse)
import Data.Pet as Pet exposing (Pet)
import Data.ApiResponse as ApiResponse exposing (ApiResponse)
import Dict
import Http
import Json.Decode as Decode
@ -40,7 +40,7 @@ addPet model =
deletePet : Int -> Http.Request ()
deletePet petId =
{ method = "DELETE"
, url = basePath ++ "/pet/" ++ toString petId
, url = basePath ++ "/pet/" ++ toString petId
, headers = []
, body = Http.emptyBody
, expect = Http.expectStringResponse (\_ -> Ok ())
@ -85,7 +85,7 @@ findPetsByTags =
getPetById : Int -> Http.Request Pet
getPetById petId =
{ method = "GET"
, url = basePath ++ "/pet/" ++ toString petId
, url = basePath ++ "/pet/" ++ toString petId
, headers = []
, body = Http.emptyBody
, expect = Http.expectJson Pet.decoder
@ -111,7 +111,7 @@ updatePet model =
updatePetWithForm : Int -> Http.Request ()
updatePetWithForm petId =
{ method = "POST"
, url = basePath ++ "/pet/" ++ toString petId
, url = basePath ++ "/pet/" ++ toString petId
, headers = []
, body = Http.emptyBody
, expect = Http.expectStringResponse (\_ -> Ok ())
@ -124,7 +124,7 @@ updatePetWithForm petId =
uploadFile : Int -> Http.Request ApiResponse
uploadFile petId =
{ method = "POST"
, url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage"
, url = basePath ++ "/pet/" ++ toString petId ++ "/uploadImage"
, headers = []
, body = Http.emptyBody
, expect = Http.expectJson ApiResponse.decoder

View File

@ -28,7 +28,7 @@ basePath =
deleteOrder : String -> Http.Request ()
deleteOrder orderId =
{ method = "DELETE"
, url = basePath ++ "/store/order/" ++ orderId
, url = basePath ++ "/store/order/" ++ orderId
, headers = []
, body = Http.emptyBody
, expect = Http.expectStringResponse (\_ -> Ok ())
@ -58,7 +58,7 @@ getInventory =
getOrderById : Int -> Http.Request Order_
getOrderById orderId =
{ method = "GET"
, url = basePath ++ "/store/order/" ++ toString orderId
, url = basePath ++ "/store/order/" ++ toString orderId
, headers = []
, body = Http.emptyBody
, expect = Http.expectJson Order_.decoder

View File

@ -69,7 +69,7 @@ createUsersWithListInput model =
deleteUser : String -> Http.Request ()
deleteUser username =
{ method = "DELETE"
, url = basePath ++ "/user/" ++ username
, url = basePath ++ "/user/" ++ username
, headers = []
, body = Http.emptyBody
, expect = Http.expectStringResponse (\_ -> Ok ())
@ -82,7 +82,7 @@ deleteUser username =
getUserByName : String -> Http.Request User
getUserByName username =
{ method = "GET"
, url = basePath ++ "/user/" ++ username
, url = basePath ++ "/user/" ++ username
, headers = []
, body = Http.emptyBody
, expect = Http.expectJson User.decoder
@ -123,7 +123,7 @@ logoutUser =
updateUser : String -> User -> Http.Request ()
updateUser username model =
{ method = "PUT"
, url = basePath ++ "/user/" ++ username
, url = basePath ++ "/user/" ++ username
, headers = []
, body = Http.jsonBody <| User.encode model
, expect = Http.expectStringResponse (\_ -> Ok ())

View File

@ -21,9 +21,9 @@ import Json.Encode as Encode
{-| Describes the result of uploading an image resource
-}
type alias ApiResponse =
{ code : Maybe Int
, type_ : Maybe String
, message : Maybe String
{ code : Maybe (Int)
, type_ : Maybe (String)
, message : Maybe (String)
}
@ -35,15 +35,22 @@ decoder =
|> optional "message" (Decode.nullable Decode.string) Nothing
encode : ApiResponse -> Encode.Value
encode model =
Encode.object
[ ( "code", Maybe.withDefault Encode.null (Maybe.map Encode.int model.code) )
, ( "type", Maybe.withDefault Encode.null (Maybe.map Encode.string model.type_) )
, ( "message", Maybe.withDefault Encode.null (Maybe.map Encode.string model.message) )
]
toString : ApiResponse -> String
toString =
Encode.encode 0 << encode

View File

@ -21,8 +21,8 @@ import Json.Encode as Encode
{-| A category for a pet
-}
type alias Category =
{ id : Maybe Int
, name : Maybe String
{ id : Maybe (Int)
, name : Maybe (String)
}
@ -33,14 +33,21 @@ decoder =
|> optional "name" (Decode.nullable Decode.string) Nothing
encode : Category -> Encode.Value
encode model =
Encode.object
[ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) )
, ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) )
]
toString : Category -> String
toString =
Encode.encode 0 << encode

View File

@ -22,12 +22,12 @@ import Json.Encode as Encode
{-| An order for a pets from the pet store
-}
type alias Order_ =
{ id : Maybe Int
, petId : Maybe Int
, quantity : Maybe Int
, shipDate : Maybe DateTime
, status : Maybe Status
, complete : Maybe Bool
{ id : Maybe (Int)
, petId : Maybe (Int)
, quantity : Maybe (Int)
, shipDate : Maybe (DateTime)
, status : Maybe (Status)
, complete : Maybe (Bool)
}
@ -37,6 +37,7 @@ type Status
| Delivered
decoder : Decoder Order_
decoder =
Decode.succeed Order_
@ -48,6 +49,7 @@ decoder =
|> optional "complete" (Decode.nullable Decode.bool) (Just False)
encode : Order_ -> Encode.Value
encode model =
Encode.object
@ -57,14 +59,18 @@ encode model =
, ( "shipDate", Maybe.withDefault Encode.null (Maybe.map DateTime.encode model.shipDate) )
, ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) )
, ( "complete", Maybe.withDefault Encode.null (Maybe.map Encode.bool model.complete) )
]
toString : Order_ -> String
toString =
Encode.encode 0 << encode
statusDecoder : Decoder Status
statusDecoder =
Decode.string
@ -85,6 +91,7 @@ statusDecoder =
)
encodeStatus : Status -> Encode.Value
encodeStatus model =
case model of
@ -96,3 +103,7 @@ encodeStatus model =
Delivered ->
Encode.string "delivered"

View File

@ -23,12 +23,12 @@ import Json.Encode as Encode
{-| A pet for sale in the pet store
-}
type alias Pet =
{ id : Maybe Int
, category : Maybe Category
{ id : Maybe (Int)
, category : Maybe (Category)
, name : String
, photoUrls : List String
, tags : Maybe (List Tag)
, status : Maybe Status
, photoUrls : (List String)
, tags : Maybe ((List Tag))
, status : Maybe (Status)
}
@ -38,6 +38,7 @@ type Status
| Sold
decoder : Decoder Pet
decoder =
Decode.succeed Pet
@ -49,23 +50,28 @@ decoder =
|> optional "status" (Decode.nullable statusDecoder) Nothing
encode : Pet -> Encode.Value
encode model =
Encode.object
[ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) )
, ( "category", Maybe.withDefault Encode.null (Maybe.map Category.encode model.category) )
, ( "name", Encode.string model.name )
, ( "photoUrls", Encode.list Encode.string model.photoUrls )
, ( "photoUrls", (Encode.list Encode.string) model.photoUrls )
, ( "tags", Maybe.withDefault Encode.null (Maybe.map (Encode.list Tag.encode) model.tags) )
, ( "status", Maybe.withDefault Encode.null (Maybe.map encodeStatus model.status) )
]
toString : Pet -> String
toString =
Encode.encode 0 << encode
statusDecoder : Decoder Status
statusDecoder =
Decode.string
@ -86,6 +92,7 @@ statusDecoder =
)
encodeStatus : Status -> Encode.Value
encodeStatus model =
case model of
@ -97,3 +104,7 @@ encodeStatus model =
Sold ->
Encode.string "sold"

View File

@ -21,8 +21,8 @@ import Json.Encode as Encode
{-| A tag for a pet
-}
type alias Tag =
{ id : Maybe Int
, name : Maybe String
{ id : Maybe (Int)
, name : Maybe (String)
}
@ -33,14 +33,21 @@ decoder =
|> optional "name" (Decode.nullable Decode.string) Nothing
encode : Tag -> Encode.Value
encode model =
Encode.object
[ ( "id", Maybe.withDefault Encode.null (Maybe.map Encode.int model.id) )
, ( "name", Maybe.withDefault Encode.null (Maybe.map Encode.string model.name) )
]
toString : Tag -> String
toString =
Encode.encode 0 << encode

View File

@ -21,14 +21,14 @@ import Json.Encode as Encode
{-| A User who is purchasing from the pet store
-}
type alias User =
{ id : Maybe Int
, username : Maybe String
, firstName : Maybe String
, lastName : Maybe String
, email : Maybe String
, password : Maybe String
, phone : Maybe String
, userStatus : Maybe Int
{ id : Maybe (Int)
, username : Maybe (String)
, firstName : Maybe (String)
, lastName : Maybe (String)
, email : Maybe (String)
, password : Maybe (String)
, phone : Maybe (String)
, userStatus : Maybe (Int)
}
@ -45,6 +45,7 @@ decoder =
|> optional "userStatus" (Decode.nullable Decode.int) Nothing
encode : User -> Encode.Value
encode model =
Encode.object
@ -56,9 +57,15 @@ encode model =
, ( "password", Maybe.withDefault Encode.null (Maybe.map Encode.string model.password) )
, ( "phone", Maybe.withDefault Encode.null (Maybe.map Encode.string model.phone) )
, ( "userStatus", Maybe.withDefault Encode.null (Maybe.map Encode.int model.userStatus) )
]
toString : User -> String
toString =
Encode.encode 0 << encode

View File

@ -34,4 +34,4 @@ decodeIsoString str =
toString : DateTime -> String
toString =
Iso8601.fromTime
Iso8601.fromTime

View File

@ -10,10 +10,10 @@
-}
module Request.Pet exposing (Status(..), addPet, deletePet, findPetsByStatus, findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile)
module Request.Pet exposing (addPet, deletePet, findPetsByStatus, Status(..), findPetsByTags, getPetById, updatePet, updatePetWithForm, uploadFile)
import Data.ApiResponse as ApiResponse exposing (ApiResponse)
import Data.Pet as Pet exposing (Pet)
import Data.ApiResponse as ApiResponse exposing (ApiResponse)
import Dict
import Http
import Json.Decode as Decode
@ -25,7 +25,6 @@ type Status
| Pending
| Sold
stringifyStatus : Status -> String
stringifyStatus value =
case value of
@ -39,6 +38,9 @@ stringifyStatus value =
"sold"
basePath : String
basePath =
"http://petstore.swagger.io/v2"
@ -46,17 +48,20 @@ basePath =
addPet :
{ onSend : Result Http.Error () -> msg
, body : Pet
}
-> Cmd msg
addPet params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["pet"]
(List.filterMap identity [])
, body = Http.jsonBody <| Pet.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -65,21 +70,23 @@ addPet params =
deletePet :
{ apiKey : Maybe String
{ apiKey : Maybe (String)
} ->
{ onSend : Result Http.Error () -> msg
, petId : Int
}
->
{ onSend : Result Http.Error () -> msg
, petId : Int
}
-> Cmd msg
deletePet headers params =
Http.request
{ method = "DELETE"
, headers = List.filterMap identity [ Maybe.map (Http.header "api_key" << identity) headers.apiKey ]
, url =
Url.crossOrigin basePath
[ "pet", String.fromInt params.petId ]
(List.filterMap identity [])
, headers = List.filterMap identity [Maybe.map (Http.header "api_key" << identity) headers.apiKey]
, url = Url.crossOrigin basePath
["pet", String.fromInt params.petId]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -91,6 +98,10 @@ deletePet headers params =
-}
findPetsByStatus :
{ onSend : Result Http.Error (List Pet) -> msg
, status : List Status
}
-> Cmd msg
@ -98,10 +109,9 @@ findPetsByStatus params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet", "findByStatus" ]
(List.filterMap identity [ (Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status ])
, url = Url.crossOrigin basePath
["pet", "findByStatus"]
(List.filterMap identity [(Just << Url.string "status" << String.join "," << List.map stringifyStatus) params.status])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend (Decode.list Pet.decoder)
, timeout = Just 30000
@ -113,6 +123,10 @@ findPetsByStatus params =
-}
findPetsByTags :
{ onSend : Result Http.Error (List Pet) -> msg
, tags : List String
}
-> Cmd msg
@ -120,10 +134,9 @@ findPetsByTags params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet", "findByTags" ]
(List.filterMap identity [ (Just << Url.string "tags" << String.join "," << List.map identity) params.tags ])
, url = Url.crossOrigin basePath
["pet", "findByTags"]
(List.filterMap identity [(Just << Url.string "tags" << String.join "," << List.map identity) params.tags])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend (Decode.list Pet.decoder)
, timeout = Just 30000
@ -135,17 +148,20 @@ findPetsByTags params =
-}
getPetById :
{ onSend : Result Http.Error Pet -> msg
, petId : Int
}
-> Cmd msg
getPetById params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet", String.fromInt params.petId ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["pet", String.fromInt params.petId]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend Pet.decoder
, timeout = Just 30000
@ -155,17 +171,20 @@ getPetById params =
updatePet :
{ onSend : Result Http.Error () -> msg
, body : Pet
}
-> Cmd msg
updatePet params =
Http.request
{ method = "PUT"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["pet"]
(List.filterMap identity [])
, body = Http.jsonBody <| Pet.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -175,17 +194,20 @@ updatePet params =
updatePetWithForm :
{ onSend : Result Http.Error () -> msg
, petId : Int
}
-> Cmd msg
updatePetWithForm params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet", String.fromInt params.petId ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["pet", String.fromInt params.petId]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -195,17 +217,20 @@ updatePetWithForm params =
uploadFile :
{ onSend : Result Http.Error ApiResponse -> msg
, petId : Int
}
-> Cmd msg
uploadFile params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "pet", String.fromInt params.petId, "uploadImage" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["pet", String.fromInt params.petId, "uploadImage"]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend ApiResponse.decoder
, timeout = Just 30000

View File

@ -19,6 +19,8 @@ import Json.Decode as Decode
import Url.Builder as Url
basePath : String
basePath =
"http://petstore.swagger.io/v2"
@ -28,17 +30,20 @@ basePath =
-}
deleteOrder :
{ onSend : Result Http.Error () -> msg
, orderId : String
}
-> Cmd msg
deleteOrder params =
Http.request
{ method = "DELETE"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "store", "order", identity params.orderId ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["store", "order", identity params.orderId]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -50,16 +55,20 @@ deleteOrder params =
-}
getInventory :
{ onSend : Result Http.Error (Dict.Dict String Int) -> msg
}
-> Cmd msg
getInventory params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "store", "inventory" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["store", "inventory"]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend (Decode.dict Decode.int)
, timeout = Just 30000
@ -71,17 +80,20 @@ getInventory params =
-}
getOrderById :
{ onSend : Result Http.Error Order_ -> msg
, orderId : Int
}
-> Cmd msg
getOrderById params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "store", "order", String.fromInt params.orderId ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["store", "order", String.fromInt params.orderId]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend Order_.decoder
, timeout = Just 30000
@ -91,17 +103,20 @@ getOrderById params =
placeOrder :
{ onSend : Result Http.Error Order_ -> msg
, body : Order_
}
-> Cmd msg
placeOrder params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "store", "order" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["store", "order"]
(List.filterMap identity [])
, body = Http.jsonBody <| Order_.encode params.body
, expect = Http.expectJson params.onSend Order_.decoder
, timeout = Just 30000

View File

@ -19,6 +19,8 @@ import Json.Decode as Decode
import Url.Builder as Url
basePath : String
basePath =
"http://petstore.swagger.io/v2"
@ -28,17 +30,20 @@ basePath =
-}
createUser :
{ onSend : Result Http.Error () -> msg
, body : User
}
-> Cmd msg
createUser params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user"]
(List.filterMap identity [])
, body = Http.jsonBody <| User.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -48,17 +53,20 @@ createUser params =
createUsersWithArrayInput :
{ onSend : Result Http.Error () -> msg
, body : User
}
-> Cmd msg
createUsersWithArrayInput params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", "createWithArray" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", "createWithArray"]
(List.filterMap identity [])
, body = Http.jsonBody <| User.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -68,17 +76,20 @@ createUsersWithArrayInput params =
createUsersWithListInput :
{ onSend : Result Http.Error () -> msg
, body : User
}
-> Cmd msg
createUsersWithListInput params =
Http.request
{ method = "POST"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", "createWithList" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", "createWithList"]
(List.filterMap identity [])
, body = Http.jsonBody <| User.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -90,17 +101,20 @@ createUsersWithListInput params =
-}
deleteUser :
{ onSend : Result Http.Error () -> msg
, username : String
}
-> Cmd msg
deleteUser params =
Http.request
{ method = "DELETE"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", identity params.username ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", identity params.username]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -110,17 +124,20 @@ deleteUser params =
getUserByName :
{ onSend : Result Http.Error User -> msg
, username : String
}
-> Cmd msg
getUserByName params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", identity params.username ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", identity params.username]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend User.decoder
, timeout = Just 30000
@ -130,18 +147,20 @@ getUserByName params =
loginUser :
{ onSend : Result Http.Error String -> msg
, username : String
, password : String
, username : String , password : String
}
-> Cmd msg
loginUser params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", "login" ]
(List.filterMap identity [ (Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password ])
, url = Url.crossOrigin basePath
["user", "login"]
(List.filterMap identity [(Just << Url.string "username" << identity) params.username, (Just << Url.string "password" << identity) params.password])
, body = Http.emptyBody
, expect = Http.expectJson params.onSend Decode.string
, timeout = Just 30000
@ -151,16 +170,20 @@ loginUser params =
logoutUser :
{ onSend : Result Http.Error () -> msg
}
-> Cmd msg
logoutUser params =
Http.request
{ method = "GET"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", "logout" ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", "logout"]
(List.filterMap identity [])
, body = Http.emptyBody
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000
@ -172,18 +195,20 @@ logoutUser params =
-}
updateUser :
{ onSend : Result Http.Error () -> msg
, body : User
, username : String
}
-> Cmd msg
updateUser params =
Http.request
{ method = "PUT"
, headers = List.filterMap identity []
, url =
Url.crossOrigin basePath
[ "user", identity params.username ]
(List.filterMap identity [])
, url = Url.crossOrigin basePath
["user", identity params.username]
(List.filterMap identity [])
, body = Http.jsonBody <| User.encode params.body
, expect = Http.expectWhatever params.onSend
, timeout = Just 30000

View File

@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -110,7 +110,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -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
}

View File

@ -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, body Order) (Order, *
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -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
}

View File

@ -97,7 +97,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -177,7 +177,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -279,7 +278,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -377,7 +375,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -475,7 +472,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -701,7 +697,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -109,7 +109,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -693,7 +693,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
}
@ -799,7 +798,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
}

View File

@ -175,7 +175,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
}

View File

@ -96,7 +96,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -176,7 +176,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -278,7 +277,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -376,7 +374,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -474,7 +471,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
@ -700,7 +696,6 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -108,7 +108,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}