From 6194093cc3b8174a0781d9fb5216b59acb36fc6c Mon Sep 17 00:00:00 2001 From: grokify Date: Fri, 22 Jun 2018 08:17:52 -0700 Subject: [PATCH 01/18] fix undefined: localVarFile --- .../src/main/resources/go/api.mustache | 7 +++++++ .../go/go-petstore/docs/ModelApiResponse.md | 12 ------------ .../petstore/go/go-petstore/docs/ModelReturn.md | 10 ---------- .../petstore/go/go-petstore/docs/OuterBoolean.md | 9 --------- .../petstore/go/go-petstore/docs/OuterNumber.md | 9 --------- .../petstore/go/go-petstore/docs/OuterString.md | 9 --------- .../petstore/go/go-petstore/model_outer_boolean.go | 14 -------------- .../petstore/go/go-petstore/model_outer_number.go | 14 -------------- .../petstore/go/go-petstore/model_outer_string.go | 14 -------------- 9 files changed, 7 insertions(+), 91 deletions(-) delete mode 100644 samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md delete mode 100644 samples/client/petstore/go/go-petstore/docs/ModelReturn.md delete mode 100644 samples/client/petstore/go/go-petstore/docs/OuterBoolean.md delete mode 100644 samples/client/petstore/go/go-petstore/docs/OuterNumber.md delete mode 100644 samples/client/petstore/go/go-petstore/docs/OuterString.md delete mode 100644 samples/client/petstore/go/go-petstore/model_outer_boolean.go delete mode 100644 samples/client/petstore/go/go-petstore/model_outer_number.go delete mode 100644 samples/client/petstore/go/go-petstore/model_outer_string.go diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index 286bedb7569c..409754831f30 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -177,6 +177,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} {{#hasFormParams}} {{#formParams}} {{#isFile}} +{{#allParams}} +{{#required}} + {{#isFile}} + localVarFile := {{paramName}} + {{/isFile}} +{{/required}} +{{/allParams}} {{^required}} var localVarFile {{dataType}} if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { diff --git a/samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md b/samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md deleted file mode 100644 index f4af21468294..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ModelApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int32** | | [optional] [default to null] -**Type_** | **string** | | [optional] [default to null] -**Message** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/docs/ModelReturn.md b/samples/client/petstore/go/go-petstore/docs/ModelReturn.md deleted file mode 100644 index 86350d4310c1..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/ModelReturn.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModelReturn - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Return_** | **int32** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/docs/OuterBoolean.md b/samples/client/petstore/go/go-petstore/docs/OuterBoolean.md deleted file mode 100644 index 8b2433994745..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/OuterBoolean.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterBoolean - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/docs/OuterNumber.md b/samples/client/petstore/go/go-petstore/docs/OuterNumber.md deleted file mode 100644 index 8aa37f329bd4..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/OuterNumber.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterNumber - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/docs/OuterString.md b/samples/client/petstore/go/go-petstore/docs/OuterString.md deleted file mode 100644 index 9ccaadaf98df..000000000000 --- a/samples/client/petstore/go/go-petstore/docs/OuterString.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterString - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/go/go-petstore/model_outer_boolean.go b/samples/client/petstore/go/go-petstore/model_outer_boolean.go deleted file mode 100644 index dc9ceb0c67e3..000000000000 --- a/samples/client/petstore/go/go-petstore/model_outer_boolean.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Swagger Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * API version: 1.0.0 - * Contact: apiteam@swagger.io - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package petstore - -type OuterBoolean struct { -} diff --git a/samples/client/petstore/go/go-petstore/model_outer_number.go b/samples/client/petstore/go/go-petstore/model_outer_number.go deleted file mode 100644 index 75aad986c34f..000000000000 --- a/samples/client/petstore/go/go-petstore/model_outer_number.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Swagger Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * API version: 1.0.0 - * Contact: apiteam@swagger.io - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package petstore - -type OuterNumber struct { -} diff --git a/samples/client/petstore/go/go-petstore/model_outer_string.go b/samples/client/petstore/go/go-petstore/model_outer_string.go deleted file mode 100644 index f2a440337bdd..000000000000 --- a/samples/client/petstore/go/go-petstore/model_outer_string.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Swagger Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * API version: 1.0.0 - * Contact: apiteam@swagger.io - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ - -package petstore - -type OuterString struct { -} From bf4aedbce15a3efb706dde9c66f25ef0f7e45ede Mon Sep 17 00:00:00 2001 From: grokify Date: Fri, 22 Jun 2018 11:06:28 -0700 Subject: [PATCH 02/18] add required formData file endpoints to 2.0 and 3.0 specs --- ...ith-fake-endpoints-models-for-testing.yaml | 37 +++++++ ...ith-fake-endpoints-models-for-testing.yaml | 70 ++++++++++-- .../go/.openapi-generator/VERSION | 2 +- .../go/api/openapi.yaml | 36 +++--- .../petstore-security-test/go/api_fake.go | 6 +- .../go/configuration.go | 2 +- .../petstore-security-test/go/docs/FakeApi.md | 2 +- .../client/petstore/go/go-petstore/README.md | 1 + .../petstore/go/go-petstore/api/openapi.yaml | 40 +++++++ .../client/petstore/go/go-petstore/api_pet.go | 103 ++++++++++++++++++ .../petstore/go/go-petstore/docs/PetApi.md | 38 +++++++ samples/client/petstore/go/pet_api_test.go | 20 ++++ 12 files changed, 326 insertions(+), 31 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index cea31406fd03..e7a95da13d94 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -272,6 +272,43 @@ paths: - petstore_auth: - 'write:pets' - 'read:pets' + '/pet/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFileWithRequiredFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: file + in: formData + description: file to upload + required: true + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' /store/inventory: get: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 54517a7aa036..3989ad4f0b97 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -67,7 +67,6 @@ paths: description: Status values that need to be considered for filter required: true style: form - explode: false schema: type: array items: @@ -112,7 +111,6 @@ paths: description: Tags to filter by required: true style: form - explode: false schema: type: array items: @@ -267,6 +265,47 @@ paths: description: file to upload type: string format: binary + '/pet/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + required: + - file /store/inventory: get: tags: @@ -436,7 +475,7 @@ paths: type: integer format: int32 X-Expires-After: - description: date in UTC when toekn expires + description: date in UTC when token expires schema: type: string format: date-time @@ -573,7 +612,6 @@ paths: parameters: - name: enum_header_string_array in: header - explode: true description: Header parameter enum test (string array) schema: type: array @@ -876,6 +914,26 @@ paths: type: string description: request body required: true + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true /another-fake/dummy: patch: tags: @@ -892,9 +950,6 @@ paths: $ref: '#/components/schemas/Client' requestBody: $ref: '#/components/requestBodies/Client' -externalDocs: - description: Find out more about Swagger - url: 'http://swagger.io' components: requestBodies: UserArray: @@ -1394,6 +1449,7 @@ components: type: string OuterBoolean: type: boolean + x-codegen-body-parameter-name: boolean_post_body _special_model.name_: properties: '$special[property.name]': diff --git a/samples/client/petstore-security-test/go/.openapi-generator/VERSION b/samples/client/petstore-security-test/go/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore-security-test/go/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/go/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/go/api/openapi.yaml b/samples/client/petstore-security-test/go/api/openapi.yaml index 8ed2aa894f41..9c73a1f81f20 100644 --- a/samples/client/petstore-security-test/go/api/openapi.yaml +++ b/samples/client/petstore-security-test/go/api/openapi.yaml @@ -1,15 +1,15 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore */ ' " =end -- \r\n \n \r + contact: + email: something@something.abc */ ' " =end -- \r\n \n \r description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ \ \" \\ */ ' \" =end -- \r\n \n \r" - termsOfService: http://url.to/terms/ */ ' " =end -- \r\n \n \r - contact: - email: something@something.abc */ ' " =end -- \r\n \n \r license: name: Apache-2.0 */ ' " =end -- \r\n \n \r url: http://www.apache.org/licenses/LICENSE-2.0.html */ ' " =end -- \r\n \n \r + termsOfService: http://url.to/terms/ */ ' " =end -- \r\n \n \r + title: OpenAPI Petstore */ ' " =end -- \r\n \n \r version: 1.0.0 */ ' " =end -- \r\n \n \r externalDocs: description: Find out more about OpenAPI */ ' " =end -- \r\n \n \r @@ -17,17 +17,14 @@ externalDocs: servers: - url: petstore.swagger.io */ ' " =end -- \r\n \n \r/v2 */ ' " =end -- \r\n \n \r tags: -- name: fake - description: Everything about your Pets */ ' " =end -- \r\n \n \r +- description: Everything about your Pets */ ' " =end -- \r\n \n \r externalDocs: description: Find out more */ ' " =end -- \r\n \n \r url: https://openapis.org + name: fake paths: /fake: put: - tags: - - fake - summary: To test code injection */ ' " =end -- \r\n \n \r operationId: testCodeInject */ ' " =end -- \r\n \n \r requestBody: content: @@ -35,40 +32,43 @@ paths: schema: properties: test code inject */ ' " =end -- \r\n \n \r: - type: string description: To test code injection */ ' " =end -- \r\n \n \r + type: string ? "*/ ' \" =end -- \r\n \n \r" : schema: properties: test code inject */ ' " =end -- \r\n \n \r: - type: string description: To test code injection */ ' " =end -- \r\n \n \r + type: string responses: 400: - description: To test code injection */ ' " =end -- \r\n \n \r content: {} + description: To test code injection */ ' " =end -- \r\n \n \r + summary: To test code injection */ ' " =end -- \r\n \n \r + tags: + - fake components: schemas: Return: - type: object + description: Model for testing reserved words */ ' " =end -- \r\n \n \r properties: return: - type: integer description: property description */ ' " =end -- \r\n \n \r format: int32 - description: Model for testing reserved words */ ' " =end -- \r\n \n \r + type: integer + type: object xml: name: Return securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account */ ' " =end -- \r\n \n \r read:pets: read your pets */ ' " =end -- \r\n \n \r + type: oauth2 api_key: - type: apiKey - name: api_key */ ' " =end -- \r\n \n \r in: header + name: api_key */ ' " =end -- \r\n \n \r + type: apiKey diff --git a/samples/client/petstore-security-test/go/api_fake.go b/samples/client/petstore-security-test/go/api_fake.go index c0668d851ef2..1af654fbfec5 100644 --- a/samples/client/petstore-security-test/go/api_fake.go +++ b/samples/client/petstore-security-test/go/api_fake.go @@ -29,7 +29,7 @@ type FakeApiService service FakeApiService To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *TestCodeInjectEndRnNROpts - Optional Parameters: - * @param "UNKNOWNBASETYPE" (optional.Interface of interface{}) - + * @param "UNKNOWNBASETYPE" (optional.Interface of map[string]interface{}) - */ type TestCodeInjectEndRnNROpts struct { @@ -70,9 +70,9 @@ func (a *FakeApiService) TestCodeInjectEndRnNR(ctx context.Context, localVarOpti } // body params if localVarOptionals != nil && localVarOptionals.UNKNOWNBASETYPE.IsSet() { - localVarOptionalUNKNOWNBASETYPE, localVarOptionalUNKNOWNBASETYPEok := localVarOptionals.UNKNOWNBASETYPE.Value().(interface{}) + localVarOptionalUNKNOWNBASETYPE, localVarOptionalUNKNOWNBASETYPEok := localVarOptionals.UNKNOWNBASETYPE.Value().(map[string]interface{}) if !localVarOptionalUNKNOWNBASETYPEok { - return nil, reportError("uNKNOWNBASETYPE should be interface{}") + return nil, reportError("uNKNOWNBASETYPE should be map[string]interface{}") } localVarPostBody = &localVarOptionalUNKNOWNBASETYPE } diff --git a/samples/client/petstore-security-test/go/configuration.go b/samples/client/petstore-security-test/go/configuration.go index 659bb16f14f5..5b45d9faece6 100644 --- a/samples/client/petstore-security-test/go/configuration.go +++ b/samples/client/petstore-security-test/go/configuration.go @@ -25,7 +25,7 @@ func (c contextKey) String() string { } var ( - // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. diff --git a/samples/client/petstore-security-test/go/docs/FakeApi.md b/samples/client/petstore-security-test/go/docs/FakeApi.md index c556953bdd72..71c9f77d59e0 100644 --- a/samples/client/petstore-security-test/go/docs/FakeApi.md +++ b/samples/client/petstore-security-test/go/docs/FakeApi.md @@ -23,7 +23,7 @@ Optional parameters are passed through a pointer to a TestCodeInjectEndRnNROpts Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uNKNOWNBASETYPE** | [**optional.Interface of interface{}**](UNKNOWN_BASE_TYPE.md)| | + **uNKNOWNBASETYPE** | [**optional.Interface of map[string]interface{}**](UNKNOWN_BASE_TYPE.md)| | ### Return type diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index dfb07bd7fdf6..e6f811087550 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -50,6 +50,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index c5c2dfaffa71..670b9e7adecc 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -282,6 +282,46 @@ paths: summary: uploads an image tags: - pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 37db3a5b3535..1c6e1de91106 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -696,3 +696,106 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt return localVarReturnValue, localVarHttpResponse, nil } + +/* +PetApiService uploads an image + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to update + * @param file file to upload + * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: + * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server +@return ApiResponse +*/ + +type UploadFileWithRequiredFileOpts struct { + AdditionalMetadata optional.String +} + +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApiResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImageWithRequiredFile" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { + localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + } + localVarFile := file + if localVarFile != nil { + fbs, _ := ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ApiResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index 9a78c747da00..402f31e72910 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **AddPet** @@ -257,3 +258,40 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional) +uploads an image + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **petId** | **int64**| ID of pet to update | + **file** | ***os.File*****os.File**| file to upload | + **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **additionalMetadata** | **optional.String**| Additional data to pass to server | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index 408ce7b41960..e6e5ba561a67 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -160,6 +160,26 @@ func TestUploadFile(t *testing.T) { } } +func TestUploadFileRequired(t *testing.T) { + return // remove when server supports this endpoint + file, _ := os.Open("../python/testfiles/foo.png") + + _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830, + file, + &sw.UploadFileWithRequiredFileOpts{ + AdditionalMetadata: optional.NewString("golang"), + }) + + if err != nil { + t.Errorf("Error while uploading file") + t.Log(err) + } + + if r.StatusCode != 200 { + t.Log(r) + } +} + func TestDeletePet(t *testing.T) { r, err := client.PetApi.DeletePet(context.Background(), 12830, nil) From 53caca1157474e9f787050499045e80ef6a96bbb Mon Sep 17 00:00:00 2001 From: grokify Date: Fri, 22 Jun 2018 22:39:06 -0700 Subject: [PATCH 03/18] streamline api.mustache update --- .../openapi-generator/src/main/resources/go/api.mustache | 6 +----- samples/client/petstore/go/go-petstore/api_pet.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index 409754831f30..a8c7da4a34c2 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -177,13 +177,9 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams} {{#hasFormParams}} {{#formParams}} {{#isFile}} -{{#allParams}} {{#required}} - {{#isFile}} - localVarFile := {{paramName}} - {{/isFile}} + localVarFile := {{paramName}} {{/required}} -{{/allParams}} {{^required}} var localVarFile {{dataType}} if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 1c6e1de91106..f44bbc804da4 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -748,7 +748,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) } - localVarFile := file + localVarFile := file if localVarFile != nil { fbs, _ := ioutil.ReadAll(localVarFile) localVarFileBytes = fbs From c7611aaa57a7c8d3b13cac120b405a40d2b687ee Mon Sep 17 00:00:00 2001 From: grokify Date: Mon, 25 Jun 2018 22:28:26 -0700 Subject: [PATCH 04/18] update sampels --- .../org/openapitools/client/api/PetApi.java | 15 + .../java/google-api-client/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 89 +++++ .../petstore/java/jersey1/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 54 +++ .../java/jersey2-java6/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../java/jersey2-java8/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../petstore/java/jersey2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 140 ++++++++ .../petstore/java/okhttp-gson/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 140 ++++++++ .../petstore/java/rest-assured/docs/PetApi.md | 44 +++ .../org/openapitools/client/api/PetApi.java | 108 ++++++ .../petstore/java/resteasy/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 53 +++ .../java/resttemplate-withXml/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 51 +++ .../petstore/java/resttemplate/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 51 +++ .../org/openapitools/client/api/PetApi.java | 30 ++ .../java/retrofit2-play24/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../java/retrofit2-play25/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2rx/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2rx2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../client/petstore/java/vertx/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 2 + .../openapitools/client/api/PetApiImpl.java | 44 +++ .../client/api/rxjava/PetApi.java | 25 ++ .../petstore/php/OpenAPIClient-php/README.md | 1 + .../php/OpenAPIClient-php/docs/Api/PetApi.md | 56 ++++ .../php/OpenAPIClient-php/lib/Api/PetApi.php | 310 +++++++++++++++++ .../OpenAPIClient-php/test/Api/PetApiTest.php | 10 + samples/client/petstore/ruby/README.md | 1 + samples/client/petstore/ruby/docs/PetApi.md | 55 +++ .../petstore/ruby/lib/petstore/api/pet_api.rb | 62 ++++ .../petstore/php/OpenAPIClient-php/README.md | 2 + .../php/OpenAPIClient-php/docs/Api/FakeApi.md | 49 +++ .../php/OpenAPIClient-php/docs/Api/PetApi.md | 56 ++++ .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 230 +++++++++++++ .../php/OpenAPIClient-php/lib/Api/PetApi.php | 314 +++++++++++++++++- .../test/Api/FakeApiTest.php | 10 + .../OpenAPIClient-php/test/Api/PetApiTest.php | 10 + .../gen/java/org/openapitools/api/PetApi.java | 15 +- .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../gen/java/org/openapitools/api/PetApi.java | 17 +- .../src/main/openapi/openapi.yaml | 42 +++ .../gen/java/org/openapitools/api/PetApi.java | 20 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 42 +++ .../gen/java/org/openapitools/api/PetApi.java | 23 +- .../org/openapitools/api/PetApiService.java | 2 + .../api/impl/PetApiServiceImpl.java | 6 + .../gen/java/org/openapitools/api/PetApi.java | 23 +- .../org/openapitools/api/PetApiService.java | 2 + .../api/impl/PetApiServiceImpl.java | 6 + .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../lib/app/Http/Controllers/PetApi.php | 20 ++ .../php-lumen/lib/app/Http/routes.php | 7 + samples/server/petstore/php-slim/index.php | 161 +++++---- .../application/config/path_handler.yml | 2 + .../PetPetIdUploadImageWithRequiredFile.php | 33 ++ .../java/org/openapitools/api/PetApi.java | 28 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 11 + .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 11 + .../java/org/openapitools/api/PetApi.java | 17 + .../org/openapitools/api/PetApiDelegate.java | 18 + .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 4 + .../org/openapitools/api/PetApiDelegate.java | 7 + .../java/org/openapitools/api/PetApi.java | 28 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../src/main/resources/openapi.yaml | 44 +++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ 93 files changed, 3915 insertions(+), 80 deletions(-) create mode 100644 samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 7373181773a9..da3cb0cd4ae5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -182,4 +182,19 @@ public FindPetsByTagsQueryParams tags(final List value) { "Accept: application/json", }) ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + */ + @RequestLine("POST /pet/{petId}/uploadImageWithRequiredFile") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: application/json", + }) + ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("file") File file, @Param("additionalMetadata") String additionalMetadata); } diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/google-api-client/docs/PetApi.md +++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java index e35d5f87577c..7ee23a1e3fee 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java @@ -715,4 +715,93 @@ public HttpResponse uploadFileForHttpResponse(Long petId, Map pa } + /** + * uploads an image + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws IOException { + HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, additionalMetadata); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * uploads an image + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return ModelApiResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, Map params) throws IOException { + HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, params); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, String additionalMetadata) throws IOException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + }// verify the required parameter 'file' is set + if (file == null) { + throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile"); + + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); + } + + public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, Map params) throws IOException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + }// verify the required parameter 'file' is set + if (file == null) { + throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + + for (Map.Entry entry: allParams.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); + } + + } diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey1/docs/PetApi.md +++ b/samples/client/petstore/java/jersey1/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java index dd97c0c220dc..7c9534e93375 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java @@ -385,6 +385,60 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 67962e30e015..b0ab91c18ef9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -1063,4 +1063,144 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for uploadFileWithRequiredFile + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); + if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + return call; + + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return resp.getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * uploads an image (asynchronously) + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index 67962e30e015..b0ab91c18ef9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -1063,4 +1063,144 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for uploadFileWithRequiredFile + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); + if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + return call; + + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return resp.getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * uploads an image (asynchronously) + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/samples/client/petstore/java/rest-assured/docs/PetApi.md b/samples/client/petstore/java/rest-assured/docs/PetApi.md index 97f4b82d7a94..fb3a0d8e1eea 100644 --- a/samples/client/petstore/java/rest-assured/docs/PetApi.md +++ b/samples/client/petstore/java/rest-assured/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -345,3 +346,46 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.uploadFileWithRequiredFile() + .petIdPath(petId) + .fileMultiPart(file).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java index ef84a7c4c785..bfc21ac2dc12 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java @@ -82,6 +82,10 @@ public UploadFileOper uploadFile() { return new UploadFileOper(reqSpec); } + public UploadFileWithRequiredFileOper uploadFileWithRequiredFile() { + return new UploadFileWithRequiredFileOper(reqSpec); + } + /** * Customise request specification * @param consumer consumer @@ -738,4 +742,108 @@ public UploadFileOper respSpec(Consumer consumer) { return this; } } + /** + * uploads an image + * + * + * @see #petIdPath ID of pet to update (required) + * @see #fileMultiPart file to upload (required) + * @see #additionalMetadataForm Additional data to pass to server (optional, default to null) + * return ModelApiResponse + */ + public class UploadFileWithRequiredFileOper { + + public static final String REQ_URI = "/pet/{petId}/uploadImageWithRequiredFile"; + + private RequestSpecBuilder reqSpec; + + private ResponseSpecBuilder respSpec; + + public UploadFileWithRequiredFileOper() { + this.reqSpec = new RequestSpecBuilder(); + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + public UploadFileWithRequiredFileOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /pet/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @param type + * @return type + */ + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI)); + } + + /** + * POST /pet/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @return ModelApiResponse + */ + public ModelApiResponse executeAs(Function handler) { + Type type = new TypeToken(){}.getType(); + return execute(handler).as(type); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet to update (required) + * @return operation + */ + public UploadFileWithRequiredFileOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + public static final String ADDITIONAL_METADATA_FORM = "additionalMetadata"; + + /** + * @param additionalMetadata (String) Additional data to pass to server (optional, default to null) + * @return operation + */ + public UploadFileWithRequiredFileOper additionalMetadataForm(Object... additionalMetadata) { + reqSpec.addFormParam(ADDITIONAL_METADATA_FORM, additionalMetadata); + return this; + } + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param file (File) file to upload (required) + * @return operation + */ + public UploadFileWithRequiredFileOper fileMultiPart(File file) { + reqSpec.addMultiPart(file); + return this; + } + + /** + * Customise request specification + * @param consumer consumer + * @return operation + */ + public UploadFileWithRequiredFileOper reqSpec(Consumer consumer) { + consumer.accept(reqSpec); + return this; + } + + /** + * Customise response specification + * @param consumer consumer + * @return operation + */ + public UploadFileWithRequiredFileOper respSpec(Consumer consumer) { + consumer.accept(respSpec); + return this; + } + } } \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java index ae62c12ede39..c186143a9791 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java @@ -363,6 +363,59 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return a {@code ModelApiResponse} + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index c1d31488ce71..4e07b0c0c439 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -352,6 +352,57 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException { + Object postBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + if (additionalMetadata != null) + formParams.add("additionalMetadata", additionalMetadata); + if (file != null) + formParams.add("file", new FileSystemResource(file)); + + final String[] accepts = { + "application/json" + }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { + "multipart/form-data" + }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index c1d31488ce71..4e07b0c0c439 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -352,6 +352,57 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException { + Object postBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + if (additionalMetadata != null) + formParams.add("additionalMetadata", additionalMetadata); + if (file != null) + formParams.add("file", new FileSystemResource(file)); + + final String[] accepts = { + "application/json" + }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { + "multipart/form-data" + }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java index 9b01b4dec1fe..e20531160bb7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java @@ -222,4 +222,34 @@ ModelApiResponse uploadFile( void uploadFile( @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback cb ); + /** + * uploads an image + * Sync method + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + */ + + @retrofit.http.Multipart + @POST("/pet/{petId}/uploadImageWithRequiredFile") + ModelApiResponse uploadFileWithRequiredFile( + @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata + ); + + /** + * uploads an image + * Async method + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param cb callback method + */ + + @retrofit.http.Multipart + @POST("/pet/{petId}/uploadImageWithRequiredFile") + void uploadFileWithRequiredFile( + @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback cb + ); } diff --git a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java index 72fb65870b5d..adb8fce7d5de 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java @@ -125,4 +125,18 @@ F.Promise> uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + F.Promise> uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java index 4a0846d74d64..bb09b995d1d1 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java @@ -125,4 +125,18 @@ CompletionStage> uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + CompletionStage> uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java index 37b70a26f5e6..0261620786e3 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java @@ -122,4 +122,18 @@ Call uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Call uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java index 3079b6fa5587..7929df96d2a5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java @@ -122,4 +122,18 @@ Observable uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Observable<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Observable uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java index 8aee4e9b1ed7..a08da60b41a9 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java @@ -123,4 +123,18 @@ Observable uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Observable<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Observable uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index 1040ebe5e726..c22e8f2438b4 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +AsyncFile file = new AsyncFile(); // AsyncFile | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **AsyncFile**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java index 5696685ffc4e..817a544ea775 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java @@ -27,4 +27,6 @@ public interface PetApi { void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler> handler); + void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> handler); + } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java index 9a75edd9db4a..a33fcb54af63 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java @@ -312,6 +312,50 @@ public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Ha // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) localVarFormParams.put("file", file); + + String[] localVarAccepts = { "application/json" }; + String[] localVarContentTypes = { "multipart/form-data" }; + String[] localVarAuthNames = new String[] { "petstore_auth" }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param resultHandler Asynchronous result handler + */ + public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> resultHandler) { + Object localVarBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile")); + return; + } + + // verify the required parameter 'file' is set + if (file == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile")); + return; + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{" + "petId" + "\\}", petId.toString()); + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java index e3fcc4fd683c..ee1053e27946 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java @@ -201,6 +201,31 @@ public Single rxUploadFile(Long petId, String additionalMetada delegate.uploadFile(petId, additionalMetadata, file, fut); })); } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param resultHandler Asynchronous result handler + */ + public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> resultHandler) { + delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, resultHandler); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxUploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { + delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, fut); + })); + } public static PetApi newInstance(org.openapitools.client.api.PetApi arg) { return arg != null ? new PetApi(arg) : null; diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 82d72fc9c386..e4d699fe972a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -99,6 +99,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md index 8af991745359..48a397fd6268 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **addPet** @@ -436,3 +437,58 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **uploadFileWithRequiredFile** +> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata) + +uploads an image + +### Example +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new OpenAPI\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pet_id = 56; // int | ID of pet to update +$file = "/path/to/file.txt"; // \SplFileObject | file to upload +$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server + +try { + $result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **\SplFileObject****\SplFileObject**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**\OpenAPI\Client\Model\ApiResponse**](../Model/ApiResponse.md) + +### Authorization + +[petstore_auth](../../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 9b495a9c624e..99298cdee5e6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -2174,6 +2174,316 @@ protected function uploadFileRequest($pet_id, $additional_metadata = null, $file ); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\ApiResponse + */ + public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null) + { + list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata); + return $response; + } + + /** + * Operation uploadFileWithRequiredFileWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ApiResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ApiResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation uploadFileWithRequiredFileAsync + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null) + { + return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadFileWithRequiredFileAsyncWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadFileWithRequiredFile' + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null) + { + // verify the required parameter 'pet_id' is set + if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling uploadFileWithRequiredFile' + ); + } + + $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pet_id !== null) { + $resourcePath = str_replace( + '{' . 'petId' . '}', + ObjectSerializer::toPathValue($pet_id), + $resourcePath + ); + } + + // form params + if ($additional_metadata !== null) { + $formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata); + } + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0f1081c60534..691be928897c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -150,4 +150,14 @@ public function testUpdatePetWithForm() public function testUploadFile() { } + + /** + * Test case for uploadFileWithRequiredFile + * + * uploads an image. + * + */ + public function testUploadFileWithRequiredFile() + { + } } diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 77a9178e639a..0342c82cba65 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -93,6 +93,7 @@ Class | Method | HTTP request | Description *Petstore::PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *Petstore::PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *Petstore::PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*Petstore::PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *Petstore::StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md index d64b1b8dc274..aecfde29f2c3 100644 --- a/samples/client/petstore/ruby/docs/PetApi.md +++ b/samples/client/petstore/ruby/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -418,3 +419,57 @@ Name | Type | Description | Notes +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, opts) + +uploads an image + +### Example +```ruby +# load the gem +require 'petstore' +# setup authorization +Petstore.configure do |config| + # Configure OAuth2 access token for authorization: petstore_auth + config.access_token = 'YOUR ACCESS TOKEN' +end + +api_instance = Petstore::PetApi.new +pet_id = 56 # Integer | ID of pet to update +file = File.new('/path/to/file') # File | file to upload +opts = { + additional_metadata: 'additional_metadata_example' # String | Additional data to pass to server +} + +begin + #uploads an image + result = api_instance.upload_file_with_required_file(pet_id, file, opts) + p result +rescue Petstore::ApiError => e + puts "Exception when calling PetApi->upload_file_with_required_file: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **Integer**| ID of pet to update | + **file** | **File**| file to upload | + **additional_metadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + + diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 1f9a68f2a706..e75f9b6c2298 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -438,5 +438,67 @@ def upload_file_with_http_info(pet_id, opts = {}) end return data, status_code, headers end + # uploads an image + # @param pet_id ID of pet to update + # @param file file to upload + # @param [Hash] opts the optional parameters + # @option opts [String] :additional_metadata Additional data to pass to server + # @return [ApiResponse] + def upload_file_with_required_file(pet_id, file, opts = {}) + data, _status_code, _headers = upload_file_with_required_file_with_http_info(pet_id, file, opts) + data + end + + # uploads an image + # @param pet_id ID of pet to update + # @param file file to upload + # @param [Hash] opts the optional parameters + # @option opts [String] :additional_metadata Additional data to pass to server + # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers + def upload_file_with_required_file_with_http_info(pet_id, file, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PetApi.upload_file_with_required_file ...' + end + # verify the required parameter 'pet_id' is set + if @api_client.config.client_side_validation && pet_id.nil? + fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file_with_required_file" + end + # verify the required parameter 'file' is set + if @api_client.config.client_side_validation && file.nil? + fail ArgumentError, "Missing the required parameter 'file' when calling PetApi.upload_file_with_required_file" + end + # resource path + local_var_path = '/pet/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + + # form parameters + form_params = {} + form_params['file'] = file + form_params['additionalMetadata'] = opts[:'additional_metadata'] if !opts[:'additional_metadata'].nil? + + # http body (model) + post_body = nil + auth_names = ['petstore_auth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ApiResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PetApi#upload_file_with_required_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md index 04e36d807a2a..e4d699fe972a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fakeOuterCompositeSerialize**](docs/Api/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**fakeOuterNumberSerialize**](docs/Api/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | *FakeApi* | [**fakeOuterStringSerialize**](docs/Api/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**testBodyWithQueryParams**](docs/Api/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters @@ -98,6 +99,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 45a911754739..c8559d8ebc72 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters @@ -211,6 +212,54 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **testBodyWithQueryParams** +> testBodyWithQueryParams($query, $user) + + + +### Example +```php +testBodyWithQueryParams($query, $user); +} catch (Exception $e) { + echo 'Exception when calling FakeApi->testBodyWithQueryParams: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **string**| | + **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **testClientModel** > \OpenAPI\Client\Model\Client testClientModel($client) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md index 8af991745359..48a397fd6268 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **addPet** @@ -436,3 +437,58 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **uploadFileWithRequiredFile** +> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata) + +uploads an image + +### Example +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new OpenAPI\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pet_id = 56; // int | ID of pet to update +$file = "/path/to/file.txt"; // \SplFileObject | file to upload +$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server + +try { + $result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **\SplFileObject****\SplFileObject**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**\OpenAPI\Client\Model\ApiResponse**](../Model/ApiResponse.md) + +### Authorization + +[petstore_auth](../../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index b6c1ea3487ae..688afee7396b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -1151,6 +1151,236 @@ protected function fakeOuterStringSerializeRequest($body = null) ); } + /** + * Operation testBodyWithQueryParams + * + * @param string $query query (required) + * @param \OpenAPI\Client\Model\User $user user (required) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function testBodyWithQueryParams($query, $user) + { + $this->testBodyWithQueryParamsWithHttpInfo($query, $user); + } + + /** + * Operation testBodyWithQueryParamsWithHttpInfo + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function testBodyWithQueryParamsWithHttpInfo($query, $user) + { + $request = $this->testBodyWithQueryParamsRequest($query, $user); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation testBodyWithQueryParamsAsync + * + * + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyWithQueryParamsAsync($query, $user) + { + return $this->testBodyWithQueryParamsAsyncWithHttpInfo($query, $user) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBodyWithQueryParamsAsyncWithHttpInfo + * + * + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyWithQueryParamsAsyncWithHttpInfo($query, $user) + { + $returnType = ''; + $request = $this->testBodyWithQueryParamsRequest($query, $user); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBodyWithQueryParams' + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function testBodyWithQueryParamsRequest($query, $user) + { + // verify the required parameter 'query' is set + if ($query === null || (is_array($query) && count($query) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $query when calling testBodyWithQueryParams' + ); + } + // verify the required parameter 'user' is set + if ($user === null || (is_array($user) && count($user) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $user when calling testBodyWithQueryParams' + ); + } + + $resourcePath = '/fake/body-with-query-params'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($query !== null) { + $queryParams['query'] = ObjectSerializer::toQueryValue($query); + } + + + // body params + $_tempBody = null; + if (isset($user)) { + $_tempBody = $user; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testClientModel * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 9b495a9c624e..ff3961e0974f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -756,7 +756,7 @@ protected function findPetsByStatusRequest($status) // query params if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, 'csv', true); + $status = ObjectSerializer::serializeCollection($status, 'multi', true); } if ($status !== null) { $queryParams['status'] = ObjectSerializer::toQueryValue($status); @@ -1040,7 +1040,7 @@ protected function findPetsByTagsRequest($tags) // query params if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, 'csv', true); + $tags = ObjectSerializer::serializeCollection($tags, 'multi', true); } if ($tags !== null) { $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); @@ -2174,6 +2174,316 @@ protected function uploadFileRequest($pet_id, $additional_metadata = null, $file ); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\ApiResponse + */ + public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null) + { + list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata); + return $response; + } + + /** + * Operation uploadFileWithRequiredFileWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ApiResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ApiResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation uploadFileWithRequiredFileAsync + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null) + { + return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadFileWithRequiredFileAsyncWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadFileWithRequiredFile' + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null) + { + // verify the required parameter 'pet_id' is set + if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling uploadFileWithRequiredFile' + ); + } + + $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pet_id !== null) { + $resourcePath = str_replace( + '{' . 'petId' . '}', + ObjectSerializer::toPathValue($pet_id), + $resourcePath + ); + } + + // form params + if ($additional_metadata !== null) { + $formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata); + } + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 28e53278f604..831c2c685f6e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -111,6 +111,16 @@ public function testFakeOuterStringSerialize() { } + /** + * Test case for testBodyWithQueryParams + * + * . + * + */ + public function testTestBodyWithQueryParams() + { + } + /** * Test case for testClientModel * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0f1081c60534..691be928897c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -150,4 +150,14 @@ public function testUpdatePetWithForm() public function testUploadFile() { } + + /** + * Test case for uploadFileWithRequiredFile + * + * uploads an image. + * + */ + public function testUploadFileWithRequiredFile() + { + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java index b2d413186224..f134cb8ce5eb 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java @@ -134,9 +134,22 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiOperation(value = "uploads an image", tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); + + /** + * uploads an image + * + */ + @POST + @Path("/pet/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "file" ) Attachment fileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java index c915d919bab9..fd404b7bb7a7 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index ea35664ca3c2..1507e6e229b0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -118,9 +118,24 @@ public interface PetApi { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, @FormParam(value = "file") Attachment fileDetail); + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java index ec2658d28ced..7f06dbe8d0c6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java @@ -139,7 +139,7 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @@ -147,4 +147,22 @@ public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") @FormParam(value = "file") Attachment fileDetail) { return Response.ok().entity("magic!").build(); } + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) + public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata) { + return Response.ok().entity("magic!").build(); + } } diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java index 45e52ad46631..a15e47db2b6e 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -177,7 +177,7 @@ public Response updatePetWithForm( @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( @@ -189,4 +189,25 @@ public Response uploadFile( throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); } + @POST + + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @FormDataParam("file") InputStream inputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail, + @FormDataParam("additionalMetadata") String additionalMetadata, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java index 9af313fd74a1..ce8c271d31a8 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java @@ -38,4 +38,6 @@ public abstract Response updatePetWithForm(Long petId,String name,String status, throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 4531f4b4b697..ade99c7c99ab 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -70,4 +70,10 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java index 4d6288f5ef5b..8b130f30f0e5 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java @@ -177,7 +177,7 @@ public Response updatePetWithForm( @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( @@ -189,4 +189,25 @@ public Response uploadFile( throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @FormDataParam("file") InputStream inputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail, + @FormDataParam("additionalMetadata") String additionalMetadata, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java index 9af313fd74a1..ce8c271d31a8 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java @@ -38,4 +38,6 @@ public abstract Response updatePetWithForm(Long petId,String name,String status, throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 4531f4b4b697..ade99c7c99ab 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -70,4 +70,10 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java index 03aafa4190cb..45e26077a753 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java index c915d919bab9..fd404b7bb7a7 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php index 71ef5b76b169..ad7097f7db43 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php @@ -202,4 +202,24 @@ public function uploadFile($pet_id) return response('How about implementing uploadFile as a post method ?'); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image. + * + * @param int $pet_id ID of pet to update (required) + * + * @return Http response + */ + public function uploadFileWithRequiredFile($pet_id) + { + $input = Request::all(); + + //path params validation + + + //not path params validation + + return response('How about implementing uploadFileWithRequiredFile as a post method ?'); + } } diff --git a/samples/server/petstore/php-lumen/lib/app/Http/routes.php b/samples/server/petstore/php-lumen/lib/app/Http/routes.php index 2875b96fcb58..e2dfa91a7e31 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/routes.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/routes.php @@ -161,6 +161,13 @@ * Output-Formats: [application/json] */ $app->post('/v2/pet/{petId}/uploadImage', 'PetApi@uploadFile'); +/** + * post uploadFileWithRequiredFile + * Summary: uploads an image + * Notes: + * Output-Formats: [application/json] + */ +$app->post('/v2/pet/{petId}/uploadImageWithRequiredFile', 'PetApi@uploadFileWithRequiredFile'); /** * get getInventory * Summary: Returns pet inventories by status diff --git a/samples/server/petstore/php-slim/index.php b/samples/server/petstore/php-slim/index.php index 0800a1087742..e8210c2f1768 100644 --- a/samples/server/petstore/php-slim/index.php +++ b/samples/server/petstore/php-slim/index.php @@ -26,7 +26,7 @@ * POST fakeOuterBooleanSerialize * Summary: * Notes: Test serialization of outer boolean types - * Output-Formats: [*_/_*] + * Output-Formats: [*/*] */ $app->POST('/v2/fake/outer/boolean', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -39,7 +39,7 @@ * POST fakeOuterCompositeSerialize * Summary: * Notes: Test serialization of object with outer number type - * Output-Formats: [*_/_*] + * Output-Formats: [*/*] */ $app->POST('/v2/fake/outer/composite', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -52,7 +52,7 @@ * POST fakeOuterNumberSerialize * Summary: * Notes: Test serialization of outer number types - * Output-Formats: [*_/_*] + * Output-Formats: [*/*] */ $app->POST('/v2/fake/outer/number', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -65,7 +65,7 @@ * POST fakeOuterStringSerialize * Summary: * Notes: Test serialization of outer string types - * Output-Formats: [*_/_*] + * Output-Formats: [*/*] */ $app->POST('/v2/fake/outer/string', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -197,6 +197,20 @@ }); +/** + * DELETE deletePet + * Summary: Deletes a pet + * Notes: + */ +$app->DELETE('/v2/pet/{petId}', function($request, $response, $args) { + $headers = $request->getHeaders(); + $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; + $petId = $args['petId']; + $response->write('How about implementing deletePet as a DELETE method ?'); + return $response; +}); + + /** * GET findPetsByStatus * Summary: Finds Pets by status @@ -225,32 +239,6 @@ }); -/** - * PUT updatePet - * Summary: Update an existing pet - * Notes: - */ -$app->PUT('/v2/pet', function($request, $response, $args) { - $body = $request->getParsedBody(); - $response->write('How about implementing updatePet as a PUT method ?'); - return $response; -}); - - -/** - * DELETE deletePet - * Summary: Deletes a pet - * Notes: - */ -$app->DELETE('/v2/pet/{petId}', function($request, $response, $args) { - $headers = $request->getHeaders(); - $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; - $petId = $args['petId']; - $response->write('How about implementing deletePet as a DELETE method ?'); - return $response; -}); - - /** * GET getPetById * Summary: Find pet by ID @@ -264,6 +252,18 @@ }); +/** + * PUT updatePet + * Summary: Update an existing pet + * Notes: + */ +$app->PUT('/v2/pet', function($request, $response, $args) { + $body = $request->getParsedBody(); + $response->write('How about implementing updatePet as a PUT method ?'); + return $response; +}); + + /** * POST updatePetWithForm * Summary: Updates a pet in the store with form data @@ -294,26 +294,16 @@ /** - * GET getInventory - * Summary: Returns pet inventories by status - * Notes: Returns a map of status codes to quantities - * Output-Formats: [application/json] - */ -$app->GET('/v2/store/inventory', function($request, $response, $args) { - $response->write('How about implementing getInventory as a GET method ?'); - return $response; -}); - - -/** - * POST placeOrder - * Summary: Place an order for a pet + * POST uploadFileWithRequiredFile + * Summary: uploads an image * Notes: - * Output-Formats: [application/xml, application/json] + * Output-Formats: [application/json] */ -$app->POST('/v2/store/order', function($request, $response, $args) { - $body = $request->getParsedBody(); - $response->write('How about implementing placeOrder as a POST method ?'); +$app->POST('/v2/pet/{petId}/uploadImageWithRequiredFile', function($request, $response, $args) { + $petId = $args['petId']; + $additionalMetadata = $request->getParsedBodyParam('additionalMetadata'); + $file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null; + $response->write('How about implementing uploadFileWithRequiredFile as a POST method ?'); return $response; }); @@ -330,6 +320,18 @@ }); +/** + * GET getInventory + * Summary: Returns pet inventories by status + * Notes: Returns a map of status codes to quantities + * Output-Formats: [application/json] + */ +$app->GET('/v2/store/inventory', function($request, $response, $args) { + $response->write('How about implementing getInventory as a GET method ?'); + return $response; +}); + + /** * GET getOrderById * Summary: Find purchase order by ID @@ -343,6 +345,19 @@ }); +/** + * POST placeOrder + * Summary: Place an order for a pet + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->POST('/v2/store/order', function($request, $response, $args) { + $body = $request->getParsedBody(); + $response->write('How about implementing placeOrder as a POST method ?'); + return $response; +}); + + /** * POST createUser * Summary: Create user @@ -380,52 +395,52 @@ /** - * GET loginUser - * Summary: Logs user into the system - * Notes: - * Output-Formats: [application/xml, application/json] + * DELETE deleteUser + * Summary: Delete user + * Notes: This can only be done by the logged in user. */ -$app->GET('/v2/user/login', function($request, $response, $args) { - $queryParams = $request->getQueryParams(); - $username = $request->getQueryParam('username'); - $password = $request->getQueryParam('password'); - $response->write('How about implementing loginUser as a GET method ?'); +$app->DELETE('/v2/user/{username}', function($request, $response, $args) { + $username = $args['username']; + $response->write('How about implementing deleteUser as a DELETE method ?'); return $response; }); /** - * GET logoutUser - * Summary: Logs out current logged in user session + * GET getUserByName + * Summary: Get user by user name * Notes: + * Output-Formats: [application/xml, application/json] */ -$app->GET('/v2/user/logout', function($request, $response, $args) { - $response->write('How about implementing logoutUser as a GET method ?'); +$app->GET('/v2/user/{username}', function($request, $response, $args) { + $username = $args['username']; + $response->write('How about implementing getUserByName as a GET method ?'); return $response; }); /** - * DELETE deleteUser - * Summary: Delete user - * Notes: This can only be done by the logged in user. + * GET loginUser + * Summary: Logs user into the system + * Notes: + * Output-Formats: [application/xml, application/json] */ -$app->DELETE('/v2/user/{username}', function($request, $response, $args) { - $username = $args['username']; - $response->write('How about implementing deleteUser as a DELETE method ?'); +$app->GET('/v2/user/login', function($request, $response, $args) { + $queryParams = $request->getQueryParams(); + $username = $request->getQueryParam('username'); + $password = $request->getQueryParam('password'); + $response->write('How about implementing loginUser as a GET method ?'); return $response; }); /** - * GET getUserByName - * Summary: Get user by user name + * GET logoutUser + * Summary: Logs out current logged in user session * Notes: - * Output-Formats: [application/xml, application/json] */ -$app->GET('/v2/user/{username}', function($request, $response, $args) { - $username = $args['username']; - $response->write('How about implementing getUserByName as a GET method ?'); +$app->GET('/v2/user/logout', function($request, $response, $args) { + $response->write('How about implementing logoutUser as a GET method ?'); return $response; }); diff --git a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml index 4b1717af8e38..fc5c123eff14 100644 --- a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml +++ b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml @@ -39,6 +39,7 @@ Articus\PathHandler\Router\FastRouteAnnotation: - App\Handler\PetFindByTags - App\Handler\PetPetId - App\Handler\PetPetIdUploadImage + - App\Handler\PetPetIdUploadImageWithRequiredFile - App\Handler\StoreInventory - App\Handler\StoreOrder - App\Handler\StoreOrderOrderId @@ -65,6 +66,7 @@ Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory: App\Handler\PetFindByTags: [] App\Handler\PetPetId: [] App\Handler\PetPetIdUploadImage: [] + App\Handler\PetPetIdUploadImageWithRequiredFile: [] App\Handler\StoreInventory: [] App\Handler\StoreOrder: [] App\Handler\StoreOrderOrderId: [] diff --git a/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php b/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php new file mode 100644 index 000000000000..2c475050d683 --- /dev/null +++ b/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php @@ -0,0 +1,33 @@ +> uploadFile(@ApiParam } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return CompletableFuture.supplyAsync(()-> { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + }, Runnable::run); + + } + } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 7d63bc420b38..502a38e03aa3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java index 20ea8d651a4f..722ed3221e84 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java @@ -109,4 +109,15 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java index b01cdf874b30..80fb91e825e9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java @@ -109,4 +109,15 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 4e7c03ba98aa..1dca218c458a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -163,4 +163,21 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet return getDelegate().uploadFile(petId, additionalMetadata, file); } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return getDelegate().uploadFileWithRequiredFile(petId, file, additionalMetadata); + } + } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 88a778effd80..a5b1f721cd10 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -138,4 +138,22 @@ default ResponseEntity uploadFile( Long petId, } + /** + * @see PetApi#uploadFileWithRequiredFile + */ + default ResponseEntity uploadFileWithRequiredFile( Long petId, + MultipartFile file, + String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 4e56a5931446..b39c37857f0a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -63,4 +63,8 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet return delegate.uploadFile(petId, additionalMetadata, file); } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata); + } + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 13f6acf44c70..0251e06b3c3a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -62,4 +62,11 @@ ResponseEntity uploadFile( Long petId, String additionalMetadata, MultipartFile file); + /** + * @see PetApi#uploadFileWithRequiredFile + */ + ResponseEntity uploadFileWithRequiredFile( Long petId, + MultipartFile file, + String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 0c77c3af1001..2d3dfde1feef 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -236,4 +236,32 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiImplicitParams({ + }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 2c799a542e98..f5059969c3c9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -224,4 +224,30 @@ default ResponseEntity> uploadFile(@ApiParam(value = "ID } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) { + Mono result = Mono.empty(); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + result = ApiUtil.getExampleResponse(exchange, "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}") + .then(Mono.empty()); + break; + } + } + return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).body(result); + + } + } diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 8bf8a08e0b6b..315ca74b76a4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -310,6 +310,50 @@ paths: x-accepts: application/json x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index b9a6469ab1e5..d3e8075b2a9d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 7d63bc420b38..502a38e03aa3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } From a543d57c14242bbe07de95255cbacddf54670f84 Mon Sep 17 00:00:00 2001 From: grokify Date: Mon, 25 Jun 2018 22:40:51 -0700 Subject: [PATCH 05/18] update samples --- samples/server/petstore/php-slim/index.php | 156 ++++++++++----------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/samples/server/petstore/php-slim/index.php b/samples/server/petstore/php-slim/index.php index e8210c2f1768..60eebdf19580 100644 --- a/samples/server/petstore/php-slim/index.php +++ b/samples/server/petstore/php-slim/index.php @@ -26,7 +26,7 @@ * POST fakeOuterBooleanSerialize * Summary: * Notes: Test serialization of outer boolean types - * Output-Formats: [*/*] + * Output-Formats: [*_/_*] */ $app->POST('/v2/fake/outer/boolean', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -39,7 +39,7 @@ * POST fakeOuterCompositeSerialize * Summary: * Notes: Test serialization of object with outer number type - * Output-Formats: [*/*] + * Output-Formats: [*_/_*] */ $app->POST('/v2/fake/outer/composite', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -52,7 +52,7 @@ * POST fakeOuterNumberSerialize * Summary: * Notes: Test serialization of outer number types - * Output-Formats: [*/*] + * Output-Formats: [*_/_*] */ $app->POST('/v2/fake/outer/number', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -65,7 +65,7 @@ * POST fakeOuterStringSerialize * Summary: * Notes: Test serialization of outer string types - * Output-Formats: [*/*] + * Output-Formats: [*_/_*] */ $app->POST('/v2/fake/outer/string', function($request, $response, $args) { $body = $request->getParsedBody(); @@ -197,20 +197,6 @@ }); -/** - * DELETE deletePet - * Summary: Deletes a pet - * Notes: - */ -$app->DELETE('/v2/pet/{petId}', function($request, $response, $args) { - $headers = $request->getHeaders(); - $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; - $petId = $args['petId']; - $response->write('How about implementing deletePet as a DELETE method ?'); - return $response; -}); - - /** * GET findPetsByStatus * Summary: Finds Pets by status @@ -240,26 +226,40 @@ /** - * GET getPetById - * Summary: Find pet by ID - * Notes: Returns a single pet - * Output-Formats: [application/xml, application/json] + * PUT updatePet + * Summary: Update an existing pet + * Notes: */ -$app->GET('/v2/pet/{petId}', function($request, $response, $args) { - $petId = $args['petId']; - $response->write('How about implementing getPetById as a GET method ?'); +$app->PUT('/v2/pet', function($request, $response, $args) { + $body = $request->getParsedBody(); + $response->write('How about implementing updatePet as a PUT method ?'); return $response; }); /** - * PUT updatePet - * Summary: Update an existing pet + * DELETE deletePet + * Summary: Deletes a pet * Notes: */ -$app->PUT('/v2/pet', function($request, $response, $args) { - $body = $request->getParsedBody(); - $response->write('How about implementing updatePet as a PUT method ?'); +$app->DELETE('/v2/pet/{petId}', function($request, $response, $args) { + $headers = $request->getHeaders(); + $apiKey = $request->hasHeader('api_key') ? $headers['api_key'] : null; + $petId = $args['petId']; + $response->write('How about implementing deletePet as a DELETE method ?'); + return $response; +}); + + +/** + * GET getPetById + * Summary: Find pet by ID + * Notes: Returns a single pet + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/v2/pet/{petId}', function($request, $response, $args) { + $petId = $args['petId']; + $response->write('How about implementing getPetById as a GET method ?'); return $response; }); @@ -308,18 +308,6 @@ }); -/** - * DELETE deleteOrder - * Summary: Delete purchase order by ID - * Notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - */ -$app->DELETE('/v2/store/order/{order_id}', function($request, $response, $args) { - $orderId = $args['order_id']; - $response->write('How about implementing deleteOrder as a DELETE method ?'); - return $response; -}); - - /** * GET getInventory * Summary: Returns pet inventories by status @@ -333,27 +321,39 @@ /** - * GET getOrderById - * Summary: Find purchase order by ID - * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * POST placeOrder + * Summary: Place an order for a pet + * Notes: * Output-Formats: [application/xml, application/json] */ -$app->GET('/v2/store/order/{order_id}', function($request, $response, $args) { +$app->POST('/v2/store/order', function($request, $response, $args) { + $body = $request->getParsedBody(); + $response->write('How about implementing placeOrder as a POST method ?'); + return $response; +}); + + +/** + * DELETE deleteOrder + * Summary: Delete purchase order by ID + * Notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ +$app->DELETE('/v2/store/order/{order_id}', function($request, $response, $args) { $orderId = $args['order_id']; - $response->write('How about implementing getOrderById as a GET method ?'); + $response->write('How about implementing deleteOrder as a DELETE method ?'); return $response; }); /** - * POST placeOrder - * Summary: Place an order for a pet - * Notes: + * GET getOrderById + * Summary: Find purchase order by ID + * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Output-Formats: [application/xml, application/json] */ -$app->POST('/v2/store/order', function($request, $response, $args) { - $body = $request->getParsedBody(); - $response->write('How about implementing placeOrder as a POST method ?'); +$app->GET('/v2/store/order/{order_id}', function($request, $response, $args) { + $orderId = $args['order_id']; + $response->write('How about implementing getOrderById as a GET method ?'); return $response; }); @@ -394,31 +394,6 @@ }); -/** - * DELETE deleteUser - * Summary: Delete user - * Notes: This can only be done by the logged in user. - */ -$app->DELETE('/v2/user/{username}', function($request, $response, $args) { - $username = $args['username']; - $response->write('How about implementing deleteUser as a DELETE method ?'); - return $response; -}); - - -/** - * GET getUserByName - * Summary: Get user by user name - * Notes: - * Output-Formats: [application/xml, application/json] - */ -$app->GET('/v2/user/{username}', function($request, $response, $args) { - $username = $args['username']; - $response->write('How about implementing getUserByName as a GET method ?'); - return $response; -}); - - /** * GET loginUser * Summary: Logs user into the system @@ -445,6 +420,31 @@ }); +/** + * DELETE deleteUser + * Summary: Delete user + * Notes: This can only be done by the logged in user. + */ +$app->DELETE('/v2/user/{username}', function($request, $response, $args) { + $username = $args['username']; + $response->write('How about implementing deleteUser as a DELETE method ?'); + return $response; +}); + + +/** + * GET getUserByName + * Summary: Get user by user name + * Notes: + * Output-Formats: [application/xml, application/json] + */ +$app->GET('/v2/user/{username}', function($request, $response, $args) { + $username = $args['username']; + $response->write('How about implementing getUserByName as a GET method ?'); + return $response; +}); + + /** * PUT updateUser * Summary: Updated user From 118404a92034363d7c00524395f05b981cc55e3e Mon Sep 17 00:00:00 2001 From: grokify Date: Mon, 25 Jun 2018 23:13:15 -0700 Subject: [PATCH 06/18] update samples --- .../org/openapitools/client/api/PetApi.java | 15 + .../java/google-api-client/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 89 +++++ .../petstore/java/jersey1/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 54 +++ .../java/jersey2-java6/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../java/jersey2-java8/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../petstore/java/jersey2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 66 ++++ .../docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 140 ++++++++ .../petstore/java/okhttp-gson/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 140 ++++++++ .../petstore/java/rest-assured/docs/PetApi.md | 44 +++ .../org/openapitools/client/api/PetApi.java | 108 ++++++ .../petstore/java/resteasy/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 53 +++ .../java/resttemplate-withXml/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 51 +++ .../petstore/java/resttemplate/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 51 +++ .../org/openapitools/client/api/PetApi.java | 30 ++ .../java/retrofit2-play24/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../java/retrofit2-play25/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2rx/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../petstore/java/retrofit2rx2/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 14 + .../client/petstore/java/vertx/docs/PetApi.md | 56 ++++ .../org/openapitools/client/api/PetApi.java | 2 + .../openapitools/client/api/PetApiImpl.java | 44 +++ .../client/api/rxjava/PetApi.java | 25 ++ .../petstore/php/OpenAPIClient-php/README.md | 1 + .../php/OpenAPIClient-php/docs/Api/PetApi.md | 56 ++++ .../php/OpenAPIClient-php/lib/Api/PetApi.php | 310 +++++++++++++++++ .../OpenAPIClient-php/test/Api/PetApiTest.php | 10 + samples/client/petstore/ruby/README.md | 1 + samples/client/petstore/ruby/docs/PetApi.md | 55 +++ .../petstore/ruby/lib/petstore/api/pet_api.rb | 62 ++++ .../petstore/php/OpenAPIClient-php/README.md | 2 + .../php/OpenAPIClient-php/docs/Api/FakeApi.md | 49 +++ .../php/OpenAPIClient-php/docs/Api/PetApi.md | 56 ++++ .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 230 +++++++++++++ .../php/OpenAPIClient-php/lib/Api/PetApi.php | 314 +++++++++++++++++- .../test/Api/FakeApiTest.php | 10 + .../OpenAPIClient-php/test/Api/PetApiTest.php | 10 + .../gen/java/org/openapitools/api/PetApi.java | 15 +- .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../gen/java/org/openapitools/api/PetApi.java | 17 +- .../src/main/openapi/openapi.yaml | 42 +++ .../gen/java/org/openapitools/api/PetApi.java | 20 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 42 +++ .../gen/java/org/openapitools/api/PetApi.java | 23 +- .../org/openapitools/api/PetApiService.java | 2 + .../api/impl/PetApiServiceImpl.java | 6 + .../gen/java/org/openapitools/api/PetApi.java | 23 +- .../org/openapitools/api/PetApiService.java | 2 + .../api/impl/PetApiServiceImpl.java | 6 + .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../gen/java/org/openapitools/api/PetApi.java | 21 ++ .../org/openapitools/api/PetApiService.java | 1 + .../api/impl/PetApiServiceImpl.java | 5 + .../lib/app/Http/Controllers/PetApi.php | 20 ++ .../php-lumen/lib/app/Http/routes.php | 7 + samples/server/petstore/php-slim/index.php | 15 + .../application/config/path_handler.yml | 2 + .../PetPetIdUploadImageWithRequiredFile.php | 33 ++ .../java/org/openapitools/api/PetApi.java | 28 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 11 + .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 11 + .../java/org/openapitools/api/PetApi.java | 17 + .../org/openapitools/api/PetApiDelegate.java | 18 + .../java/org/openapitools/api/PetApi.java | 15 + .../openapitools/api/PetApiController.java | 4 + .../org/openapitools/api/PetApiDelegate.java | 7 + .../java/org/openapitools/api/PetApi.java | 28 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../src/main/resources/openapi.yaml | 44 +++ .../java/org/openapitools/api/PetApi.java | 26 ++ .../java/org/openapitools/api/PetApi.java | 26 ++ 93 files changed, 3842 insertions(+), 7 deletions(-) create mode 100644 samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 7373181773a9..da3cb0cd4ae5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -182,4 +182,19 @@ public FindPetsByTagsQueryParams tags(final List value) { "Accept: application/json", }) ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + */ + @RequestLine("POST /pet/{petId}/uploadImageWithRequiredFile") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: application/json", + }) + ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("file") File file, @Param("additionalMetadata") String additionalMetadata); } diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/google-api-client/docs/PetApi.md +++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java index e35d5f87577c..7ee23a1e3fee 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java @@ -715,4 +715,93 @@ public HttpResponse uploadFileForHttpResponse(Long petId, Map pa } + /** + * uploads an image + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws IOException { + HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, additionalMetadata); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + * uploads an image + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return ModelApiResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, Map params) throws IOException { + HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, params); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, String additionalMetadata) throws IOException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + }// verify the required parameter 'file' is set + if (file == null) { + throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile"); + + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); + } + + public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, Map params) throws IOException { + // verify the required parameter 'petId' is set + if (petId == null) { + throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + }// verify the required parameter 'file' is set + if (file == null) { + throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + // create a map of path variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + + for (Map.Entry entry: allParams.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String url = uriBuilder.buildFromMap(uriVariables).toString(); + GenericUrl genericUrl = new GenericUrl(url); + + HttpContent content = apiClient.new JacksonJsonHttpContent(null); + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); + } + + } diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey1/docs/PetApi.md +++ b/samples/client/petstore/java/jersey1/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java index dd97c0c220dc..7c9534e93375 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java @@ -385,6 +385,60 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/jersey2/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index fd98d4fe4b1f..fa6ff5792ed6 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -459,6 +459,72 @@ public ApiResponse uploadFileWithHttpInfo(Long petId, String a + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 67962e30e015..b0ab91c18ef9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -1063,4 +1063,144 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for uploadFileWithRequiredFile + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); + if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + return call; + + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return resp.getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * uploads an image (asynchronously) + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index 67962e30e015..b0ab91c18ef9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -1063,4 +1063,144 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for uploadFileWithRequiredFile + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = new Object(); + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); + if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + return call; + + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return resp.getData(); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ApiResponse<ModelApiResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException { + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * uploads an image (asynchronously) + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/samples/client/petstore/java/rest-assured/docs/PetApi.md b/samples/client/petstore/java/rest-assured/docs/PetApi.md index 97f4b82d7a94..fb3a0d8e1eea 100644 --- a/samples/client/petstore/java/rest-assured/docs/PetApi.md +++ b/samples/client/petstore/java/rest-assured/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -345,3 +346,46 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import io.restassured.builder.RequestSpecBuilder; +//import io.restassured.filter.log.ErrorLoggingFilter; + +PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier( + () -> new RequestSpecBuilder() + .setBaseUri("http://petstore.swagger.io:80/v2"))).pet(); + +api.uploadFileWithRequiredFile() + .petIdPath(petId) + .fileMultiPart(file).execute(r -> r.prettyPeek()); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java index ef84a7c4c785..bfc21ac2dc12 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java @@ -82,6 +82,10 @@ public UploadFileOper uploadFile() { return new UploadFileOper(reqSpec); } + public UploadFileWithRequiredFileOper uploadFileWithRequiredFile() { + return new UploadFileWithRequiredFileOper(reqSpec); + } + /** * Customise request specification * @param consumer consumer @@ -738,4 +742,108 @@ public UploadFileOper respSpec(Consumer consumer) { return this; } } + /** + * uploads an image + * + * + * @see #petIdPath ID of pet to update (required) + * @see #fileMultiPart file to upload (required) + * @see #additionalMetadataForm Additional data to pass to server (optional, default to null) + * return ModelApiResponse + */ + public class UploadFileWithRequiredFileOper { + + public static final String REQ_URI = "/pet/{petId}/uploadImageWithRequiredFile"; + + private RequestSpecBuilder reqSpec; + + private ResponseSpecBuilder respSpec; + + public UploadFileWithRequiredFileOper() { + this.reqSpec = new RequestSpecBuilder(); + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + public UploadFileWithRequiredFileOper(RequestSpecBuilder reqSpec) { + this.reqSpec = reqSpec; + reqSpec.setContentType("multipart/form-data"); + reqSpec.setAccept("application/json"); + this.respSpec = new ResponseSpecBuilder(); + } + + /** + * POST /pet/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @param type + * @return type + */ + public T execute(Function handler) { + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI)); + } + + /** + * POST /pet/{petId}/uploadImageWithRequiredFile + * @param handler handler + * @return ModelApiResponse + */ + public ModelApiResponse executeAs(Function handler) { + Type type = new TypeToken(){}.getType(); + return execute(handler).as(type); + } + + public static final String PET_ID_PATH = "petId"; + + /** + * @param petId (Long) ID of pet to update (required) + * @return operation + */ + public UploadFileWithRequiredFileOper petIdPath(Object petId) { + reqSpec.addPathParam(PET_ID_PATH, petId); + return this; + } + + public static final String ADDITIONAL_METADATA_FORM = "additionalMetadata"; + + /** + * @param additionalMetadata (String) Additional data to pass to server (optional, default to null) + * @return operation + */ + public UploadFileWithRequiredFileOper additionalMetadataForm(Object... additionalMetadata) { + reqSpec.addFormParam(ADDITIONAL_METADATA_FORM, additionalMetadata); + return this; + } + + /** + * It will assume that the control name is file and the <content-type> is <application/octet-stream> + * @see #reqSpec for customise + * @param file (File) file to upload (required) + * @return operation + */ + public UploadFileWithRequiredFileOper fileMultiPart(File file) { + reqSpec.addMultiPart(file); + return this; + } + + /** + * Customise request specification + * @param consumer consumer + * @return operation + */ + public UploadFileWithRequiredFileOper reqSpec(Consumer consumer) { + consumer.accept(reqSpec); + return this; + } + + /** + * Customise response specification + * @param consumer consumer + * @return operation + */ + public UploadFileWithRequiredFileOper respSpec(Consumer consumer) { + consumer.accept(respSpec); + return this; + } + } } \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java index ae62c12ede39..c186143a9791 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java @@ -363,6 +363,59 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f + if (additionalMetadata != null) + localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) + localVarFormParams.put("file", file); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "petstore_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return a {@code ModelApiResponse} + * @throws ApiException if fails to make API call + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException { + Object localVarPostBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index c1d31488ce71..4e07b0c0c439 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -352,6 +352,57 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException { + Object postBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + if (additionalMetadata != null) + formParams.add("additionalMetadata", additionalMetadata); + if (file != null) + formParams.add("file", new FileSystemResource(file)); + + final String[] accepts = { + "application/json" + }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { + "multipart/form-data" + }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index 714ecc7ab829..eb47b476a1a8 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index c1d31488ce71..4e07b0c0c439 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -352,6 +352,57 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); + } + /** + * uploads an image + * + *

200 - successful operation + * @param petId ID of pet to update + * @param file file to upload + * @param additionalMetadata Additional data to pass to server + * @return ModelApiResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException { + Object postBody = new Object(); + + // verify the required parameter 'petId' is set + if (petId == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + // create path and map variables + final Map uriVariables = new HashMap(); + uriVariables.put("petId", petId); + String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + if (additionalMetadata != null) + formParams.add("additionalMetadata", additionalMetadata); + if (file != null) + formParams.add("file", new FileSystemResource(file)); + + final String[] accepts = { + "application/json" + }; + final List accept = apiClient.selectHeaderAccept(accepts); + final String[] contentTypes = { + "multipart/form-data" + }; + final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); + + String[] authNames = new String[] { "petstore_auth" }; + ParameterizedTypeReference returnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java index 9b01b4dec1fe..e20531160bb7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java @@ -222,4 +222,34 @@ ModelApiResponse uploadFile( void uploadFile( @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback cb ); + /** + * uploads an image + * Sync method + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return ModelApiResponse + */ + + @retrofit.http.Multipart + @POST("/pet/{petId}/uploadImageWithRequiredFile") + ModelApiResponse uploadFileWithRequiredFile( + @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata + ); + + /** + * uploads an image + * Async method + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param cb callback method + */ + + @retrofit.http.Multipart + @POST("/pet/{petId}/uploadImageWithRequiredFile") + void uploadFileWithRequiredFile( + @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback cb + ); } diff --git a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java index 72fb65870b5d..adb8fce7d5de 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java @@ -125,4 +125,18 @@ F.Promise> uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + F.Promise> uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java index 4a0846d74d64..bb09b995d1d1 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java @@ -125,4 +125,18 @@ CompletionStage> uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + CompletionStage> uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java index 37b70a26f5e6..0261620786e3 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java @@ -122,4 +122,18 @@ Call uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Call<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Call uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java index 3079b6fa5587..7929df96d2a5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java @@ -122,4 +122,18 @@ Observable uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Observable<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Observable uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index db7fad1cdb23..cde9eda467e3 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +File file = new File("null"); // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **File**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java index 8aee4e9b1ed7..a08da60b41a9 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java @@ -123,4 +123,18 @@ Observable uploadFile( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file") MultipartBody.Part file ); + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Observable<ModelApiResponse> + */ + @retrofit2.http.Multipart + @POST("pet/{petId}/uploadImageWithRequiredFile") + Observable uploadFileWithRequiredFile( + @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata + ); + } diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index 1040ebe5e726..c22e8f2438b4 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -436,3 +437,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata) + +uploads an image + +### Example +```java +// Import classes: +//import org.openapitools.client.ApiClient; +//import org.openapitools.client.ApiException; +//import org.openapitools.client.Configuration; +//import org.openapitools.client.auth.*; +//import org.openapitools.client.api.PetApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: petstore_auth +OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); +petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); + +PetApi apiInstance = new PetApi(); +Long petId = 56L; // Long | ID of pet to update +AsyncFile file = new AsyncFile(); // AsyncFile | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +try { + ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Long**| ID of pet to update | + **file** | **AsyncFile**| file to upload | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java index 5696685ffc4e..817a544ea775 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java @@ -27,4 +27,6 @@ public interface PetApi { void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler> handler); + void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> handler); + } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java index 9a75edd9db4a..a33fcb54af63 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java @@ -312,6 +312,50 @@ public void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Ha // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); +if (file != null) localVarFormParams.put("file", file); + + String[] localVarAccepts = { "application/json" }; + String[] localVarContentTypes = { "multipart/form-data" }; + String[] localVarAuthNames = new String[] { "petstore_auth" }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param resultHandler Asynchronous result handler + */ + public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> resultHandler) { + Object localVarBody = null; + + // verify the required parameter 'petId' is set + if (petId == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile")); + return; + } + + // verify the required parameter 'file' is set + if (file == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile")); + return; + } + + // create path and map variables + String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{" + "petId" + "\\}", petId.toString()); + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + // form params // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java index e3fcc4fd683c..ee1053e27946 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java @@ -201,6 +201,31 @@ public Single rxUploadFile(Long petId, String additionalMetada delegate.uploadFile(petId, additionalMetadata, file, fut); })); } + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @param resultHandler Asynchronous result handler + */ + public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler> resultHandler) { + delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, resultHandler); + } + + /** + * uploads an image + * + * @param petId ID of pet to update (required) + * @param file file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional, default to null) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxUploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { + delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, fut); + })); + } public static PetApi newInstance(org.openapitools.client.api.PetApi arg) { return arg != null ? new PetApi(arg) : null; diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 82d72fc9c386..e4d699fe972a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -99,6 +99,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md index 8af991745359..48a397fd6268 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **addPet** @@ -436,3 +437,58 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **uploadFileWithRequiredFile** +> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata) + +uploads an image + +### Example +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new OpenAPI\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pet_id = 56; // int | ID of pet to update +$file = "/path/to/file.txt"; // \SplFileObject | file to upload +$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server + +try { + $result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **\SplFileObject****\SplFileObject**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**\OpenAPI\Client\Model\ApiResponse**](../Model/ApiResponse.md) + +### Authorization + +[petstore_auth](../../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 9b495a9c624e..99298cdee5e6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -2174,6 +2174,316 @@ protected function uploadFileRequest($pet_id, $additional_metadata = null, $file ); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\ApiResponse + */ + public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null) + { + list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata); + return $response; + } + + /** + * Operation uploadFileWithRequiredFileWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ApiResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ApiResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation uploadFileWithRequiredFileAsync + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null) + { + return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadFileWithRequiredFileAsyncWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadFileWithRequiredFile' + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null) + { + // verify the required parameter 'pet_id' is set + if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling uploadFileWithRequiredFile' + ); + } + + $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pet_id !== null) { + $resourcePath = str_replace( + '{' . 'petId' . '}', + ObjectSerializer::toPathValue($pet_id), + $resourcePath + ); + } + + // form params + if ($additional_metadata !== null) { + $formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata); + } + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0f1081c60534..691be928897c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -150,4 +150,14 @@ public function testUpdatePetWithForm() public function testUploadFile() { } + + /** + * Test case for uploadFileWithRequiredFile + * + * uploads an image. + * + */ + public function testUploadFileWithRequiredFile() + { + } } diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 77a9178e639a..0342c82cba65 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -93,6 +93,7 @@ Class | Method | HTTP request | Description *Petstore::PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *Petstore::PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *Petstore::PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*Petstore::PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *Petstore::StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md index d64b1b8dc274..aecfde29f2c3 100644 --- a/samples/client/petstore/ruby/docs/PetApi.md +++ b/samples/client/petstore/ruby/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -418,3 +419,57 @@ Name | Type | Description | Notes +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, opts) + +uploads an image + +### Example +```ruby +# load the gem +require 'petstore' +# setup authorization +Petstore.configure do |config| + # Configure OAuth2 access token for authorization: petstore_auth + config.access_token = 'YOUR ACCESS TOKEN' +end + +api_instance = Petstore::PetApi.new +pet_id = 56 # Integer | ID of pet to update +file = File.new('/path/to/file') # File | file to upload +opts = { + additional_metadata: 'additional_metadata_example' # String | Additional data to pass to server +} + +begin + #uploads an image + result = api_instance.upload_file_with_required_file(pet_id, file, opts) + p result +rescue Petstore::ApiError => e + puts "Exception when calling PetApi->upload_file_with_required_file: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **Integer**| ID of pet to update | + **file** | **File**| file to upload | + **additional_metadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + + diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 1f9a68f2a706..e75f9b6c2298 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -438,5 +438,67 @@ def upload_file_with_http_info(pet_id, opts = {}) end return data, status_code, headers end + # uploads an image + # @param pet_id ID of pet to update + # @param file file to upload + # @param [Hash] opts the optional parameters + # @option opts [String] :additional_metadata Additional data to pass to server + # @return [ApiResponse] + def upload_file_with_required_file(pet_id, file, opts = {}) + data, _status_code, _headers = upload_file_with_required_file_with_http_info(pet_id, file, opts) + data + end + + # uploads an image + # @param pet_id ID of pet to update + # @param file file to upload + # @param [Hash] opts the optional parameters + # @option opts [String] :additional_metadata Additional data to pass to server + # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers + def upload_file_with_required_file_with_http_info(pet_id, file, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PetApi.upload_file_with_required_file ...' + end + # verify the required parameter 'pet_id' is set + if @api_client.config.client_side_validation && pet_id.nil? + fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file_with_required_file" + end + # verify the required parameter 'file' is set + if @api_client.config.client_side_validation && file.nil? + fail ArgumentError, "Missing the required parameter 'file' when calling PetApi.upload_file_with_required_file" + end + # resource path + local_var_path = '/pet/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + + # form parameters + form_params = {} + form_params['file'] = file + form_params['additionalMetadata'] = opts[:'additional_metadata'] if !opts[:'additional_metadata'].nil? + + # http body (model) + post_body = nil + auth_names = ['petstore_auth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ApiResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PetApi#upload_file_with_required_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md index 04e36d807a2a..e4d699fe972a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**fakeOuterCompositeSerialize**](docs/Api/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | *FakeApi* | [**fakeOuterNumberSerialize**](docs/Api/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | *FakeApi* | [**fakeOuterStringSerialize**](docs/Api/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**testBodyWithQueryParams**](docs/Api/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters @@ -98,6 +99,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index 45a911754739..c8559d8ebc72 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters @@ -211,6 +212,54 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **testBodyWithQueryParams** +> testBodyWithQueryParams($query, $user) + + + +### Example +```php +testBodyWithQueryParams($query, $user); +} catch (Exception $e) { + echo 'Exception when calling FakeApi->testBodyWithQueryParams: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **string**| | + **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **testClientModel** > \OpenAPI\Client\Model\Client testClientModel($client) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md index 8af991745359..48a397fd6268 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **addPet** @@ -436,3 +437,58 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **uploadFileWithRequiredFile** +> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata) + +uploads an image + +### Example +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + +$apiInstance = new OpenAPI\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pet_id = 56; // int | ID of pet to update +$file = "/path/to/file.txt"; // \SplFileObject | file to upload +$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server + +try { + $result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **\SplFileObject****\SplFileObject**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**\OpenAPI\Client\Model\ApiResponse**](../Model/ApiResponse.md) + +### Authorization + +[petstore_auth](../../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index b6c1ea3487ae..688afee7396b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -1151,6 +1151,236 @@ protected function fakeOuterStringSerializeRequest($body = null) ); } + /** + * Operation testBodyWithQueryParams + * + * @param string $query query (required) + * @param \OpenAPI\Client\Model\User $user user (required) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function testBodyWithQueryParams($query, $user) + { + $this->testBodyWithQueryParamsWithHttpInfo($query, $user); + } + + /** + * Operation testBodyWithQueryParamsWithHttpInfo + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function testBodyWithQueryParamsWithHttpInfo($query, $user) + { + $request = $this->testBodyWithQueryParamsRequest($query, $user); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation testBodyWithQueryParamsAsync + * + * + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyWithQueryParamsAsync($query, $user) + { + return $this->testBodyWithQueryParamsAsyncWithHttpInfo($query, $user) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBodyWithQueryParamsAsyncWithHttpInfo + * + * + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyWithQueryParamsAsyncWithHttpInfo($query, $user) + { + $returnType = ''; + $request = $this->testBodyWithQueryParamsRequest($query, $user); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBodyWithQueryParams' + * + * @param string $query (required) + * @param \OpenAPI\Client\Model\User $user (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function testBodyWithQueryParamsRequest($query, $user) + { + // verify the required parameter 'query' is set + if ($query === null || (is_array($query) && count($query) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $query when calling testBodyWithQueryParams' + ); + } + // verify the required parameter 'user' is set + if ($user === null || (is_array($user) && count($user) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $user when calling testBodyWithQueryParams' + ); + } + + $resourcePath = '/fake/body-with-query-params'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($query !== null) { + $queryParams['query'] = ObjectSerializer::toQueryValue($query); + } + + + // body params + $_tempBody = null; + if (isset($user)) { + $_tempBody = $user; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testClientModel * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 9b495a9c624e..ff3961e0974f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -756,7 +756,7 @@ protected function findPetsByStatusRequest($status) // query params if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, 'csv', true); + $status = ObjectSerializer::serializeCollection($status, 'multi', true); } if ($status !== null) { $queryParams['status'] = ObjectSerializer::toQueryValue($status); @@ -1040,7 +1040,7 @@ protected function findPetsByTagsRequest($tags) // query params if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, 'csv', true); + $tags = ObjectSerializer::serializeCollection($tags, 'multi', true); } if ($tags !== null) { $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); @@ -2174,6 +2174,316 @@ protected function uploadFileRequest($pet_id, $additional_metadata = null, $file ); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\ApiResponse + */ + public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null) + { + list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata); + return $response; + } + + /** + * Operation uploadFileWithRequiredFileWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\OpenAPI\Client\Model\ApiResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ApiResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ApiResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation uploadFileWithRequiredFileAsync + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null) + { + return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadFileWithRequiredFileAsyncWithHttpInfo + * + * uploads an image + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null) + { + $returnType = '\OpenAPI\Client\Model\ApiResponse'; + $request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadFileWithRequiredFile' + * + * @param int $pet_id ID of pet to update (required) + * @param \SplFileObject $file file to upload (required) + * @param string $additional_metadata Additional data to pass to server (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null) + { + // verify the required parameter 'pet_id' is set + if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling uploadFileWithRequiredFile' + ); + } + + $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pet_id !== null) { + $resourcePath = str_replace( + '{' . 'petId' . '}', + ObjectSerializer::toPathValue($pet_id), + $resourcePath + ); + } + + // form params + if ($additional_metadata !== null) { + $formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata); + } + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb'); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 28e53278f604..831c2c685f6e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -111,6 +111,16 @@ public function testFakeOuterStringSerialize() { } + /** + * Test case for testBodyWithQueryParams + * + * . + * + */ + public function testTestBodyWithQueryParams() + { + } + /** * Test case for testClientModel * diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 0f1081c60534..691be928897c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -150,4 +150,14 @@ public function testUpdatePetWithForm() public function testUploadFile() { } + + /** + * Test case for uploadFileWithRequiredFile + * + * uploads an image. + * + */ + public function testUploadFileWithRequiredFile() + { + } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java index b2d413186224..f134cb8ce5eb 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java @@ -134,9 +134,22 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiOperation(value = "uploads an image", tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); + + /** + * uploads an image + * + */ + @POST + @Path("/pet/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "file" ) Attachment fileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java index c915d919bab9..fd404b7bb7a7 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index ea35664ca3c2..1507e6e229b0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -118,9 +118,24 @@ public interface PetApi { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, @FormParam(value = "file") Attachment fileDetail); + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java index ec2658d28ced..7f06dbe8d0c6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java @@ -139,7 +139,7 @@ public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @@ -147,4 +147,22 @@ public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") @FormParam(value = "file") Attachment fileDetail) { return Response.ok().entity("magic!").build(); } + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) + }) + public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata) { + return Response.ok().entity("magic!").build(); + } } diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java index 45e52ad46631..a15e47db2b6e 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -177,7 +177,7 @@ public Response updatePetWithForm( @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( @@ -189,4 +189,25 @@ public Response uploadFile( throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); } + @POST + + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @FormDataParam("file") InputStream inputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail, + @FormDataParam("additionalMetadata") String additionalMetadata, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java index 9af313fd74a1..ce8c271d31a8 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApiService.java @@ -38,4 +38,6 @@ public abstract Response updatePetWithForm(Long petId,String name,String status, throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 4531f4b4b697..ade99c7c99ab 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -70,4 +70,10 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java index 4d6288f5ef5b..8b130f30f0e5 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java @@ -177,7 +177,7 @@ public Response updatePetWithForm( @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( @@ -189,4 +189,25 @@ public Response uploadFile( throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile( + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, + @FormDataParam("file") InputStream inputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail, + @FormDataParam("additionalMetadata") String additionalMetadata, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java index 9af313fd74a1..ce8c271d31a8 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java @@ -38,4 +38,6 @@ public abstract Response updatePetWithForm(Long petId,String name,String status, throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 4531f4b4b697..ade99c7c99ab 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -70,4 +70,10 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java index 03aafa4190cb..45e26077a753 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java index c915d919bab9..fd404b7bb7a7 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java @@ -208,4 +208,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext); + } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java index ebd89ee5c3a0..47299bb5daf9 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java @@ -27,4 +27,5 @@ public abstract class PetApiService { public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 366b2e4e1337..b282f8833f9b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -59,4 +59,9 @@ public Response uploadFile(Long petId, String additionalMetadata, InputStream fi // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } + @Override + public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } } diff --git a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php index 71ef5b76b169..ad7097f7db43 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php @@ -202,4 +202,24 @@ public function uploadFile($pet_id) return response('How about implementing uploadFile as a post method ?'); } + /** + * Operation uploadFileWithRequiredFile + * + * uploads an image. + * + * @param int $pet_id ID of pet to update (required) + * + * @return Http response + */ + public function uploadFileWithRequiredFile($pet_id) + { + $input = Request::all(); + + //path params validation + + + //not path params validation + + return response('How about implementing uploadFileWithRequiredFile as a post method ?'); + } } diff --git a/samples/server/petstore/php-lumen/lib/app/Http/routes.php b/samples/server/petstore/php-lumen/lib/app/Http/routes.php index 2875b96fcb58..e2dfa91a7e31 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/routes.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/routes.php @@ -161,6 +161,13 @@ * Output-Formats: [application/json] */ $app->post('/v2/pet/{petId}/uploadImage', 'PetApi@uploadFile'); +/** + * post uploadFileWithRequiredFile + * Summary: uploads an image + * Notes: + * Output-Formats: [application/json] + */ +$app->post('/v2/pet/{petId}/uploadImageWithRequiredFile', 'PetApi@uploadFileWithRequiredFile'); /** * get getInventory * Summary: Returns pet inventories by status diff --git a/samples/server/petstore/php-slim/index.php b/samples/server/petstore/php-slim/index.php index 0800a1087742..60eebdf19580 100644 --- a/samples/server/petstore/php-slim/index.php +++ b/samples/server/petstore/php-slim/index.php @@ -293,6 +293,21 @@ }); +/** + * POST uploadFileWithRequiredFile + * Summary: uploads an image + * Notes: + * Output-Formats: [application/json] + */ +$app->POST('/v2/pet/{petId}/uploadImageWithRequiredFile', function($request, $response, $args) { + $petId = $args['petId']; + $additionalMetadata = $request->getParsedBodyParam('additionalMetadata'); + $file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null; + $response->write('How about implementing uploadFileWithRequiredFile as a POST method ?'); + return $response; +}); + + /** * GET getInventory * Summary: Returns pet inventories by status diff --git a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml index 4b1717af8e38..fc5c123eff14 100644 --- a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml +++ b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml @@ -39,6 +39,7 @@ Articus\PathHandler\Router\FastRouteAnnotation: - App\Handler\PetFindByTags - App\Handler\PetPetId - App\Handler\PetPetIdUploadImage + - App\Handler\PetPetIdUploadImageWithRequiredFile - App\Handler\StoreInventory - App\Handler\StoreOrder - App\Handler\StoreOrderOrderId @@ -65,6 +66,7 @@ Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory: App\Handler\PetFindByTags: [] App\Handler\PetPetId: [] App\Handler\PetPetIdUploadImage: [] + App\Handler\PetPetIdUploadImageWithRequiredFile: [] App\Handler\StoreInventory: [] App\Handler\StoreOrder: [] App\Handler\StoreOrderOrderId: [] diff --git a/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php b/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php new file mode 100644 index 000000000000..2c475050d683 --- /dev/null +++ b/samples/server/petstore/php-ze-ph/src/App/Handler/PetPetIdUploadImageWithRequiredFile.php @@ -0,0 +1,33 @@ +> uploadFile(@ApiParam } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return CompletableFuture.supplyAsync(()-> { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + }, Runnable::run); + + } + } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 7d63bc420b38..502a38e03aa3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java index 20ea8d651a4f..722ed3221e84 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java @@ -109,4 +109,15 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java index b01cdf874b30..80fb91e825e9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java @@ -109,4 +109,15 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 4e7c03ba98aa..1dca218c458a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -163,4 +163,21 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet return getDelegate().uploadFile(petId, additionalMetadata, file); } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return getDelegate().uploadFileWithRequiredFile(petId, file, additionalMetadata); + } + } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 88a778effd80..a5b1f721cd10 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -138,4 +138,22 @@ default ResponseEntity uploadFile( Long petId, } + /** + * @see PetApi#uploadFileWithRequiredFile + */ + default ResponseEntity uploadFileWithRequiredFile( Long petId, + MultipartFile file, + String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 0d6081e3d866..9b112101f5aa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -143,4 +143,19 @@ public interface PetApi { method = RequestMethod.POST) ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file); + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 4e56a5931446..b39c37857f0a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -63,4 +63,8 @@ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet return delegate.uploadFile(petId, additionalMetadata, file); } + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + return delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata); + } + } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index 13f6acf44c70..0251e06b3c3a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -62,4 +62,11 @@ ResponseEntity uploadFile( Long petId, String additionalMetadata, MultipartFile file); + /** + * @see PetApi#uploadFileWithRequiredFile + */ + ResponseEntity uploadFileWithRequiredFile( Long petId, + MultipartFile file, + String additionalMetadata); + } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 0c77c3af1001..2d3dfde1feef 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -236,4 +236,32 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @ApiImplicitParams({ + }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 2c799a542e98..f5059969c3c9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -224,4 +224,30 @@ default ResponseEntity> uploadFile(@ApiParam(value = "ID } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) { + Mono result = Mono.empty(); + for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + result = ApiUtil.getExampleResponse(exchange, "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}") + .then(Mono.empty()); + break; + } + } + return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).body(result); + + } + } diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 8bf8a08e0b6b..315ca74b76a4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -310,6 +310,50 @@ paths: x-accepts: application/json x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index b9a6469ab1e5..d3e8075b2a9d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 7d63bc420b38..502a38e03aa3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -219,4 +219,30 @@ default ResponseEntity uploadFile(@ApiParam(value = "ID of pet } + + @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile", + produces = { "application/json" }, + consumes = { "multipart/form-data" }, + method = RequestMethod.POST) + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } From f72472d810c027893df94515b5e433cf8935a8d4 Mon Sep 17 00:00:00 2001 From: grokify Date: Tue, 26 Jun 2018 07:49:47 -0700 Subject: [PATCH 07/18] update samples bin/jaxrs-cxf-client-petstore.sh --- .../client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION | 2 +- .../src/gen/java/org/openapitools/model/Order.java | 1 - .../src/gen/java/org/openapitools/model/Pet.java | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 3aa2ec3d55c3..98733af6be9c 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -31,7 +31,6 @@ public class Order { @ApiModelProperty(value = "") private Date shipDate = null; - @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java index c7e7cda691e2..e477f2bac509 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java @@ -37,7 +37,6 @@ public class Pet { @ApiModelProperty(value = "") private List tags = null; - @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { From 87e240b9816d4524a4376674396dd9f8c7e4c183 Mon Sep 17 00:00:00 2001 From: grokify Date: Tue, 26 Jun 2018 12:42:21 -0700 Subject: [PATCH 08/18] update samples --- .../petstore/R/.openapi-generator/VERSION | 2 +- .../petstore/ada/.openapi-generator/VERSION | 2 +- .../src/client/samples-petstore-clients.adb | 77 +- .../src/client/samples-petstore-clients.ads | 30 +- .../ada/src/model/samples-petstore-models.adb | 10 +- .../ada/src/model/samples-petstore-models.ads | 12 +- .../petstore/ada/src/samples-petstore.ads | 8 +- samples/client/petstore/ada/src/samples.ads | 8 +- .../httpclient/.openapi-generator/VERSION | 2 +- .../android/httpclient/docs/PetApi.md | 8 +- .../android/volley/.openapi-generator/VERSION | 2 +- .../petstore/android/volley/docs/PetApi.md | 8 +- .../petstore/apex/.openapi-generator/VERSION | 2 +- .../petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/README.md | 1 + samples/client/petstore/bash/_petstore-cli | 10 +- samples/client/petstore/bash/docs/FakeApi.md | 2 +- samples/client/petstore/bash/docs/PetApi.md | 33 + samples/client/petstore/bash/petstore-cli | 68 + .../bash/petstore-cli.bash-completion | 2 + .../clojure/.openapi-generator/VERSION | 2 +- .../clojure/src/open_api_petstore/api/pet.clj | 4 +- .../cpp-qt5/.openapi-generator/VERSION | 2 +- .../cpp-restsdk/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-restsdk/ApiClient.cpp | 2 +- .../client/petstore/cpp-restsdk/ApiClient.h | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.cpp | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.h | 2 +- .../petstore/cpp-restsdk/ApiException.cpp | 2 +- .../petstore/cpp-restsdk/ApiException.h | 2 +- .../petstore/cpp-restsdk/HttpContent.cpp | 2 +- .../client/petstore/cpp-restsdk/HttpContent.h | 2 +- .../client/petstore/cpp-restsdk/IHttpBody.h | 2 +- .../client/petstore/cpp-restsdk/JsonBody.cpp | 2 +- .../client/petstore/cpp-restsdk/JsonBody.h | 2 +- .../client/petstore/cpp-restsdk/ModelBase.cpp | 2 +- .../client/petstore/cpp-restsdk/ModelBase.h | 2 +- .../cpp-restsdk/MultipartFormData.cpp | 2 +- .../petstore/cpp-restsdk/MultipartFormData.h | 4 +- .../client/petstore/cpp-restsdk/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/Object.h | 2 +- .../petstore/cpp-restsdk/api/PetApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/PetApi.h | 2 +- .../petstore/cpp-restsdk/api/StoreApi.cpp | 2 +- .../petstore/cpp-restsdk/api/StoreApi.h | 2 +- .../petstore/cpp-restsdk/api/UserApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/UserApi.h | 2 +- .../cpp-restsdk/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restsdk/model/ApiResponse.h | 2 +- .../petstore/cpp-restsdk/model/Category.cpp | 2 +- .../petstore/cpp-restsdk/model/Category.h | 2 +- .../petstore/cpp-restsdk/model/Order.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Order.h | 2 +- .../client/petstore/cpp-restsdk/model/Pet.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Pet.h | 2 +- .../client/petstore/cpp-restsdk/model/Tag.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Tag.h | 2 +- .../petstore/cpp-restsdk/model/User.cpp | 2 +- .../client/petstore/cpp-restsdk/model/User.h | 2 +- .../cpp-tizen/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-tizen/doc/Doxyfile | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/README.md | 1 + .../csharp/OpenAPIClient/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClient/docs/PetApi.md | 67 + .../Org.OpenAPITools.Test.csproj | 6 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet35/README.md | 1 + .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet35/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 107 ++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet40/README.md | 1 + .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet40/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 107 ++ .../.openapi-generator/VERSION | 2 +- .../OpenAPIClientNetCoreProject/README.md | 1 + .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNetStandard/README.md | 1 + .../OpenAPIClientNetStandard/docs/FakeApi.md | 4 +- .../OpenAPIClientNetStandard/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../README.md | 1 + .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../openapi/.openapi-generator/VERSION | 2 +- .../swagger/.analysis_options | 2 + .../dart/flutter_petstore/swagger/.gitignore | 27 + .../swagger/.openapi-generator-ignore | 23 + .../swagger/.openapi-generator/VERSION | 1 + .../dart/flutter_petstore/swagger/README.md | 121 ++ .../swagger/docs/ApiResponse.md | 17 + .../flutter_petstore/swagger/docs/Category.md | 16 + .../flutter_petstore/swagger/docs/Order.md | 20 + .../dart/flutter_petstore/swagger/docs/Pet.md | 20 + .../flutter_petstore/swagger/docs/PetApi.md | 379 ++++ .../flutter_petstore/swagger/docs/StoreApi.md | 186 ++ .../dart/flutter_petstore/swagger/docs/Tag.md | 16 + .../flutter_petstore/swagger/docs/User.md | 22 + .../flutter_petstore/swagger/docs/UserApi.md | 349 ++++ .../dart/flutter_petstore/swagger/git_push.sh | 52 + .../flutter_petstore/swagger/lib/api.dart | 27 + .../swagger/lib/api/pet_api.dart | 432 +++++ .../swagger/lib/api/store_api.dart | 207 ++ .../swagger/lib/api/user_api.dart | 409 ++++ .../swagger/lib/api_client.dart | 160 ++ .../swagger/lib/api_exception.dart | 23 + .../swagger/lib/api_helper.dart | 44 + .../swagger/lib/auth/api_key_auth.dart | 27 + .../swagger/lib/auth/authentication.dart | 7 + .../swagger/lib/auth/http_basic_auth.dart | 14 + .../swagger/lib/auth/oauth.dart | 19 + .../swagger/lib/model/api_response.dart | 44 + .../swagger/lib/model/category.dart | 40 + .../swagger/lib/model/order.dart | 57 + .../swagger/lib/model/pet.dart | 57 + .../swagger/lib/model/tag.dart | 40 + .../swagger/lib/model/user.dart | 64 + .../flutter_petstore/swagger/pubspec.yaml | 5 + .../.openapi-generator/VERSION | 2 +- .../dart/openapi/.openapi-generator/VERSION | 2 +- .../petstore/eiffel/.openapi-generator-ignore | 23 + .../eiffel/.openapi-generator/VERSION | 2 +- samples/client/petstore/eiffel/README.md | 1 + samples/client/petstore/eiffel/api_client.ecf | 2 +- .../client/petstore/eiffel/docs/FAKE_API.md | 2 +- .../client/petstore/eiffel/docs/PET_API.md | 31 + .../client/petstore/eiffel/src/api/fake_api.e | 2 +- .../client/petstore/eiffel/src/api/pet_api.e | 46 + .../serialization/api_json_deserializer.e | 2 +- .../client/petstore/eiffel/test/api_test.ecf | 2 +- .../petstore/elixir/.openapi-generator-ignore | 23 + .../elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/elixir/config/config.exs | 4 +- .../elixir/lib/openapi_petstore/api/fake.ex | 2 +- .../elixir/lib/openapi_petstore/api/pet.ex | 30 + .../elixir/lib/openapi_petstore/connection.ex | 2 +- .../petstore/elm/.openapi-generator/VERSION | 2 +- .../erlang-client/.openapi-generator/VERSION | 2 +- .../petstore/flash/.openapi-generator/VERSION | 2 +- samples/client/petstore/flash/flash/build.xml | 6 +- .../org/openapitools/event/ApiClientEvent.as | 4 +- .../petstore/go/go-petstore-withXml/README.md | 1 + .../go/go-petstore-withXml/api/openapi.yaml | 40 + .../go/go-petstore-withXml/api_pet.go | 103 + .../go/go-petstore-withXml/docs/PetApi.md | 38 + .../groovy/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/README.md | 4 +- .../lib/OpenAPIPetstore.hs | 2 +- .../lib/OpenAPIPetstore/API.hs | 2 +- .../lib/OpenAPIPetstore/API/AnotherFake.hs | 2 +- .../lib/OpenAPIPetstore/API/Fake.hs | 75 +- .../API/FakeClassnameTags123.hs | 2 +- .../lib/OpenAPIPetstore/API/Pet.hs | 34 +- .../lib/OpenAPIPetstore/API/Store.hs | 14 +- .../lib/OpenAPIPetstore/API/User.hs | 50 +- .../lib/OpenAPIPetstore/Client.hs | 2 +- .../lib/OpenAPIPetstore/Core.hs | 2 +- .../lib/OpenAPIPetstore/Logging.hs | 2 +- .../lib/OpenAPIPetstore/MimeTypes.hs | 2 +- .../lib/OpenAPIPetstore/Model.hs | 5 +- .../lib/OpenAPIPetstore/ModelLens.hs | 2 +- .../openapi-petstore.cabal | 2 +- .../petstore/haskell-http-client/openapi.yaml | 1663 +++++++++-------- .../.openapi-generator/VERSION | 2 +- .../javascript-es6/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/README.md | 1 + .../petstore/javascript-es6/docs/PetApi.md | 52 + .../petstore/javascript-es6/src/api/PetApi.js | 56 + .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/README.md | 1 + .../javascript-promise-es6/docs/PetApi.md | 51 + .../javascript-promise-es6/src/api/PetApi.js | 63 + .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise/README.md | 1 + .../javascript-promise/docs/PetApi.md | 50 + .../javascript-promise/src/ApiClient.js | 2 +- .../src/api/AnotherFakeApi.js | 2 +- .../javascript-promise/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../javascript-promise/src/api/PetApi.js | 67 +- .../javascript-promise/src/api/StoreApi.js | 2 +- .../javascript-promise/src/api/UserApi.js | 2 +- .../petstore/javascript-promise/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/Animal.js | 2 +- .../src/model/AnimalFarm.js | 2 +- .../src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../src/model/ArrayOfNumberOnly.js | 2 +- .../javascript-promise/src/model/ArrayTest.js | 2 +- .../src/model/Capitalization.js | 2 +- .../javascript-promise/src/model/Cat.js | 2 +- .../javascript-promise/src/model/Category.js | 2 +- .../src/model/ClassModel.js | 2 +- .../javascript-promise/src/model/Client.js | 2 +- .../javascript-promise/src/model/Dog.js | 2 +- .../src/model/EnumArrays.js | 2 +- .../javascript-promise/src/model/EnumClass.js | 2 +- .../javascript-promise/src/model/EnumTest.js | 2 +- .../src/model/FormatTest.js | 2 +- .../src/model/HasOnlyReadOnly.js | 2 +- .../javascript-promise/src/model/List.js | 2 +- .../javascript-promise/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../src/model/Model200Response.js | 2 +- .../src/model/ModelReturn.js | 2 +- .../javascript-promise/src/model/Name.js | 2 +- .../src/model/NumberOnly.js | 2 +- .../javascript-promise/src/model/Order.js | 2 +- .../src/model/OuterComposite.js | 2 +- .../javascript-promise/src/model/OuterEnum.js | 2 +- .../javascript-promise/src/model/Pet.js | 2 +- .../src/model/ReadOnlyFirst.js | 2 +- .../src/model/SpecialModelName.js | 2 +- .../javascript-promise/src/model/Tag.js | 2 +- .../javascript-promise/src/model/User.js | 2 +- .../javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/README.md | 1 + .../client/petstore/javascript/docs/PetApi.md | 52 + .../petstore/javascript/src/ApiClient.js | 2 +- .../javascript/src/api/AnotherFakeApi.js | 2 +- .../petstore/javascript/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../petstore/javascript/src/api/PetApi.js | 60 +- .../petstore/javascript/src/api/StoreApi.js | 2 +- .../petstore/javascript/src/api/UserApi.js | 2 +- .../client/petstore/javascript/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../petstore/javascript/src/model/Animal.js | 2 +- .../javascript/src/model/AnimalFarm.js | 2 +- .../javascript/src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayTest.js | 2 +- .../javascript/src/model/Capitalization.js | 2 +- .../petstore/javascript/src/model/Cat.js | 2 +- .../petstore/javascript/src/model/Category.js | 2 +- .../javascript/src/model/ClassModel.js | 2 +- .../petstore/javascript/src/model/Client.js | 2 +- .../petstore/javascript/src/model/Dog.js | 2 +- .../javascript/src/model/EnumArrays.js | 2 +- .../javascript/src/model/EnumClass.js | 2 +- .../petstore/javascript/src/model/EnumTest.js | 2 +- .../javascript/src/model/FormatTest.js | 2 +- .../javascript/src/model/HasOnlyReadOnly.js | 2 +- .../petstore/javascript/src/model/List.js | 2 +- .../petstore/javascript/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../javascript/src/model/Model200Response.js | 2 +- .../javascript/src/model/ModelReturn.js | 2 +- .../petstore/javascript/src/model/Name.js | 2 +- .../javascript/src/model/NumberOnly.js | 2 +- .../petstore/javascript/src/model/Order.js | 2 +- .../javascript/src/model/OuterComposite.js | 2 +- .../javascript/src/model/OuterEnum.js | 2 +- .../petstore/javascript/src/model/Pet.js | 2 +- .../javascript/src/model/ReadOnlyFirst.js | 2 +- .../javascript/src/model/SpecialModelName.js | 2 +- .../petstore/javascript/src/model/Tag.js | 2 +- .../petstore/javascript/src/model/User.js | 2 +- .../petstore/lua/.openapi-generator/VERSION | 2 +- .../objc/core-data/.openapi-generator/VERSION | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../objc/default/.openapi-generator/VERSION | 2 +- .../default/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../petstore/perl/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/README.md | 1 + samples/client/petstore/perl/docs/FakeApi.md | 2 +- samples/client/petstore/perl/docs/PetApi.md | 52 + .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 95 + .../powershell/.openapi-generator/VERSION | 2 +- .../python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/README.md | 1 + .../petstore/python-asyncio/docs/PetApi.md | 55 + .../petstore_api/api/pet_api.py | 109 ++ .../python-asyncio/petstore_api/api_client.py | 2 +- .../python-tornado/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/README.md | 1 + .../petstore/python-tornado/docs/PetApi.md | 55 + .../petstore_api/api/pet_api.py | 109 ++ .../python-tornado/petstore_api/api_client.py | 2 +- .../python/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/README.md | 1 + samples/client/petstore/python/docs/PetApi.md | 55 + .../python/petstore_api/api/pet_api.py | 109 ++ .../python/petstore_api/api_client.py | 2 +- .../petstore/rust/.openapi-generator/VERSION | 2 +- .../scala-akka/.openapi-generator/VERSION | 2 +- .../scala-gatling/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../scalaz/.openapi-generator/VERSION | 2 +- .../swift/default/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../swift/rxswift/.openapi-generator/VERSION | 2 +- .../swift3/default/.openapi-generator/VERSION | 2 +- .../objcCompatible/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../swift3/rxswift/.openapi-generator/VERSION | 2 +- .../unwraprequired/.openapi-generator/VERSION | 2 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../objcCompatible/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../promisekit/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 66 + .../swift4/rxswift/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 68 + .../unwrapRequired/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../with-interfaces/README.md | 18 +- .../npm/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../builds/es6-target/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/api/PetApi.ts | 42 +- .../typescript-jquery/default/api/StoreApi.ts | 24 +- .../typescript-jquery/default/api/UserApi.ts | 72 +- .../typescript-jquery/default/git_push.sh | 2 +- .../default/model/ApiResponse.ts | 10 +- .../default/model/Category.ts | 10 +- .../typescript-jquery/default/model/Order.ts | 10 +- .../typescript-jquery/default/model/Pet.ts | 10 +- .../typescript-jquery/default/model/Tag.ts | 10 +- .../typescript-jquery/default/model/User.ts | 10 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/README.md | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/api.ts | 22 +- .../petstore/typescript-node/npm/package.json | 7 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../test/swift4/default/TestClient.podspec | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 65 + .../TestClient/Classes/OpenAPIs/APIs.swift | 61 + .../Classes/OpenAPIs/APIs/Swift4TestAPI.swift | 49 + .../OpenAPIs/AlamofireImplementations.swift | 413 ++++ .../Classes/OpenAPIs/CodableHelper.swift | 67 + .../Classes/OpenAPIs/Configuration.swift | 15 + .../Classes/OpenAPIs/Extensions.swift | 173 ++ .../OpenAPIs/JSONEncodableEncoding.swift | 54 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 43 + .../TestClient/Classes/OpenAPIs/Models.swift | 36 + .../OpenAPIs/Models/AllPrimitives.swift | 76 + .../Classes/OpenAPIs/Models/BaseCard.swift | 23 + .../Classes/OpenAPIs/Models/ErrorInfo.swift | 27 + .../OpenAPIs/Models/GetAllModelsResult.swift | 27 + .../OpenAPIs/Models/ModelDoubleArray.swift | 12 + .../OpenAPIs/Models/ModelErrorInfoArray.swift | 12 + .../OpenAPIs/Models/ModelStringArray.swift | 12 + .../Classes/OpenAPIs/Models/PersonCard.swift | 27 + .../Classes/OpenAPIs/Models/PlaceCard.swift | 27 + .../Classes/OpenAPIs/Models/SampleBase.swift | 25 + .../OpenAPIs/Models/SampleSubClass.swift | 29 + .../Classes/OpenAPIs/Models/StringEnum.swift | 15 + .../OpenAPIs/Models/VariableNameTest.swift | 36 + .../apache2/.openapi-generator/VERSION | 2 +- samples/config/petstore/apache2/PetApi.conf | 10 +- samples/config/petstore/apache2/StoreApi.conf | 6 +- samples/config/petstore/apache2/UserApi.conf | 12 +- .../cwiki/.openapi-generator/VERSION | 2 +- .../dynamic-html/.openapi-generator/VERSION | 2 +- samples/html.md/.openapi-generator/VERSION | 2 +- samples/html/.openapi-generator/VERSION | 2 +- samples/html2/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- .../aspnetcore/.openapi-generator/VERSION | 2 +- .../wwwroot/openapi-original.json | 2 + .../cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-restbed/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restbed/api/PetApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/PetApi.h | 2 +- .../petstore/cpp-restbed/api/StoreApi.cpp | 2 +- .../petstore/cpp-restbed/api/StoreApi.h | 2 +- .../petstore/cpp-restbed/api/UserApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/UserApi.h | 2 +- .../cpp-restbed/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restbed/model/ApiResponse.h | 2 +- .../petstore/cpp-restbed/model/Category.cpp | 2 +- .../petstore/cpp-restbed/model/Category.h | 2 +- .../petstore/cpp-restbed/model/Order.cpp | 2 +- .../server/petstore/cpp-restbed/model/Order.h | 2 +- .../server/petstore/cpp-restbed/model/Pet.cpp | 2 +- .../server/petstore/cpp-restbed/model/Pet.h | 2 +- .../server/petstore/cpp-restbed/model/Tag.cpp | 2 +- .../server/petstore/cpp-restbed/model/Tag.h | 2 +- .../petstore/cpp-restbed/model/User.cpp | 2 +- .../server/petstore/cpp-restbed/model/User.h | 2 +- .../erlang-server/.openapi-generator/VERSION | 2 +- .../petstore/erlang-server/priv/openapi.json | 2 + .../petstore/finch/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 ++++--- .../openapi_server/util.py | 2 +- .../flaskConnexion/.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 ++++--- .../flaskConnexion/openapi_server/util.py | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-inflector/.openapi-generator/VERSION | 2 +- .../controllers/PetController.java | 6 + .../src/main/openapi/openapi.yaml | 42 + .../java-msf4j/.openapi-generator-ignore | 23 + .../java-msf4j/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/FakeApi.java | 40 +- .../org/openapitools/api/FakeApiService.java | 4 +- .../gen/java/org/openapitools/api/PetApi.java | 27 +- .../org/openapitools/api/PetApiService.java | 4 + .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/model/AnimalFarm.java | 50 + .../org/openapitools/model/EnumArrays.java | 2 +- .../java/org/openapitools/model/MapTest.java | 2 +- .../api/impl/FakeApiServiceImpl.java | 4 +- .../api/impl/PetApiServiceImpl.java | 8 + .../java-pkmst/.openapi-generator-ignore | 23 + .../java-pkmst/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-pkmst/Readme.md | 16 +- samples/server/petstore/java-pkmst/pom.xml | 106 +- ...g.java => OpenAPIDocumentationConfig.java} | 2 +- .../com/prokarma/pkmst/controller/PetApi.java | 8 +- .../pkmst/controller/PetApiController.java | 41 +- .../prokarma/pkmst/controller/StoreApi.java | 6 +- .../pkmst/controller/StoreApiController.java | 22 +- .../prokarma/pkmst/controller/UserApi.java | 4 +- .../pkmst/controller/UserApiController.java | 10 + .../src/main/resources/application-dev.yml | 2 +- .../src/main/resources/application-local.yml | 2 +- .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../app/apimodels/EnumArrays.java | 2 +- .../app/apimodels/MapTest.java | 2 +- .../app/controllers/PetApiController.java | 21 + .../app/controllers/PetApiControllerImp.java | 6 + .../PetApiControllerImpInterface.java | 2 + .../conf/routes | 1 + .../public/openapi.json | 60 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework/public/openapi.json | 2 + .../async/.openapi-generator/VERSION | 2 +- .../async/src/main/resources/openapi.json | 2 + .../java-vertx/rx/.openapi-generator/VERSION | 2 +- .../rx/src/main/resources/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../gen/java/org/openapitools/api/PetApi.java | 17 +- .../src/main/openapi/openapi.yaml | 42 + .../ktor/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/README.md | 2 +- .../nancyfx-async/.openapi-generator/VERSION | 2 +- .../nancyfx-async/Org.OpenAPITools.sln | 25 + .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ++ .../src/Org.OpenAPITools/Models/Category.cs | 165 ++ .../src/Org.OpenAPITools/Models/Order.cs | 247 +++ .../src/Org.OpenAPITools/Models/Pet.cs | 254 +++ .../src/Org.OpenAPITools/Models/Tag.cs | 165 ++ .../src/Org.OpenAPITools/Models/User.cs | 285 +++ .../src/Org.OpenAPITools/Modules/PetModule.cs | 247 +++ .../Org.OpenAPITools/Modules/StoreModule.cs | 129 ++ .../Org.OpenAPITools/Modules/UserModule.cs | 234 +++ .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 + .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 + .../Utils/LocalDateConverter.cs | 55 + .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 +++++ .../src/Org.OpenAPITools/packages.config | 7 + .../nancyfx/.openapi-generator/VERSION | 2 +- .../petstore/nancyfx/Org.OpenAPITools.sln | 25 + .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ++ .../src/Org.OpenAPITools/Models/Category.cs | 165 ++ .../src/Org.OpenAPITools/Models/Order.cs | 247 +++ .../src/Org.OpenAPITools/Models/Pet.cs | 254 +++ .../src/Org.OpenAPITools/Models/Tag.cs | 165 ++ .../src/Org.OpenAPITools/Models/User.cs | 285 +++ .../src/Org.OpenAPITools/Modules/PetModule.cs | 246 +++ .../Org.OpenAPITools/Modules/StoreModule.cs | 128 ++ .../Org.OpenAPITools/Modules/UserModule.cs | 233 +++ .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 + .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 + .../Utils/LocalDateConverter.cs | 55 + .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 +++++ .../src/Org.OpenAPITools/packages.config | 7 + .../.openapi-generator/VERSION | 2 +- .../api/openapi.yaml | 616 +++--- .../nodejs/.openapi-generator/VERSION | 2 +- .../server/petstore/nodejs/api/openapi.yaml | 616 +++--- .../php-silex/.openapi-generator/VERSION | 2 +- .../rails5/.openapi-generator/VERSION | 2 +- .../rust-server/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-lagom-server/README.md | 8 +- .../petstore/scala-lagom-server/build.sbt | 2 +- .../scala/io/swagger/client/api/PetApi.scala | 10 +- .../io/swagger/client/api/StoreApi.scala | 10 +- .../scala/io/swagger/client/api/UserApi.scala | 12 +- .../io/swagger/client/model/ApiResponse.scala | 12 +- .../io/swagger/client/model/Category.scala | 10 +- .../scala/io/swagger/client/model/Order.scala | 10 +- .../scala/io/swagger/client/model/Pet.scala | 10 +- .../scala/io/swagger/client/model/Tag.scala | 10 +- .../scala/io/swagger/client/model/User.scala | 10 +- .../scalatra/.openapi-generator/VERSION | 2 +- .../sinatra/.openapi-generator/VERSION | 2 +- samples/server/petstore/sinatra/openapi.yaml | 576 +++--- .../undertow/.openapi-generator/VERSION | 2 +- .../src/main/resources/config/openapi.json | 2 + 538 files changed, 16252 insertions(+), 3161 deletions(-) create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.gitignore create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/README.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml create mode 100644 samples/client/petstore/eiffel/.openapi-generator-ignore create mode 100644 samples/client/petstore/elixir/.openapi-generator-ignore create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift create mode 100644 samples/server/petstore/java-msf4j/.openapi-generator-ignore create mode 100644 samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java create mode 100644 samples/server/petstore/java-pkmst/.openapi-generator-ignore rename samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/{SwaggerDocumentationConfig.java => OpenAPIDocumentationConfig.java} (98%) create mode 100644 samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config create mode 100644 samples/server/petstore/nancyfx/Org.OpenAPITools.sln create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/.openapi-generator/VERSION b/samples/client/petstore/ada/.openapi-generator/VERSION index 855ff9501eb8..82602aa4190d 100644 --- a/samples/client/petstore/ada/.openapi-generator/VERSION +++ b/samples/client/petstore/ada/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index 43fef8ce345d..4b144dfb1ad5 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; package body Samples.Petstore.Clients is @@ -13,15 +13,14 @@ package body Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type) is + Pet_Type : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -34,8 +33,7 @@ package body Samples.Petstore.Clients is Api_Key : in Swagger.Nullable_UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/pet/{petId}"); URI.Set_Path_Param ("petId", Swagger.To_String (Pet_Id)); @@ -46,7 +44,7 @@ package body Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.Nullable_UString_Vectors.Vector; + Status : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -64,7 +62,7 @@ package body Samples.Petstore.Clients is -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.Nullable_UString_Vectors.Vector; + Tags : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -99,15 +97,14 @@ package body Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type) is + Pet_Type : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.PUT, URI, Req); @@ -122,8 +119,7 @@ package body Samples.Petstore.Clients is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM)); Req.Stream.Write_Entity ("name", Name); Req.Stream.Write_Entity ("status", Status); @@ -162,8 +158,7 @@ package body Samples.Petstore.Clients is Order_Id : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/store/order/{orderId}"); URI.Set_Path_Param ("orderId", Order_Id); @@ -174,7 +169,7 @@ package body Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Nullable_Integer_Map) is + Result : out Swagger.Integer_Map) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin @@ -206,7 +201,7 @@ package body Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Order_Type; + Order_Type : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; @@ -215,7 +210,7 @@ package body Samples.Petstore.Clients is Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Order_Type); URI.Set_Path ("/store/order"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); @@ -226,14 +221,13 @@ package body Samples.Petstore.Clients is -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type) is + User_Type : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); URI.Set_Path ("/user"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -242,14 +236,13 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User); URI.Set_Path ("/user/createWithArray"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -258,14 +251,13 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User); URI.Set_Path ("/user/createWithList"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -278,8 +270,7 @@ package body Samples.Petstore.Clients is Username : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); @@ -327,8 +318,7 @@ package body Samples.Petstore.Clients is (Client : in out Client_Type) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/user/logout"); Client.Call (Swagger.Clients.GET, URI); @@ -339,14 +329,13 @@ package body Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - P_Body : in Samples.Petstore.Models.User_Type) is + User_Type : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index 590245fe2a38..3a3b6554b584 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Samples.Petstore.Models; with Swagger.Clients; @@ -16,7 +16,7 @@ package Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type); + Pet_Type : in Samples.Petstore.Models.Pet_Type); -- Deletes a pet procedure Delete_Pet @@ -28,14 +28,14 @@ package Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.Nullable_UString_Vectors.Vector; + Status : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Finds Pets by tags -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.Nullable_UString_Vectors.Vector; + Tags : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Find pet by ID @@ -48,7 +48,7 @@ package Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type); + Pet_Type : in Samples.Petstore.Models.Pet_Type); -- Updates a pet in the store with form data procedure Update_Pet_With_Form @@ -75,7 +75,7 @@ package Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Nullable_Integer_Map); + Result : out Swagger.Integer_Map); -- Find purchase order by ID -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -87,24 +87,24 @@ package Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Order_Type; + Order_Type : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type); -- Create user -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type); + User_Type : in Samples.Petstore.Models.User_Type); -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); + User : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); + User : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Delete user -- This can only be done by the logged in user. @@ -134,6 +134,6 @@ package Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - P_Body : in Samples.Petstore.Models.User_Type); + User_Type : in Samples.Petstore.Models.User_Type); end Samples.Petstore.Clients; diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.adb b/samples/client/petstore/ada/src/model/samples-petstore-models.adb index 9b310388c9dc..ca10031271a4 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.adb +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.adb @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. package body Samples.Petstore.Models is diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.ads b/samples/client/petstore/ada/src/model/samples-petstore-models.ads index 625071b3ebf5..b5241050f734 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.ads +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.ads @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; @@ -118,7 +118,7 @@ package Samples.Petstore.Models is Id : Swagger.Nullable_Long; Category : Samples.Petstore.Models.Category_Type; Name : Swagger.UString; - Photo_Urls : Swagger.Nullable_UString_Vectors.Vector; + Photo_Urls : Swagger.UString_Vectors.Vector; Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector; Status : Swagger.Nullable_UString; end record; diff --git a/samples/client/petstore/ada/src/samples-petstore.ads b/samples/client/petstore/ada/src/samples-petstore.ads index 181946604706..3565c1a3f432 100644 --- a/samples/client/petstore/ada/src/samples-petstore.ads +++ b/samples/client/petstore/ada/src/samples-petstore.ads @@ -1,9 +1,9 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with swagger-codegen. You can modify it to implement +-- This file was generated with openapi-generator. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .swagger-codegen-ignore file: +-- to the .openapi-generator-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/ada/src/samples.ads b/samples/client/petstore/ada/src/samples.ads index ff6bb421800d..1915df406b0a 100644 --- a/samples/client/petstore/ada/src/samples.ads +++ b/samples/client/petstore/ada/src/samples.ads @@ -1,9 +1,9 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with swagger-codegen. You can modify it to implement +-- This file was generated with openapi-generator. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .swagger-codegen-ignore file: +-- to the .openapi-generator-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md index adadfaab9b72..0ec2f2870d97 100644 --- a/samples/client/petstore/android/httpclient/docs/PetApi.md +++ b/samples/client/petstore/android/httpclient/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "null"; // String | Updated name of the pet -String status = "null"; // String | Updated status of the pet +String name = null; // String | Updated name of the pet +String status = null; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "null"; // String | Additional data to pass to server -File file = new File("null"); // File | file to upload +String additionalMetadata = null; // String | Additional data to pass to server +File file = null; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/android/volley/.openapi-generator/VERSION b/samples/client/petstore/android/volley/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/android/volley/.openapi-generator/VERSION +++ b/samples/client/petstore/android/volley/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md index adadfaab9b72..0ec2f2870d97 100644 --- a/samples/client/petstore/android/volley/docs/PetApi.md +++ b/samples/client/petstore/android/volley/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "null"; // String | Updated name of the pet -String status = "null"; // String | Updated status of the pet +String name = null; // String | Updated name of the pet +String status = null; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "null"; // String | Additional data to pass to server -File file = new File("null"); // File | file to upload +String additionalMetadata = null; // String | Additional data to pass to server +File file = null; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index a543b69de1be..20abbf5d57ce 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -117,6 +117,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index 3141c8ccd878..f5b919cb6b73 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -315,7 +315,8 @@ case $state in "getPetById[Find pet by ID]" \ "updatePet[Update an existing pet]" \ "updatePetWithForm[Updates a pet in the store with form data]" \ - "uploadFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ + "uploadFile[uploads an image]" \ + "uploadFileWithRequiredFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ "getInventory[Returns pet inventories by status]" \ "getOrderById[Find purchase order by ID]" \ "placeOrder[Place an order for a pet]" "createUser[Create user]" \ @@ -466,6 +467,13 @@ case $state in ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; + uploadFileWithRequiredFile) + local -a _op_arguments + _op_arguments=( + "petId=:[PATH] ID of pet to update" + ) + _describe -t actions 'operations' _op_arguments -S '' && ret=0 + ;; deleteOrder) local -a _op_arguments _op_arguments=( diff --git a/samples/client/petstore/bash/docs/FakeApi.md b/samples/client/petstore/bash/docs/FakeApi.md index 458397e67277..bb3ef255e69e 100644 --- a/samples/client/petstore/bash/docs/FakeApi.md +++ b/samples/client/petstore/bash/docs/FakeApi.md @@ -282,7 +282,7 @@ Name | Type | Description | Notes **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional] **enumQueryDouble** | **float** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | **array[string]** | Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**array[string]**](string.md) | Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/bash/docs/PetApi.md b/samples/client/petstore/bash/docs/PetApi.md index d9728a14ac7f..394b31609f8e 100644 --- a/samples/client/petstore/bash/docs/PetApi.md +++ b/samples/client/petstore/bash/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image ## **addPet** @@ -265,3 +266,35 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## **uploadFileWithRequiredFile** + +uploads an image + +### Example +```bash +petstore-cli uploadFileWithRequiredFile petId=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | ID of pet to update | + **file** | **binary** | file to upload | [default to null] + **additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index b74ebf8b2040..9cb196a2df1b 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -142,6 +142,9 @@ operation_parameters_minimum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_minimum_occurrences["uploadFile:::petId"]=1 operation_parameters_minimum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["uploadFile:::file"]=0 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::petId"]=1 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::file"]=1 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["deleteOrder:::order_id"]=1 operation_parameters_minimum_occurrences["getOrderById:::order_id"]=1 operation_parameters_minimum_occurrences["placeOrder:::Order"]=1 @@ -209,6 +212,9 @@ operation_parameters_maximum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_maximum_occurrences["uploadFile:::petId"]=0 operation_parameters_maximum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["uploadFile:::file"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::petId"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::file"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["deleteOrder:::order_id"]=0 operation_parameters_maximum_occurrences["getOrderById:::order_id"]=0 operation_parameters_maximum_occurrences["placeOrder:::Order"]=0 @@ -273,6 +279,9 @@ operation_parameters_collection_type["updatePetWithForm:::status"]="" operation_parameters_collection_type["uploadFile:::petId"]="" operation_parameters_collection_type["uploadFile:::additionalMetadata"]="" operation_parameters_collection_type["uploadFile:::file"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::petId"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::file"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::additionalMetadata"]="" operation_parameters_collection_type["deleteOrder:::order_id"]="" operation_parameters_collection_type["getOrderById:::order_id"]="" operation_parameters_collection_type["placeOrder:::Order"]="" @@ -725,6 +734,7 @@ read -r -d '' ops < | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e510bba3f599..48ec5e0f7c18 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -72,7 +72,8 @@ OpenAPI spec version: 1.0.0 - + @@ -84,8 +85,5 @@ OpenAPI spec version: 1.0.0 Org.OpenAPITools - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 9bfb712fd455..041d0037c79d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + ///

+ /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs index c6db8f4b909f..060b2eb90495 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -907,5 +932,87 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs index c7aa7e2f6554..f020476ca4b0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -907,5 +932,87 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md index 2676c56acc9e..3d6b5f551836 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs index f34cfb4d6a36..3b7f149ff3f8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index 2676c56acc9e..3d6b5f551836 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs index f34cfb4d6a36..3b7f149ff3f8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs index 9bfb712fd455..041d0037c79d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options b/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options new file mode 100644 index 000000000000..518eb901a6ff --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore b/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore new file mode 100644 index 000000000000..7c2804416498 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION new file mode 100644 index 000000000000..82602aa4190d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/README.md b/samples/client/petstore/dart/flutter_petstore/swagger/README.md new file mode 100644 index 000000000000..5f3fe0547842 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/README.md @@ -0,0 +1,121 @@ +# openapi +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(pet); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [ApiResponse](docs//ApiResponse.md) + - [Category](docs//Category.md) + - [Order](docs//Order.md) + - [Pet](docs//Pet.md) + - [Tag](docs//Tag.md) + - [User](docs//User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md new file mode 100644 index 000000000000..92422f0f446e --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] [default to null] +**type** | **String** | | [optional] [default to null] +**message** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md new file mode 100644 index 000000000000..cc0d1633b59c --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md new file mode 100644 index 000000000000..310ce6c65be3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**petId** | **int** | | [optional] [default to null] +**quantity** | **int** | | [optional] [default to null] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] +**status** | **String** | Order Status | [optional] [default to null] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md new file mode 100644 index 000000000000..191e1fc66a95 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**photoUrls** | **List<String>** | | [default to []] +**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to []] +**status** | **String** | pet status in the store | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md new file mode 100644 index 000000000000..6fa9abf67ae1 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md @@ -0,0 +1,379 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + +# **addPet** +> addPet(pet) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(pet); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | Pet id to delete +var apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petId, apiKey); +} catch (e) { + print("Exception when calling PetApi->deletePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var status = []; // List | Status values that need to be considered for filter + +try { + var result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByStatus: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> List findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var tags = []; // List | Tags to filter by + +try { + var result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByTags: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to return + +try { + var result = api_instance.getPetById(petId); + print(result); +} catch (e) { + print("Exception when calling PetApi->getPetById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(pet) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(pet); +} catch (e) { + print("Exception when calling PetApi->updatePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet that needs to be updated +var name = name_example; // String | Updated name of the pet +var status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petId, name, status); +} catch (e) { + print("Exception when calling PetApi->updatePetWithForm: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] [default to null] + **status** | **String**| Updated status of the pet | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to update +var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +var file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + var result = api_instance.uploadFile(petId, additionalMetadata, file); + print(result); +} catch (e) { + print("Exception when calling PetApi->uploadFile: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + **file** | **MultipartFile**| file to upload | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md new file mode 100644 index 000000000000..cc0c2ac2d35e --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print("Exception when calling StoreApi->deleteOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; + +var api_instance = new StoreApi(); + +try { + var result = api_instance.getInventory(); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getInventory: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = 789; // int | ID of pet that needs to be fetched + +try { + var result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getOrderById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var order = new Order(); // Order | order placed for purchasing the pet + +try { + var result = api_instance.placeOrder(order); + print(result); +} catch (e) { + print("Exception when calling StoreApi->placeOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md new file mode 100644 index 000000000000..ded7b32ac3d7 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md new file mode 100644 index 000000000000..3761b70cf0b7 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**username** | **String** | | [optional] [default to null] +**firstName** | **String** | | [optional] [default to null] +**lastName** | **String** | | [optional] [default to null] +**email** | **String** | | [optional] [default to null] +**password** | **String** | | [optional] [default to null] +**phone** | **String** | | [optional] [default to null] +**userStatus** | **int** | User Status | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md new file mode 100644 index 000000000000..0dec271be5c6 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = new User(); // User | Created user object + +try { + api_instance.createUser(user); +} catch (e) { + print("Exception when calling UserApi->createUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(user); +} catch (e) { + print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](List.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(user); +} catch (e) { + print("Exception when calling UserApi->createUsersWithListInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](List.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print("Exception when calling UserApi->deleteUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + var result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print("Exception when calling UserApi->getUserByName: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The user name for login +var password = password_example; // String | The password for login in clear text + +try { + var result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print("Exception when calling UserApi->loginUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print("Exception when calling UserApi->logoutUser: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | name that need to be deleted +var user = new User(); // User | Updated user object + +try { + api_instance.updateUser(username, user); +} catch (e) { + print("Exception when calling UserApi->updateUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh b/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh new file mode 100644 index 000000000000..8442b80bb445 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart new file mode 100644 index 000000000000..9a64a5342b4a --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart @@ -0,0 +1,27 @@ +library openapi.api; + +import 'dart:async'; +import 'dart:convert'; +import 'package:http/http.dart'; + +part 'api_client.dart'; +part 'api_helper.dart'; +part 'api_exception.dart'; +part 'auth/authentication.dart'; +part 'auth/api_key_auth.dart'; +part 'auth/oauth.dart'; +part 'auth/http_basic_auth.dart'; + +part 'api/pet_api.dart'; +part 'api/store_api.dart'; +part 'api/user_api.dart'; + +part 'model/api_response.dart'; +part 'model/category.dart'; +part 'model/order.dart'; +part 'model/pet.dart'; +part 'model/tag.dart'; +part 'model/user.dart'; + + +ApiClient defaultApiClient = new ApiClient(); diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart new file mode 100644 index 000000000000..4134e018386d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart @@ -0,0 +1,432 @@ +part of openapi.api; + + + +class PetApi { + final ApiClient apiClient; + + PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Add a new pet to the store + /// + /// + Future addPet(Pet pet) async { + Object postBody = pet; + + // verify required params are set + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); + } + + // create path and map variables + String path = "/pet".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/json","application/xml"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Deletes a pet + /// + /// + Future deletePet(int petId, { String apiKey }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + headerParams["api_key"] = apiKey; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + Future> findPetsByStatus(List status) async { + Object postBody = null; + + // verify required params are set + if(status == null) { + throw new ApiException(400, "Missing required param: status"); + } + + // create path and map variables + String path = "/pet/findByStatus".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("csv", "status", status)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); + } else { + return null; + } + } + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + Future> findPetsByTags(List tags) async { + Object postBody = null; + + // verify required params are set + if(tags == null) { + throw new ApiException(400, "Missing required param: tags"); + } + + // create path and map variables + String path = "/pet/findByTags".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("csv", "tags", tags)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); + } else { + return null; + } + } + /// Find pet by ID + /// + /// Returns a single pet + Future getPetById(int petId) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["api_key"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Pet') as Pet; + } else { + return null; + } + } + /// Update an existing pet + /// + /// + Future updatePet(Pet pet) async { + Object postBody = pet; + + // verify required params are set + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); + } + + // create path and map variables + String path = "/pet".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/json","application/xml"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Updates a pet in the store with form data + /// + /// + Future updatePetWithForm(int petId, { String name, String status }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/x-www-form-urlencoded"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if (name != null) { + hasFields = true; + mp.fields['name'] = parameterToString(name); + } + if (status != null) { + hasFields = true; + mp.fields['status'] = parameterToString(status); + } + if(hasFields) + postBody = mp; + } + else { + if (name != null) + formParams['name'] = parameterToString(name); + if (status != null) + formParams['status'] = parameterToString(status); + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// uploads an image + /// + /// + Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}/uploadImage".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["multipart/form-data"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if (additionalMetadata != null) { + hasFields = true; + mp.fields['additionalMetadata'] = parameterToString(additionalMetadata); + } + if (file != null) { + hasFields = true; + mp.fields['file'] = file.field; + mp.files.add(file); + } + if(hasFields) + postBody = mp; + } + else { + if (additionalMetadata != null) + formParams['additionalMetadata'] = parameterToString(additionalMetadata); + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'ApiResponse') as ApiResponse; + } else { + return null; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart new file mode 100644 index 000000000000..f2a48f2d4dae --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart @@ -0,0 +1,207 @@ +part of openapi.api; + + + +class StoreApi { + final ApiClient apiClient; + + StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + Future deleteOrder(String orderId) async { + Object postBody = null; + + // verify required params are set + if(orderId == null) { + throw new ApiException(400, "Missing required param: orderId"); + } + + // create path and map variables + String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future> getInventory() async { + Object postBody = null; + + // verify required params are set + + // create path and map variables + String path = "/store/inventory".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["api_key"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return new Map.from(apiClient.deserialize(response.body, 'Map')); + ; + } else { + return null; + } + } + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Future getOrderById(int orderId) async { + Object postBody = null; + + // verify required params are set + if(orderId == null) { + throw new ApiException(400, "Missing required param: orderId"); + } + + // create path and map variables + String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Order') as Order; + } else { + return null; + } + } + /// Place an order for a pet + /// + /// + Future placeOrder(Order order) async { + Object postBody = order; + + // verify required params are set + if(order == null) { + throw new ApiException(400, "Missing required param: order"); + } + + // create path and map variables + String path = "/store/order".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Order') as Order; + } else { + return null; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart new file mode 100644 index 000000000000..cf8ef6bf8002 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart @@ -0,0 +1,409 @@ +part of openapi.api; + + + +class UserApi { + final ApiClient apiClient; + + UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Create user + /// + /// This can only be done by the logged in user. + Future createUser(User user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithArrayInput(List user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/createWithArray".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithListInput(List user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/createWithList".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Delete user + /// + /// This can only be done by the logged in user. + Future deleteUser(String username) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Get user by user name + /// + /// + Future getUserByName(String username) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'User') as User; + } else { + return null; + } + } + /// Logs user into the system + /// + /// + Future loginUser(String username, String password) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + if(password == null) { + throw new ApiException(400, "Missing required param: password"); + } + + // create path and map variables + String path = "/user/login".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("", "username", username)); + queryParams.addAll(_convertParametersForCollectionFormat("", "password", password)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'String') as String; + } else { + return null; + } + } + /// Logs out current logged in user session + /// + /// + Future logoutUser() async { + Object postBody = null; + + // verify required params are set + + // create path and map variables + String path = "/user/logout".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Updated user + /// + /// This can only be done by the logged in user. + Future updateUser(String username, User user) async { + Object postBody = user; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart new file mode 100644 index 000000000000..db4116dd96dc --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart @@ -0,0 +1,160 @@ +part of openapi.api; + +class QueryParam { + String name; + String value; + + QueryParam(this.name, this.value); +} + +class ApiClient { + + String basePath; + var client = new Client(); + + Map _defaultHeaderMap = {}; + Map _authentications = {}; + + final _RegList = new RegExp(r'^List<(.*)>$'); + final _RegMap = new RegExp(r'^Map$'); + + ApiClient({this.basePath: "http://petstore.swagger.io/v2"}) { + // Setup authentications (key: authentication name, value: authentication). + _authentications['api_key'] = new ApiKeyAuth("header", "api_key"); + _authentications['petstore_auth'] = new OAuth(); + } + + void addDefaultHeader(String key, String value) { + _defaultHeaderMap[key] = value; + } + + dynamic _deserialize(dynamic value, String targetType) { + try { + switch (targetType) { + case 'String': + return '$value'; + case 'int': + return value is int ? value : int.parse('$value'); + case 'bool': + return value is bool ? value : '$value'.toLowerCase() == 'true'; + case 'double': + return value is double ? value : double.parse('$value'); + case 'ApiResponse': + return new ApiResponse.fromJson(value); + case 'Category': + return new Category.fromJson(value); + case 'Order': + return new Order.fromJson(value); + case 'Pet': + return new Pet.fromJson(value); + case 'Tag': + return new Tag.fromJson(value); + case 'User': + return new User.fromJson(value); + default: + { + Match match; + if (value is List && + (match = _RegList.firstMatch(targetType)) != null) { + var newTargetType = match[1]; + return value.map((v) => _deserialize(v, newTargetType)).toList(); + } else if (value is Map && + (match = _RegMap.firstMatch(targetType)) != null) { + var newTargetType = match[1]; + return new Map.fromIterables(value.keys, + value.values.map((v) => _deserialize(v, newTargetType))); + } + } + } + } catch (e, stack) { + throw new ApiException.withInner(500, 'Exception during deserialization.', e, stack); + } + throw new ApiException(500, 'Could not find a suitable class for deserialization'); + } + + dynamic deserialize(String json, String targetType) { + // Remove all spaces. Necessary for reg expressions as well. + targetType = targetType.replaceAll(' ', ''); + + if (targetType == 'String') return json; + + var decodedJson = JSON.decode(json); + return _deserialize(decodedJson, targetType); + } + + String serialize(Object obj) { + String serialized = ''; + if (obj == null) { + serialized = ''; + } else { + serialized = JSON.encode(obj); + } + return serialized; + } + + // We don't use a Map for queryParams. + // If collectionFormat is 'multi' a key might appear multiple times. + Future invokeAPI(String path, + String method, + Iterable queryParams, + Object body, + Map headerParams, + Map formParams, + String contentType, + List authNames) async { + + _updateParamsForAuth(authNames, queryParams, headerParams); + + var ps = queryParams.where((p) => p.value != null).map((p) => '${p.name}=${p.value}'); + String queryString = ps.isNotEmpty ? + '?' + ps.join('&') : + ''; + + String url = basePath + path + queryString; + + headerParams.addAll(_defaultHeaderMap); + headerParams['Content-Type'] = contentType; + + if(body is MultipartRequest) { + var request = new MultipartRequest(method, Uri.parse(url)); + request.fields.addAll(body.fields); + request.files.addAll(body.files); + request.headers.addAll(body.headers); + request.headers.addAll(headerParams); + var response = await client.send(request); + return Response.fromStream(response); + } else { + var msgBody = contentType == "application/x-www-form-urlencoded" ? formParams : serialize(body); + switch(method) { + case "POST": + return client.post(url, headers: headerParams, body: msgBody); + case "PUT": + return client.put(url, headers: headerParams, body: msgBody); + case "DELETE": + return client.delete(url, headers: headerParams); + case "PATCH": + return client.patch(url, headers: headerParams, body: msgBody); + default: + return client.get(url, headers: headerParams); + } + } + } + + /// Update query and header parameters based on authentication settings. + /// @param authNames The authentications to apply + void _updateParamsForAuth(List authNames, List queryParams, Map headerParams) { + authNames.forEach((authName) { + Authentication auth = _authentications[authName]; + if (auth == null) throw new ArgumentError("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + }); + } + + void setAccessToken(String accessToken) { + _authentications.forEach((key, auth) { + if (auth is OAuth) { + auth.setAccessToken(accessToken); + } + }); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart new file mode 100644 index 000000000000..f188fd125a4d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart @@ -0,0 +1,23 @@ +part of openapi.api; + +class ApiException implements Exception { + int code = 0; + String message = null; + Exception innerException = null; + StackTrace stackTrace = null; + + ApiException(this.code, this.message); + + ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + + String toString() { + if (message == null) return "ApiException"; + + if (innerException == null) { + return "ApiException $code: $message"; + } + + return "ApiException $code: $message (Inner exception: ${innerException})\n\n" + + stackTrace.toString(); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart new file mode 100644 index 000000000000..79af4521d5b3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart @@ -0,0 +1,44 @@ +part of openapi.api; + +const _delimiters = const {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; + +// port from Java version +Iterable _convertParametersForCollectionFormat( + String collectionFormat, String name, dynamic value) { + var params = []; + + // preconditions + if (name == null || name.isEmpty || value == null) return params; + + if (value is! List) { + params.add(new QueryParam(name, parameterToString(value))); + return params; + } + + List values = value as List; + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty) + ? "csv" + : collectionFormat; // default: csv + + if (collectionFormat == "multi") { + return values.map((v) => new QueryParam(name, parameterToString(v))); + } + + String delimiter = _delimiters[collectionFormat] ?? ","; + + params.add(new QueryParam(name, values.map((v) => parameterToString(v)).join(delimiter))); + return params; +} + +/// Format the given parameter object into string. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } else if (value is DateTime) { + return value.toUtc().toIso8601String(); + } else { + return value.toString(); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart new file mode 100644 index 000000000000..f9617f7ae4da --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart @@ -0,0 +1,27 @@ +part of openapi.api; + +class ApiKeyAuth implements Authentication { + + final String location; + final String paramName; + String apiKey; + String apiKeyPrefix; + + ApiKeyAuth(this.location, this.paramName); + + @override + void applyToParams(List queryParams, Map headerParams) { + String value; + if (apiKeyPrefix != null) { + value = '$apiKeyPrefix $apiKey'; + } else { + value = apiKey; + } + + if (location == 'query' && value != null) { + queryParams.add(new QueryParam(paramName, value)); + } else if (location == 'header' && value != null) { + headerParams[paramName] = value; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart new file mode 100644 index 000000000000..abd5e2fe68a3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart @@ -0,0 +1,7 @@ +part of openapi.api; + +abstract class Authentication { + + /// Apply authentication settings to header and query params. + void applyToParams(List queryParams, Map headerParams); +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart new file mode 100644 index 000000000000..4e77ddcf6e68 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart @@ -0,0 +1,14 @@ +part of openapi.api; + +class HttpBasicAuth implements Authentication { + + String username; + String password; + + @override + void applyToParams(List queryParams, Map headerParams) { + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams["Authorization"] = "Basic " + BASE64.encode(UTF8.encode(str)); + } + +} \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart new file mode 100644 index 000000000000..13bfd799743b --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart @@ -0,0 +1,19 @@ +part of openapi.api; + +class OAuth implements Authentication { + String accessToken; + + OAuth({this.accessToken}) { + } + + @override + void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams["Authorization"] = "Bearer " + accessToken; + } + } + + void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart new file mode 100644 index 000000000000..a39d9500b29d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart @@ -0,0 +1,44 @@ +part of openapi.api; + +class ApiResponse { + + int code = null; + + String type = null; + + String message = null; + ApiResponse(); + + @override + String toString() { + return 'ApiResponse[code=$code, type=$type, message=$message, ]'; + } + + ApiResponse.fromJson(Map json) { + if (json == null) return; + code = json['code']; + type = json['type']; + message = json['message']; + } + + Map toJson() { + return { + 'code': code, + 'type': type, + 'message': message + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new ApiResponse.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new ApiResponse.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart new file mode 100644 index 000000000000..b9b2481dd295 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart @@ -0,0 +1,40 @@ +part of openapi.api; + +class Category { + + int id = null; + + String name = null; + Category(); + + @override + String toString() { + return 'Category[id=$id, name=$name, ]'; + } + + Category.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + return { + 'id': id, + 'name': name + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Category.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Category.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart new file mode 100644 index 000000000000..4e264a183ef9 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart @@ -0,0 +1,57 @@ +part of openapi.api; + +class Order { + + int id = null; + + int petId = null; + + int quantity = null; + + DateTime shipDate = null; + /* Order Status */ + String status = null; + //enum statusEnum { placed, approved, delivered, };{ + + bool complete = false; + Order(); + + @override + String toString() { + return 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete, ]'; + } + + Order.fromJson(Map json) { + if (json == null) return; + id = json['id']; + petId = json['petId']; + quantity = json['quantity']; + shipDate = json['shipDate'] == null ? null : DateTime.parse(json['shipDate']); + status = json['status']; + complete = json['complete']; + } + + Map toJson() { + return { + 'id': id, + 'petId': petId, + 'quantity': quantity, + 'shipDate': shipDate == null ? '' : shipDate.toUtc().toIso8601String(), + 'status': status, + 'complete': complete + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Order.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Order.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart new file mode 100644 index 000000000000..4d2f77a1a5ae --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart @@ -0,0 +1,57 @@ +part of openapi.api; + +class Pet { + + int id = null; + + Category category = null; + + String name = null; + + List photoUrls = []; + + List tags = []; + /* pet status in the store */ + String status = null; + //enum statusEnum { available, pending, sold, };{ + Pet(); + + @override + String toString() { + return 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status, ]'; + } + + Pet.fromJson(Map json) { + if (json == null) return; + id = json['id']; + category = new Category.fromJson(json['category']); + name = json['name']; + photoUrls = (json['photoUrls'] as List).map((item) => item as String).toList(); + tags = Tag.listFromJson(json['tags']); + status = json['status']; + } + + Map toJson() { + return { + 'id': id, + 'category': category, + 'name': name, + 'photoUrls': photoUrls, + 'tags': tags, + 'status': status + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Pet.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Pet.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart new file mode 100644 index 000000000000..315a326adb72 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart @@ -0,0 +1,40 @@ +part of openapi.api; + +class Tag { + + int id = null; + + String name = null; + Tag(); + + @override + String toString() { + return 'Tag[id=$id, name=$name, ]'; + } + + Tag.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + return { + 'id': id, + 'name': name + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Tag.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Tag.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart new file mode 100644 index 000000000000..0e4cc2104c76 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart @@ -0,0 +1,64 @@ +part of openapi.api; + +class User { + + int id = null; + + String username = null; + + String firstName = null; + + String lastName = null; + + String email = null; + + String password = null; + + String phone = null; + /* User Status */ + int userStatus = null; + User(); + + @override + String toString() { + return 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus, ]'; + } + + User.fromJson(Map json) { + if (json == null) return; + id = json['id']; + username = json['username']; + firstName = json['firstName']; + lastName = json['lastName']; + email = json['email']; + password = json['password']; + phone = json['phone']; + userStatus = json['userStatus']; + } + + Map toJson() { + return { + 'id': id, + 'username': username, + 'firstName': firstName, + 'lastName': lastName, + 'email': email, + 'password': password, + 'phone': phone, + 'userStatus': userStatus + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new User.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new User.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml b/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml new file mode 100644 index 000000000000..d54efb46a2e4 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml @@ -0,0 +1,5 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + http: '>=0.11.1 <0.12.0' diff --git a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/.openapi-generator-ignore b/samples/client/petstore/eiffel/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/eiffel/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/eiffel/.openapi-generator/VERSION b/samples/client/petstore/eiffel/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/eiffel/.openapi-generator/VERSION +++ b/samples/client/petstore/eiffel/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/README.md b/samples/client/petstore/eiffel/README.md index bb363368532d..25bb0357e138 100644 --- a/samples/client/petstore/eiffel/README.md +++ b/samples/client/petstore/eiffel/README.md @@ -41,6 +41,7 @@ Class | Method | HTTP request | Description *PET_API* | [**update_pet**](docs/PET_API.md#update_pet) | **Put** /pet | Update an existing pet *PET_API* | [**update_pet_with_form**](docs/PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data *PET_API* | [**upload_file**](docs/PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image +*PET_API* | [**upload_file_with_required_file**](docs/PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *STORE_API* | [**delete_order**](docs/STORE_API.md#delete_order) | **Delete** /store/order/{order_id} | Delete purchase order by ID *STORE_API* | [**inventory**](docs/STORE_API.md#inventory) | **Get** /store/inventory | Returns pet inventories by status *STORE_API* | [**order_by_id**](docs/STORE_API.md#order_by_id) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/eiffel/api_client.ecf b/samples/client/petstore/eiffel/api_client.ecf index 6f0ef48e4822..bbe20c6f0cf8 100644 --- a/samples/client/petstore/eiffel/api_client.ecf +++ b/samples/client/petstore/eiffel/api_client.ecf @@ -1,5 +1,5 @@ - + diff --git a/samples/client/petstore/eiffel/docs/FAKE_API.md b/samples/client/petstore/eiffel/docs/FAKE_API.md index 94888d077727..948a89a92484 100644 --- a/samples/client/petstore/eiffel/docs/FAKE_API.md +++ b/samples/client/petstore/eiffel/docs/FAKE_API.md @@ -257,7 +257,7 @@ Name | Type | Description | Notes **enum_query_string** | **STRING_32**| Query parameter enum test (string) | [optional] [default to -efg] **enum_query_integer** | **INTEGER_32**| Query parameter enum test (double) | [optional] **enum_query_double** | **REAL_64**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | **LIST [STRING_32]**| Form parameter enum test (string array) | [optional] [default to $] + **enum_form_string_array** | [**LIST [STRING_32]**](STRING_32.md)| Form parameter enum test (string array) | [optional] [default to $] **enum_form_string** | **STRING_32**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/eiffel/docs/PET_API.md b/samples/client/petstore/eiffel/docs/PET_API.md index 2bd3122ea68b..0cd65def72d8 100644 --- a/samples/client/petstore/eiffel/docs/PET_API.md +++ b/samples/client/petstore/eiffel/docs/PET_API.md @@ -12,6 +12,7 @@ Feature | HTTP request | Description [**update_pet**](PET_API.md#update_pet) | **Put** /pet | Update an existing pet [**update_pet_with_form**](PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -249,3 +250,33 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> upload_file_with_required_file (pet_id: INTEGER_64 ; file: FILE ; additional_metadata: detachable STRING_32 ): detachable API_RESPONSE + + +uploads an image + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **INTEGER_64**| ID of pet to update | + **file** | **FILE**| file to upload | [default to null] + **additional_metadata** | **STRING_32**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**API_RESPONSE**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/eiffel/src/api/fake_api.e b/samples/client/petstore/eiffel/src/api/fake_api.e index 6e7a054c2bdc..f266f7d55592 100644 --- a/samples/client/petstore/eiffel/src/api/fake_api.e +++ b/samples/client/petstore/eiffel/src/api/fake_api.e @@ -339,7 +339,7 @@ feature -- API Access end end - test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: LIST [STRING_32]; enum_form_string: STRING_32) + test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: detachable LIST [STRING_32]; enum_form_string: STRING_32) -- To test enum parameters -- To test enum parameters -- diff --git a/samples/client/petstore/eiffel/src/api/pet_api.e b/samples/client/petstore/eiffel/src/api/pet_api.e index 17a482737ed5..e6fbb1273a8a 100644 --- a/samples/client/petstore/eiffel/src/api/pet_api.e +++ b/samples/client/petstore/eiffel/src/api/pet_api.e @@ -315,5 +315,51 @@ feature -- API Access end end + upload_file_with_required_file (pet_id: INTEGER_64; file: FILE; additional_metadata: STRING_32): detachable API_RESPONSE + -- uploads an image + -- + -- + -- argument: pet_id ID of pet to update (required) + -- + -- argument: file file to upload (required) + -- + -- argument: additional_metadata Additional data to pass to server (optional, default to null) + -- + -- + -- Result API_RESPONSE + require + local + l_path: STRING + l_request: API_CLIENT_REQUEST + l_response: API_CLIENT_RESPONSE + do + reset_error + create l_request + + l_path := "/pet/{petId}/uploadImageWithRequiredFile" + l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) + + if attached additional_metadata as l_additional_metadata then + l_request.add_form(l_additional_metadata,"additionalMetadata"); + end + if attached file as l_file then + l_request.add_form(l_file,"file"); + end + + if attached {STRING} api_client.select_header_accept (<<"application/json">>) as l_accept then + l_request.add_header(l_accept,"Accept"); + end + l_request.add_header(api_client.select_header_content_type (<<"multipart/form-data">>),"Content-Type") + l_request.set_auth_names (<<"petstore_auth">>) + l_response := api_client.call_api (l_path, "Post", l_request, Void, agent deserializer) + if l_response.has_error then + last_error := l_response.error + elseif attached { API_RESPONSE } l_response.data ({ API_RESPONSE }) as l_data then + Result := l_data + else + create last_error.make ("Unknown error: Status response [ " + l_response.status.out + "]") + end + end + end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e index 993decf6a2c2..a7bcedfd3509 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e @@ -20,7 +20,7 @@ expanded class feature -- Access from_json (a_val:STRING; a_type: TYPE [detachable ANY] ): detachable ANY - -- Deserialize a a json representation `a_val' to an object + -- Deserialize a json representation `a_val' to an object -- of type `a_type' local conv_from: JSON_BASIC_REFLECTOR_DESERIALIZER diff --git a/samples/client/petstore/eiffel/test/api_test.ecf b/samples/client/petstore/eiffel/test/api_test.ecf index ddb5082cabec..560bb6dc3d33 100644 --- a/samples/client/petstore/eiffel/test/api_test.ecf +++ b/samples/client/petstore/eiffel/test/api_test.ecf @@ -1,5 +1,5 @@ - + diff --git a/samples/client/petstore/elixir/.openapi-generator-ignore b/samples/client/petstore/elixir/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/elixir/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/config/config.exs b/samples/client/petstore/elixir/config/config.exs index 7ce1553ff17a..72508194de35 100644 --- a/samples/client/petstore/elixir/config/config.exs +++ b/samples/client/petstore/elixir/config/config.exs @@ -10,11 +10,11 @@ use Mix.Config # You can configure for your application as: # -# config :swagger_petstore, key: :value +# config :open_api_petstore, key: :value # # And access this configuration in your application as: # -# Application.get_env(:swagger_petstore, :key) +# Application.get_env(:open_api_petstore, :key) # # Or configure a 3rd-party app: # diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index 92281bc7f3c1..31050082ad16 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -271,7 +271,7 @@ defmodule OpenapiPetstore.Api.Fake do ## Parameters - connection (OpenapiPetstore.Connection): Connection to server - - request_body (String.t): request body + - request_body (%{optional(String.t) => String.t}): request body - opts (KeywordList): [optional] Optional parameters ## Returns diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex index ba926165d6db..e89a145e7939 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex @@ -220,4 +220,34 @@ defmodule OpenapiPetstore.Api.Pet do |> (&Connection.request(connection, &1)).() |> decode(%OpenapiPetstore.Model.ApiResponse{}) end + + @doc """ + uploads an image + + ## Parameters + + - connection (OpenapiPetstore.Connection): Connection to server + - pet_id (integer()): ID of pet to update + - file (String.t): file to upload + - opts (KeywordList): [optional] Optional parameters + - :additional_metadata (String.t): Additional data to pass to server + ## Returns + + {:ok, %OpenapiPetstore.Model.ApiResponse{}} on success + {:error, info} on failure + """ + @spec upload_file_with_required_file(Tesla.Env.client, integer(), String.t, keyword()) :: {:ok, OpenapiPetstore.Model.ApiResponse.t} | {:error, Tesla.Env.t} + def upload_file_with_required_file(connection, pet_id, file, opts \\ []) do + optional_params = %{ + :"additionalMetadata" => :form + } + %{} + |> method(:post) + |> url("/pet/#{pet_id}/uploadImageWithRequiredFile") + |> add_param(:file, :"file", file) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> decode(%OpenapiPetstore.Model.ApiResponse{}) + end end diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex index a26f07618129..834cc003d108 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex @@ -15,7 +15,7 @@ defmodule OpenapiPetstore.Connection do plug Tesla.Middleware.EncodeJson @doc """ - Configure an client connection using Basic authentication. + Configure a client connection using Basic authentication. ## Parameters diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-client/.openapi-generator/VERSION b/samples/client/petstore/erlang-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/erlang-client/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/.openapi-generator/VERSION b/samples/client/petstore/flash/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/flash/.openapi-generator/VERSION +++ b/samples/client/petstore/flash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/flash/build.xml b/samples/client/petstore/flash/flash/build.xml index da3c67f83443..dedf7e030081 100644 --- a/samples/client/petstore/flash/flash/build.xml +++ b/samples/client/petstore/flash/flash/build.xml @@ -15,7 +15,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -189,4 +189,4 @@ - \ No newline at end of file + diff --git a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as index 964dbc26d692..abb0fe121fb2 100644 --- a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as +++ b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as @@ -11,7 +11,7 @@ import flash.events.Event; public class ApiClientEvent extends Event{ /** - * Event type to indicate a unsuccessful invocation + * Event type to indicate an unsuccessful invocation */ public static const FAILURE_EVENT:String = "unsuccesfulInvocation"; @@ -33,4 +33,4 @@ public class ApiClientEvent extends Event{ super(type, bubbles, cancelable); } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index dfb07bd7fdf6..e6f811087550 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -50,6 +50,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index c5c2dfaffa71..670b9e7adecc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -282,6 +282,46 @@ paths: summary: uploads an image tags: - pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 37db3a5b3535..f44bbc804da4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -696,3 +696,106 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt return localVarReturnValue, localVarHttpResponse, nil } + +/* +PetApiService uploads an image + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to update + * @param file file to upload + * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: + * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server +@return ApiResponse +*/ + +type UploadFileWithRequiredFileOpts struct { + AdditionalMetadata optional.String +} + +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApiResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImageWithRequiredFile" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { + localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + } + localVarFile := file + if localVarFile != nil { + fbs, _ := ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ApiResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index 9a78c747da00..402f31e72910 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **AddPet** @@ -257,3 +258,40 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional) +uploads an image + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **petId** | **int64**| ID of pet to update | + **file** | ***os.File*****os.File**| file to upload | + **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **additionalMetadata** | **optional.String**| Additional data to pass to server | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/README.md b/samples/client/petstore/haskell-http-client/README.md index 7e2167a91d90..df8a36316301 100644 --- a/samples/client/petstore/haskell-http-client/README.md +++ b/samples/client/petstore/haskell-http-client/README.md @@ -2,7 +2,7 @@ The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the OpenAPI Petstore API. -OpenApi Version: 3.0.0 +OpenApi Version: 3.0.1 ## Installation @@ -36,7 +36,7 @@ to obtain and use the openapi-generator cli tool lives at https://openapi-generator.tech -The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be +The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be ``` haskell-http-client diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs index 4e71ab9e7206..83e607b1ad72 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs index 3c3deada26b9..7335a85067e3 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs index d6187951efe7..0deb75364af9 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs index 6e27a5fe5b1b..fa21cfee9f26 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -64,10 +64,11 @@ import qualified Prelude as P -- Test serialization of outer boolean types -- fakeOuterBooleanSerialize - :: (Consumes FakeOuterBooleanSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize MimeJSON Bool accept -fakeOuterBooleanSerialize _ = + :: (Consumes FakeOuterBooleanSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept +fakeOuterBooleanSerialize _ _ = _mkRequest "POST" ["/fake/outer/boolean"] data FakeOuterBooleanSerialize @@ -75,9 +76,6 @@ data FakeOuterBooleanSerialize -- | /Body Param/ "body" - Input boolean as post body instance HasBodyParam FakeOuterBooleanSerialize BodyBool --- | @application/json@ -instance Consumes FakeOuterBooleanSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype @@ -89,10 +87,11 @@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype -- Test serialization of object with outer number type -- fakeOuterCompositeSerialize - :: (Consumes FakeOuterCompositeSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize MimeJSON OuterComposite accept -fakeOuterCompositeSerialize _ = + :: (Consumes FakeOuterCompositeSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept +fakeOuterCompositeSerialize _ _ = _mkRequest "POST" ["/fake/outer/composite"] data FakeOuterCompositeSerialize @@ -100,9 +99,6 @@ data FakeOuterCompositeSerialize -- | /Body Param/ "OuterComposite" - Input composite as post body instance HasBodyParam FakeOuterCompositeSerialize OuterComposite --- | @application/json@ -instance Consumes FakeOuterCompositeSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype @@ -114,10 +110,11 @@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype -- Test serialization of outer number types -- fakeOuterNumberSerialize - :: (Consumes FakeOuterNumberSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterNumberSerialize MimeJSON Double accept -fakeOuterNumberSerialize _ = + :: (Consumes FakeOuterNumberSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept +fakeOuterNumberSerialize _ _ = _mkRequest "POST" ["/fake/outer/number"] data FakeOuterNumberSerialize @@ -125,9 +122,6 @@ data FakeOuterNumberSerialize -- | /Body Param/ "body" - Input number as post body instance HasBodyParam FakeOuterNumberSerialize Body --- | @application/json@ -instance Consumes FakeOuterNumberSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype @@ -139,10 +133,11 @@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype -- Test serialization of outer string types -- fakeOuterStringSerialize - :: (Consumes FakeOuterStringSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterStringSerialize MimeJSON Text accept -fakeOuterStringSerialize _ = + :: (Consumes FakeOuterStringSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept +fakeOuterStringSerialize _ _ = _mkRequest "POST" ["/fake/outer/string"] data FakeOuterStringSerialize @@ -150,13 +145,33 @@ data FakeOuterStringSerialize -- | /Body Param/ "body" - Input string as post body instance HasBodyParam FakeOuterStringSerialize BodyText --- | @application/json@ -instance Consumes FakeOuterStringSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterStringSerialize mtype +-- *** testBodyWithQueryParams + +-- | @PUT \/fake\/body-with-query-params@ +-- +testBodyWithQueryParams + :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) + => User -- ^ "user" + -> Query -- ^ "query" + -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent +testBodyWithQueryParams user (Query query) = + _mkRequest "PUT" ["/fake/body-with-query-params"] + `setBodyParam` user + `setQuery` toQuery ("query", Just query) + +data TestBodyWithQueryParams +instance HasBodyParam TestBodyWithQueryParams User + +-- | @application/json@ +instance Consumes TestBodyWithQueryParams MimeJSON + +instance Produces TestBodyWithQueryParams MimeNoContent + + -- *** testClientModel -- | @PATCH \/fake@ @@ -307,7 +322,7 @@ instance HasOptionalParam TestEnumParameters EnumHeaderString where -- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumQueryStringArray where applyOptionalParam req (EnumQueryStringArray xs) = - req `setQuery` toQueryColl MultiParamArray ("enum_query_string_array", Just xs) + req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) -- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumQueryString where diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs index e1776cbfd8b7..5719e3c4cd4b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs index 16797e4fdbf5..48c91af3aaa4 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -292,3 +292,35 @@ instance Consumes UploadFile MimeMultipartFormData -- | @application/json@ instance Produces UploadFile MimeJSON + +-- *** uploadFileWithRequiredFile + +-- | @POST \/pet\/{petId}\/uploadImageWithRequiredFile@ +-- +-- uploads an image +-- +-- AuthMethod: 'AuthOAuthPetstoreAuth' +-- +uploadFileWithRequiredFile + :: (Consumes UploadFileWithRequiredFile MimeMultipartFormData) + => File -- ^ "file" - file to upload + -> PetId -- ^ "petId" - ID of pet to update + -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON +uploadFileWithRequiredFile (File file) (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId,"/uploadImageWithRequiredFile"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) + `_addMultiFormPart` NH.partFileSource "file" file + +data UploadFileWithRequiredFile + +-- | /Optional Param/ "additionalMetadata" - Additional data to pass to server +instance HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata where + applyOptionalParam req (AdditionalMetadata xs) = + req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) + +-- | @multipart/form-data@ +instance Consumes UploadFileWithRequiredFile MimeMultipartFormData + +-- | @application/json@ +instance Produces UploadFileWithRequiredFile MimeJSON + diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs index 628da5181219..12bcd0bc94a7 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -128,11 +128,12 @@ instance Produces GetOrderById MimeJSON -- Place an order for a pet -- placeOrder - :: (Consumes PlaceOrder MimeJSON, MimeRender MimeJSON Order) - => Accept accept -- ^ request accept ('MimeType') + :: (Consumes PlaceOrder contentType, MimeRender contentType Order) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') -> Order -- ^ "order" - order placed for purchasing the pet - -> OpenAPIPetstoreRequest PlaceOrder MimeJSON Order accept -placeOrder _ order = + -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept +placeOrder _ _ order = _mkRequest "POST" ["/store/order"] `setBodyParam` order @@ -141,9 +142,6 @@ data PlaceOrder -- | /Body Param/ "Order" - order placed for purchasing the pet instance HasBodyParam PlaceOrder Order --- | @application/json@ -instance Consumes PlaceOrder MimeJSON - -- | @application/xml@ instance Produces PlaceOrder MimeXML -- | @application/json@ diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs index 76b4963a8f10..efc6ad66f315 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -66,10 +66,11 @@ import qualified Prelude as P -- This can only be done by the logged in user. -- createUser - :: (Consumes CreateUser MimeJSON, MimeRender MimeJSON User) - => User -- ^ "user" - Created user object - -> OpenAPIPetstoreRequest CreateUser MimeJSON NoContent MimeNoContent -createUser user = + :: (Consumes CreateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User -- ^ "user" - Created user object + -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent +createUser _ user = _mkRequest "POST" ["/user"] `setBodyParam` user @@ -78,9 +79,6 @@ data CreateUser -- | /Body Param/ "User" - Created user object instance HasBodyParam CreateUser User --- | @application/json@ -instance Consumes CreateUser MimeJSON - instance Produces CreateUser MimeNoContent @@ -91,10 +89,11 @@ instance Produces CreateUser MimeNoContent -- Creates list of users with given input array -- createUsersWithArrayInput - :: (Consumes CreateUsersWithArrayInput MimeJSON, MimeRender MimeJSON User2) - => User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithArrayInput MimeJSON NoContent MimeNoContent -createUsersWithArrayInput user = + :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType User2) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent +createUsersWithArrayInput _ user = _mkRequest "POST" ["/user/createWithArray"] `setBodyParam` user @@ -103,9 +102,6 @@ data CreateUsersWithArrayInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithArrayInput User2 --- | @application/json@ -instance Consumes CreateUsersWithArrayInput MimeJSON - instance Produces CreateUsersWithArrayInput MimeNoContent @@ -116,10 +112,11 @@ instance Produces CreateUsersWithArrayInput MimeNoContent -- Creates list of users with given input array -- createUsersWithListInput - :: (Consumes CreateUsersWithListInput MimeJSON, MimeRender MimeJSON User2) - => User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithListInput MimeJSON NoContent MimeNoContent -createUsersWithListInput user = + :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType User2) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent +createUsersWithListInput _ user = _mkRequest "POST" ["/user/createWithList"] `setBodyParam` user @@ -128,9 +125,6 @@ data CreateUsersWithListInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithListInput User2 --- | @application/json@ -instance Consumes CreateUsersWithListInput MimeJSON - instance Produces CreateUsersWithListInput MimeNoContent @@ -223,11 +217,12 @@ instance Produces LogoutUser MimeNoContent -- This can only be done by the logged in user. -- updateUser - :: (Consumes UpdateUser MimeJSON, MimeRender MimeJSON User) - => User -- ^ "user" - Updated user object + :: (Consumes UpdateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User -- ^ "user" - Updated user object -> Username -- ^ "username" - name that need to be deleted - -> OpenAPIPetstoreRequest UpdateUser MimeJSON NoContent MimeNoContent -updateUser user (Username username) = + -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent +updateUser _ user (Username username) = _mkRequest "PUT" ["/user/",toPath username] `setBodyParam` user @@ -236,8 +231,5 @@ data UpdateUser -- | /Body Param/ "User" - Updated user object instance HasBodyParam UpdateUser User --- | @application/json@ -instance Consumes UpdateUser MimeJSON - instance Produces UpdateUser MimeNoContent diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs index d9203a5bd4f2..31cd12f7adaf 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs index 019f2ce6131c..6fbc9899d343 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs index 3241dbd85a5d..8e3d4ac772bc 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs index 33b2868d0fa6..0da4b6310f07 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 60bcf3a4b692..602a1b79a46b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -168,6 +168,9 @@ newtype PatternWithoutDelimiter = PatternWithoutDelimiter { unPatternWithoutDeli -- ** PetId newtype PetId = PetId { unPetId :: Integer } deriving (P.Eq, P.Show) +-- ** Query +newtype Query = Query { unQuery :: Text } deriving (P.Eq, P.Show) + -- ** RequestBody newtype RequestBody = RequestBody { unRequestBody :: (Map.Map String Text) } deriving (P.Eq, P.Show, A.ToJSON) diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index cef3d3da526b..149d051ad4d2 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal index 456867d65121..a4c4bbb6e9f0 100644 --- a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal +++ b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal @@ -10,7 +10,7 @@ description: . . OpenAPI Petstore API version: 1.0.0 . - OpenAPI version: 3.0.0 + OpenAPI version: 3.0.1 . category: Web homepage: https://openapi-generator.tech diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index b3a6fbc50e50..670b9e7adecc 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1,161 +1,199 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \' license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io:80/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + put: operationId: updatePet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string + default: available enum: - available - pending - sold - default: available + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -163,135 +201,158 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId + - description: ID of pet to update in: path - description: Pet id to delete + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: - 400: - description: Invalid pet value + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - /pet/{petId}/uploadImage: - post: + summary: uploads an image tags: - pet - summary: uploads an image - operationId: uploadFile + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -299,30 +360,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store /store/order/{order_id}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: order_id + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: order_id required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -330,146 +410,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: order_id - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation - /user/createWithArray: - post: + summary: Create user tags: - user - summary: Creates list of users with given input array + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - /user/createWithList: - post: + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - /user/login: - get: + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: - description: date in UTC when toekn expires - style: simple - explode: false + description: date in UTC when token expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied - /user/logout: - get: + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + /user/logout: + get: operationId: logoutUser responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -477,179 +568,188 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - put: + summary: Get user by user name tags: - user - summary: Updated user + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found /fake_classname_test: patch: - tags: - - fake_classname_tags 123#$%^ - summary: To test class name in snake case description: To test class name in snake case operationId: testClassname requestBody: - $ref: '#/components/requestBodies/Client' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' + description: successful operation security: - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ /fake: get: - tags: - - fake - summary: To test enum parameters description: To test enum parameters operationId: testEnumParameters parameters: - - name: enum_header_string_array + - description: Header parameter enum test (string array) + explode: false in: header - description: Header parameter enum test (string array) - required: false - style: simple - explode: true + name: enum_header_string_array schema: - type: array items: - type: string + default: $ enum: - '>' - $ - default: $ - - name: enum_header_string - in: header - description: Header parameter enum test (string) - required: false + type: string + type: array style: simple - explode: false + - description: Header parameter enum test (string) + in: header + name: enum_header_string schema: - type: string + default: -efg enum: - _abc - -efg - (xyz) - default: -efg - - name: enum_query_string_array + type: string + - description: Query parameter enum test (string array) + explode: false in: query - description: Query parameter enum test (string array) - required: false - style: form - explode: true + name: enum_query_string_array schema: - type: array items: - type: string + default: $ enum: - '>' - $ - default: $ - - name: enum_query_string - in: query - description: Query parameter enum test (string) - required: false + type: string + type: array style: form - explode: true + - description: Query parameter enum test (string) + in: query + name: enum_query_string schema: - type: string + default: -efg enum: - _abc - -efg - (xyz) - default: -efg - - name: enum_query_integer + type: string + - description: Query parameter enum test (double) in: query - description: Query parameter enum test (double) - required: false - style: form - explode: true + name: enum_query_integer schema: - type: integer - format: int32 enum: - 1 - -2 - - name: enum_query_double + format: int32 + type: integer + - description: Query parameter enum test (double) in: query - description: Query parameter enum test (double) - required: false - style: form - explode: true + name: enum_query_double schema: - type: number - format: double enum: - 1.1 - -1.2 + format: double + type: number requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_2' + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string responses: 400: + content: {} description: Invalid request 404: + content: {} description: Not found - post: + summary: To test enum parameters tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + post: description: | Fake endpoint for testing various parameters 假端點 @@ -660,208 +760,288 @@ paths: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_3' + properties: + integer: + description: None + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true responses: 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found security: - http_basic_test: [] - patch: + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake - summary: To test "client" model - description: To test "client" model - operationId: testClientModel - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - description: successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/Client' /fake/outer/number: post: - tags: - - fake description: Test serialization of outer number types operationId: fakeOuterNumberSerialize requestBody: - description: Input number as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false responses: 200: - description: Output number content: '*/*': schema: $ref: '#/components/schemas/OuterNumber' - /fake/outer/string: - post: + description: Output number tags: - fake + /fake/outer/string: + post: description: Test serialization of outer string types operationId: fakeOuterStringSerialize requestBody: - description: Input string as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false responses: 200: - description: Output string content: '*/*': schema: $ref: '#/components/schemas/OuterString' - /fake/outer/boolean: - post: + description: Output string tags: - fake + /fake/outer/boolean: + post: description: Test serialization of outer boolean types operationId: fakeOuterBooleanSerialize requestBody: - description: Input boolean as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false responses: 200: - description: Output boolean content: '*/*': schema: $ref: '#/components/schemas/OuterBoolean' - /fake/outer/composite: - post: + description: Output boolean tags: - fake + /fake/outer/composite: + post: description: Test serialization of object with outer number type operationId: fakeOuterCompositeSerialize requestBody: - description: Input composite as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false responses: 200: - description: Output composite content: '*/*': schema: $ref: '#/components/schemas/OuterComposite' - /fake/jsonFormData: - get: + description: Output composite tags: - fake - summary: test json serialization of form data + /fake/jsonFormData: + get: operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_4' + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true responses: 200: + content: {} description: successful operation - /fake/inline-additionalProperties: - post: + summary: test json serialization of form data tags: - fake - summary: test inline additionalProperties + /fake/inline-additionalProperties: + post: operationId: testInlineAdditionalProperties requestBody: - description: request body content: application/json: schema: - type: object additionalProperties: type: string + type: object + description: request body required: true responses: 200: + content: {} description: successful operation + summary: test inline additionalProperties + tags: + - fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + 200: + content: {} + description: Success + tags: + - fake /another-fake/dummy: patch: - tags: - - $another-fake? - summary: To test special tags description: To test special tags operationId: test_special_tags requestBody: - $ref: '#/components/requestBodies/Client' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? components: schemas: - Order: - type: object - properties: - id: - type: integer - format: int64 - petId: - type: integer - format: int64 - quantity: - type: integer - format: int32 - shipDate: - type: string - format: date-time - status: - type: string - description: Order Status - enum: - - placed - - approved - - delivered - complete: - type: boolean - default: false - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - xml: - name: Order Category: - type: object + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - example: - name: name - id: 6 + type: object xml: name: Category User: - type: object + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer x-is-unique: true username: type: string @@ -876,420 +1056,267 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + type: object xml: name: User - Tag: - type: object + OuterNumber: + type: number + ArrayOfNumberOnly: properties: - id: - type: integer - format: int64 - name: - type: string - example: - name: name - id: 1 - xml: - name: Tag - Pet: - required: - - name - - photoUrls + ArrayNumber: + items: + type: number + type: array type: object + Capitalization: properties: - id: - type: integer - format: int64 - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: + smallCamel: type: string - example: doggie - photoUrls: - type: array - xml: - name: photoUrl - wrapped: true - items: - type: string - tags: - type: array - xml: - name: tag - wrapped: true - items: - $ref: '#/components/schemas/Tag' - status: + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet type: string - description: pet status in the store - enum: - - available - - pending - - sold - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - xml: - name: Pet - ApiResponse: type: object + MixedPropertiesAndAdditionalPropertiesClass: properties: - code: - type: integer - format: int32 - type: + uuid: + format: uuid type: string - message: + dateTime: + format: date-time type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + ApiResponse: example: code: 0 type: type message: message - Return: properties: - return: - type: integer + code: format: int32 - description: Model for testing reserved words - xml: - name: Return + type: integer + type: + type: string + message: + type: string + type: object Name: - required: - - name + description: Model for testing model name same as property name properties: name: - type: integer format: int32 - snake_case: type: integer + snake_case: format: int32 readOnly: true + type: integer property: type: string 123Number: - type: integer - format: int32 readOnly: true - description: Model for testing model name same as property name + type: integer + required: + - name + type: object xml: name: Name + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + List: + properties: + 123-list: + type: string + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object 200_response: + description: Model for testing model name starting with number properties: name: - type: integer format: int32 + type: integer class: type: string - description: Model for testing model name starting with number + type: object xml: name: Name - ClassModel: + Client: + example: + client: client properties: - _class: + client: type: string - description: Model for testing model with "_class" property + type: object Dog: allOf: - $ref: '#/components/schemas/Animal' - - type: object - properties: + - properties: breed: type: string - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - type: object - properties: - declawed: - type: boolean - Animal: - required: - - className - type: object + type: object + Enum_Test: properties: - className: + enum_string: + enum: + - UPPER + - lower + - "" type: string - color: + enum_string_required: + enum: + - UPPER + - lower + - "" type: string - default: red - discriminator: - propertyName: className - AnimalFarm: - type: array - items: - $ref: '#/components/schemas/Animal' - format_test: + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' required: - - byte - - date - - number - - password + - enum_string_required type: object + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: - integer: - maximum: 100 - minimum: 10 + id: + format: int64 type: integer - format: int32 - int32: - maximum: 200 - minimum: 20 + petId: + format: int64 type: integer + quantity: format: int32 - int64: type: integer - format: int64 - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - maximum: 987.6 - minimum: 54.3 - type: number - format: float - double: - maximum: 123.4 - minimum: 67.8 - type: number - format: double - string: - type: string - byte: - type: string - format: byte - binary: - type: string - format: binary - date: - type: string - format: date - dateTime: - type: string + shipDate: format: date-time - uuid: - type: string - format: uuid - password: - maxLength: 64 - minLength: 10 - type: string - format: password - EnumClass: - type: string - enum: - - _abc - - -efg - - (xyz) - default: -efg - Enum_Test: - required: - - enum_string_required - type: object - properties: - enum_string: type: string + status: + description: Order Status enum: - - UPPER - - lower - - "" - enum_string_required: + - placed + - approved + - delivered type: string - enum: - - UPPER - - lower - - "" - enum_integer: - type: integer - format: int32 - enum: - - 1 - - -1 - enum_number: - type: number - format: double - enum: - - 1.1 - - -1.2 - outerEnum: - $ref: '#/components/schemas/OuterEnum' - AdditionalPropertiesClass: + complete: + default: false + type: boolean type: object + xml: + name: Order + AdditionalPropertiesClass: properties: map_property: - type: object additionalProperties: type: string - map_of_map_property: type: object + map_of_map_property: additionalProperties: - type: object additionalProperties: type: string - MixedPropertiesAndAdditionalPropertiesClass: - type: object - properties: - uuid: - type: string - format: uuid - dateTime: - type: string - format: date-time - map: + type: object type: object - additionalProperties: - $ref: '#/components/schemas/Animal' - List: type: object + $special[model.name]: properties: - 123-list: - type: string - Client: + $special[property.name]: + format: int64 + type: integer type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words properties: - client: - type: string - example: - client: client - ReadOnlyFirst: + return: + format: int32 + type: integer type: object + xml: + name: Return + ReadOnlyFirst: properties: bar: - type: string readOnly: true - baz: - type: string - hasOnlyReadOnly: - type: object - properties: - bar: type: string - readOnly: true - foo: + baz: type: string - readOnly: true - Capitalization: type: object + ArrayOfArrayOfNumberOnly: properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - type: string - description: | - Name of the pet - MapTest: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array type: object - properties: - map_map_of_string: - type: object - additionalProperties: - type: object - additionalProperties: - type: string - map_of_enum_string: - type: object - additionalProperties: - type: string - enum: - - UPPER - - lower + OuterEnum: + enum: + - placed + - approved + - delivered + type: string ArrayTest: - type: object properties: array_of_string: - type: array items: type: string - array_array_of_integer: type: array + array_array_of_integer: items: - type: array items: - type: integer format: int64 - array_array_of_model: + type: integer + type: array type: array + array_array_of_model: items: - type: array items: $ref: '#/components/schemas/ReadOnlyFirst' - NumberOnly: - type: object - properties: - JustNumber: - type: number - ArrayOfNumberOnly: - type: object - properties: - ArrayNumber: - type: array - items: - type: number - ArrayOfArrayOfNumberOnly: - type: object - properties: - ArrayArrayNumber: - type: array - items: type: array - items: - type: number - EnumArrays: - type: object - properties: - just_symbol: - type: string - enum: - - '>=' - - $ - array_enum: type: array - items: - type: string - enum: - - fish - - crab - OuterEnum: - type: string - enum: - - placed - - approved - - delivered - OuterComposite: type: object + OuterComposite: + example: {} properties: my_number: $ref: '#/components/schemas/OuterNumber' @@ -1297,186 +1324,222 @@ components: $ref: '#/components/schemas/OuterString' my_boolean: $ref: '#/components/schemas/OuterBoolean' - example: {} - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - _special_model.name_: - properties: - $special[property.name]: - type: integer - format: int64 - xml: - name: $special[model.name] - body: - type: object - properties: - name: - type: string - description: Updated name of the pet - status: - type: string - description: Updated status of the pet - body_1: - type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - body_2: - type: object - properties: - enum_form_string_array: - type: array - description: Form parameter enum test (string array) - items: - type: string - enum: - - '>' - - $ - default: $ - enum_form_string: - type: string - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - default: -efg - body_3: - required: - - byte - - double - - number - - pattern_without_delimiter type: object + format_test: properties: integer: - maximum: 100 - minimum: 10 + maximum: 1E+2 + minimum: 1E+1 type: integer - description: None - format: int32 int32: - maximum: 200 - minimum: 20 - type: integer - description: None format: int32 - int64: + maximum: 2E+2 + minimum: 2E+1 type: integer - description: None + int64: format: int64 + type: integer number: maximum: 543.2 minimum: 32.1 type: number - description: None float: + format: float maximum: 987.6 + minimum: 54.3 type: number - description: None - format: float double: + format: double maximum: 123.4 minimum: 67.8 type: number - description: None - format: double string: + pattern: /[a-z]/i type: string - description: None - pattern_without_delimiter: - type: string - description: None byte: - type: string - description: None format: byte - binary: + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ type: string - description: None + binary: format: binary - date: type: string - description: None + date: format: date - dateTime: type: string - description: None + dateTime: format: date-time + type: string + uuid: + format: uuid + type: string password: + format: password maxLength: 64 minLength: 10 type: string - description: None - format: password - callback: - type: string - description: None - body_4: required: - - param - - param2 + - byte + - date + - number + - password type: object + EnumArrays: properties: - param: + just_symbol: + enum: + - '>=' + - $ type: string - description: field1 - param2: + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterString: + type: string + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: type: string - description: field2 - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Client: - description: client model - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - required: true + type: object + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - properties: + declawed: + type: boolean + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + type: object + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 + http_basic_test: + scheme: basic + type: http api_key: - type: apiKey - name: api_key in: header - api_key_query: + name: api_key type: apiKey - name: api_key_query + api_key_query: in: query - http_basic_test: - type: http - scheme: basic + name: api_key_query + type: apiKey diff --git a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index 9503c4fd15ae..268532598b00 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -110,6 +110,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-es6/docs/PetApi.md b/samples/client/petstore/javascript-es6/docs/PetApi.md index 324ecfbe867a..6cd6020a0a66 100644 --- a/samples/client/petstore/javascript-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-es6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -398,3 +399,54 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; + +// Configure OAuth2 access token for authorization: petstore_auth +let petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new OpenApiPetstore.PetApi(); +let petId = 789; // Number | ID of pet to update +let file = "/path/to/file"; // File | file to upload +let opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-es6/src/api/PetApi.js b/samples/client/petstore/javascript-es6/src/api/PetApi.js index d6b39c8671b8..f9cf80ec5284 100644 --- a/samples/client/petstore/javascript-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-es6/src/api/PetApi.js @@ -408,5 +408,61 @@ export default class PetApi { ); } + /** + * Callback function to receive the result of the uploadFileWithRequiredFile operation. + * @callback module:api/PetApi~uploadFileWithRequiredFileCallback + * @param {String} error Error message, if any. + * @param {module:model/ApiResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:model/ApiResponse} + */ + uploadFileWithRequiredFile(petId, file, opts, callback) { + opts = opts || {}; + let postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + let pathParams = { + 'petId': petId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + let authNames = ['petstore_auth']; + let contentTypes = ['multipart/form-data']; + let accepts = ['application/json']; + let returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + } diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index fa41841dab26..bfdbe52f3749 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -108,6 +108,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md index 3a402233a9ec..eadf2039c51b 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -390,3 +391,53 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; + +// Configure OAuth2 access token for authorization: petstore_auth +let petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new OpenApiPetstore.PetApi(); +let petId = 789; // Number | ID of pet to update +let file = "/path/to/file"; // File | file to upload +let opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js index a8a8d91c9502..9da0f136bebe 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js @@ -456,4 +456,67 @@ export default class PetApi { } + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response + */ + uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) { + opts = opts || {}; + let postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + let pathParams = { + 'petId': petId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + let authNames = ['petstore_auth']; + let contentTypes = ['multipart/form-data']; + let accepts = ['application/json']; + let returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} + */ + uploadFileWithRequiredFile(petId, file, opts) { + return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + } diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index a78275aee673..8cb5a9b477f5 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md index 28469bc95a1c..7d9cfc0134f1 100644 --- a/samples/client/petstore/javascript-promise/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -382,3 +383,52 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +var OpenApiPetstore = require('open_api_petstore'); +var defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure OAuth2 access token for authorization: petstore_auth +var petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OpenApiPetstore.PetApi(); +var petId = 789; // Number | ID of pet to update +var file = "/path/to/file"; // File | file to upload +var opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 435175dc8d6b..68a41803ca88 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 7821ec7a222e..2ddf6a4c78a7 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 8b07f17c78f9..31a2cc5697ab 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index 7293a03fe8eb..a94f1da8c72d 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index 68d7bd7e1022..aa3fb392389c 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * @@ -488,6 +488,71 @@ return response_and_data.data; }); } + + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response + */ + this.uploadFileWithRequiredFileWithHttpInfo = function(petId, file, opts) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + var pathParams = { + 'petId': petId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + var authNames = ['petstore_auth']; + var contentTypes = ['multipart/form-data']; + var accepts = ['application/json']; + var returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} + */ + this.uploadFileWithRequiredFile = function(petId, file, opts) { + return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } }; return exports; diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index c4b2f93bbc0d..7da89a389c8a 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index 4942cbc464b3..5d998ec12f1a 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index 25685095fb2f..501429c714a7 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 08572d900840..2d54186ad863 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 29376d771bfc..716623465cc5 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js index e1a4797eec19..55f624ee6765 100644 --- a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index 5c112418181d..c215c0e5a7a4 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index 024c26469df3..256e93e7e35b 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index ca79a7c2a6d0..03b6ca2ed5ac 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index 01b97a1b5809..b23ae3922b25 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index 05934fb253ce..07d953ad09f8 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index 10b787fed4eb..bd1c37fddf04 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index c289c6b8e5bd..6e3eb81b825b 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 6edd8fbadd04..6356546b5718 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index e563bcf7ea59..45aef43867e0 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index c308f3dc9f11..151eab76c00d 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index 07d52b119db0..7eac55a5a61a 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index d4a9f39f5661..89fce871cd52 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index 4dfc6753323a..caecbeb1fec0 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index 6c5986d48985..b9461c3de345 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 484fd0c99910..4995eb62ae73 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index ab3c2e34e343..7a67414e7d3a 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index adf82a358c28..c677dd92d383 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 62c7a2f59e32..8da729262d6a 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index 84131169fb13..0b974172bdb7 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index 87484d2ee234..15f47bf8cfc4 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index 8c851c4cec54..74e73f93bbc4 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index 389ad08e8c5c..db55400362f2 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index bfd5f3714bef..49d91d874db3 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index b4fc48476dee..769e2752c2d8 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index 9e1f532b44d0..62fd6c0cf1a5 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index 55997490b789..08b9d2269e67 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index 1b0ae1104cc6..e9b320969575 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index 22464bbe7a25..b6df224a024c 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index 9e4f88b0872e..898ac6ba5e0a 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index 06d4e6e7ad0a..6ea6b2b8017b 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index 9d9637737d0c..d21f8d30584e 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -135,6 +135,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md index fbcca8372ccc..3273a109e81a 100644 --- a/samples/client/petstore/javascript/docs/PetApi.md +++ b/samples/client/petstore/javascript/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -398,3 +399,54 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +var OpenApiPetstore = require('open_api_petstore'); +var defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure OAuth2 access token for authorization: petstore_auth +var petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OpenApiPetstore.PetApi(); +var petId = 789; // Number | ID of pet to update +var file = "/path/to/file"; // File | file to upload +var opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index f43711962b0a..f0238f93f166 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index 73b690b0d56d..c4bc23dc811a 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 71cb70f8be7c..9da453623b29 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index 469890d60bbb..12e2115255d4 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index 840cb2fa67e9..74837e68cb04 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * @@ -441,6 +441,64 @@ authNames, contentTypes, accepts, returnType, callback ); } + + /** + * Callback function to receive the result of the uploadFileWithRequiredFile operation. + * @callback module:api/PetApi~uploadFileWithRequiredFileCallback + * @param {String} error Error message, if any. + * @param {module:model/ApiResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:model/ApiResponse} + */ + this.uploadFileWithRequiredFile = function(petId, file, opts, callback) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + var pathParams = { + 'petId': petId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + var authNames = ['petstore_auth']; + var contentTypes = ['multipart/form-data']; + var accepts = ['application/json']; + var returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } }; return exports; diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index ba2c675ec771..2037d0ab0fab 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index d3e3b8513c55..4b19a6dfb7f1 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index 25685095fb2f..501429c714a7 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 08572d900840..2d54186ad863 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 29376d771bfc..716623465cc5 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js index e1a4797eec19..55f624ee6765 100644 --- a/samples/client/petstore/javascript/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index 5c112418181d..c215c0e5a7a4 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index 024c26469df3..256e93e7e35b 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index ca79a7c2a6d0..03b6ca2ed5ac 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index 01b97a1b5809..b23ae3922b25 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index 05934fb253ce..07d953ad09f8 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index 10b787fed4eb..bd1c37fddf04 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index c289c6b8e5bd..6e3eb81b825b 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 6edd8fbadd04..6356546b5718 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index e563bcf7ea59..45aef43867e0 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index c308f3dc9f11..151eab76c00d 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index 07d52b119db0..7eac55a5a61a 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index d4a9f39f5661..89fce871cd52 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index 4dfc6753323a..caecbeb1fec0 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index 6c5986d48985..b9461c3de345 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 484fd0c99910..4995eb62ae73 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index ab3c2e34e343..7a67414e7d3a 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index adf82a358c28..c677dd92d383 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 62c7a2f59e32..8da729262d6a 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index 84131169fb13..0b974172bdb7 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index 87484d2ee234..15f47bf8cfc4 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index 8c851c4cec54..74e73f93bbc4 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index 389ad08e8c5c..db55400362f2 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index bfd5f3714bef..49d91d874db3 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index b4fc48476dee..769e2752c2d8 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index 9e1f532b44d0..62fd6c0cf1a5 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index 55997490b789..08b9d2269e67 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index 1b0ae1104cc6..e9b320969575 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index 22464bbe7a25..b6df224a024c 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index 9e4f88b0872e..898ac6ba5e0a 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index 06d4e6e7ad0a..6ea6b2b8017b 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index e57006827b99..36fecb1dd44c 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h index 24d89beeb61e..48a9763a971e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove a apiKey for an identifier, just set the apiKey to nil. + * To remove an apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h index e51705deb256..aeac8955cc1e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index e57006827b99..36fecb1dd44c 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h index 24d89beeb61e..48a9763a971e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove a apiKey for an identifier, just set the apiKey to nil. + * To remove an apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h index e51705deb256..aeac8955cc1e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 7b381e92c825..8180f2514f7d 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -363,6 +363,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 57f579884246..9956e4adabbd 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -412,7 +412,7 @@ Name | Type | Description | Notes **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **double**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | **ARRAY[string]**| Form parameter enum test (string array) | [optional] [default to '$'] + **enum_form_string_array** | [**ARRAY[string]**](string.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] ### Return type diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 5ad3f6f41fa1..f0edd9e6fad1 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -409,3 +410,54 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata) + +uploads an image + +### Example +```perl +use Data::Dumper; +use WWW::OpenAPIClient::PetApi; +my $api_instance = WWW::OpenAPIClient::PetApi->new( + + # Configure OAuth2 access token for authorization: petstore_auth + access_token => 'YOUR_ACCESS_TOKEN', +); + +my $pet_id = 789; # int | ID of pet to update +my $file = "/path/to/file"; # string | file to upload +my $additional_metadata = "additional_metadata_example"; # string | Additional data to pass to server + +eval { + my $result = $api_instance->upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling PetApi->upload_file_with_required_file: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **string****string**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 4bbf6bc58cec..645181bfda67 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -616,4 +616,99 @@ sub upload_file { return $_response_object; } +# +# upload_file_with_required_file +# +# uploads an image +# +# @param int $pet_id ID of pet to update (required) +# @param string $file file to upload (required) +# @param string $additional_metadata Additional data to pass to server (optional) +{ + my $params = { + 'pet_id' => { + data_type => 'int', + description => 'ID of pet to update', + required => '1', + }, + 'file' => { + data_type => 'string', + description => 'file to upload', + required => '1', + }, + 'additional_metadata' => { + data_type => 'string', + description => 'Additional data to pass to server', + required => '0', + }, + }; + __PACKAGE__->method_documentation->{ 'upload_file_with_required_file' } = { + summary => 'uploads an image', + params => $params, + returns => 'ApiResponse', + }; +} +# @return ApiResponse +# +sub upload_file_with_required_file { + my ($self, %args) = @_; + + # verify the required parameter 'pet_id' is set + unless (exists $args{'pet_id'}) { + croak("Missing the required parameter 'pet_id' when calling upload_file_with_required_file"); + } + + # verify the required parameter 'file' is set + unless (exists $args{'file'}) { + croak("Missing the required parameter 'file' when calling upload_file_with_required_file"); + } + + # parse inputs + my $_resource_path = '/pet/{petId}/uploadImageWithRequiredFile'; + + my $_method = 'POST'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); + + # path params + if ( exists $args{'pet_id'}) { + my $_base_variable = "{" . "petId" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # form params + if ( exists $args{'additional_metadata'} ) { + $form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'}); + } + + # form params + if ( exists $args{'file'} ) { + $form_params->{'file'} = [] unless defined $form_params->{'file'}; + push @{$form_params->{'file'}}, $args{'file'}; + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(petstore_auth )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('ApiResponse', $response); + return $_response_object; +} + 1; diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index cff6604b98b2..c548ce4e2898 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index a98c0247a0ce..65e37617061a 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -547,7 +547,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 432ab964f37a..b5396239330c 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/rust/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scalaz/.openapi-generator/VERSION b/samples/client/petstore/scalaz/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scalaz/.openapi-generator/VERSION +++ b/samples/client/petstore/scalaz/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/default/.openapi-generator/VERSION b/samples/client/petstore/swift/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/default/.openapi-generator/VERSION b/samples/client/petstore/swift3/default/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 6cab307e02b1..835e55920c37 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -497,4 +497,70 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: Promise + */ + open class func uploadFileWithRequiredFile( petId: Int64, file: URL, additionalMetadata: String? = nil) -> Promise { + let deferred = Promise.pending() + uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in + if let error = error { + deferred.reject(error) + } else { + deferred.fulfill(data!) + } + } + return deferred.promise + } + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d7cd99d687a2..ad53a5e668f4 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -513,4 +513,72 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: Observable + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil) -> Observable { + return Observable.create { observer -> Disposable in + uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in + if let error = error { + observer.on(.error(error)) + } else { + observer.on(.next(data!)) + } + observer.on(.completed) + } + return Disposables.create() + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md index 8c00e0668339..596c10f39374 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1 +## @ ### Building @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1 --save +npm install @ --save ``` _without publishing (not recommended):_ @@ -37,7 +37,7 @@ npm link In your project: ``` -npm link @swagger/angular2-typescript-petstore +npm link ``` __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. @@ -52,7 +52,7 @@ In your Angular project: ``` // without configuring providers -import { ApiModule } from '@swagger/angular2-typescript-petstore'; +import { ApiModule } from ''; import { HttpModule } from '@angular/http'; @@ -70,7 +70,7 @@ export class AppModule {} ``` // configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@swagger/angular2-typescript-petstore'; +import { ApiModule, Configuration, ConfigurationParameters } from ''; export function apiConfigFactory (): Configuration => { const params: ConfigurationParameters = { @@ -89,7 +89,7 @@ export class AppModule {} ``` ``` -import { DefaultApi } from '@swagger/angular2-typescript-petstore'; +import { DefaultApi } from ''; export class AppComponent { constructor(private apiGateway: DefaultApi) { } @@ -126,7 +126,7 @@ export class AppModule { If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, @@ -135,7 +135,7 @@ bootstrap(AppComponent, [ or ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; @NgModule({ imports: [], @@ -159,7 +159,7 @@ export const environment = { In the src/app/app.module.ts: ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; import { environment } from '../environments/environment'; @NgModule({ diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md index 5e33f07adc5b..5467261eaafe 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md index 5e33f07adc5b..5467261eaafe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 855ff9501eb8..82602aa4190d 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts index 68203071fd8c..8e16438c5e2d 100644 --- a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class PetApi { /** * * @summary Add a new pet to the store - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - public addPet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public addPet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling addPet.'); } @@ -71,8 +71,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -94,7 +92,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(pet); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -143,8 +141,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -389,16 +385,16 @@ export class PetApi { /** * * @summary Update an existing pet - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - public updatePet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updatePet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling updatePet.'); } @@ -411,8 +407,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -434,7 +428,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(pet); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -492,8 +486,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required diff --git a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts index 1a7b91c282ec..ed50edd97ab4 100644 --- a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -69,8 +69,6 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -218,16 +216,16 @@ export class StoreApi { /** * * @summary Place an order for a pet - * @param body order placed for purchasing the pet + * @param order order placed for purchasing the pet */ - public placeOrder(body: models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { + public placeOrder(order: models.models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { let localVarPath = this.basePath + '/store/order'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); + // verify required parameter 'order' is not null or undefined + if (order === null || order === undefined) { + throw new Error('Required parameter order was null or undefined when calling placeOrder.'); } @@ -252,7 +250,7 @@ export class StoreApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(order); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts index 3e8308dac354..044bd54c9c71 100644 --- a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class UserApi { /** * This can only be done by the logged in user. * @summary Create user - * @param body Created user object + * @param user Created user object */ - public createUser(body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUser(user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createUser.'); } @@ -69,8 +69,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -83,7 +81,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(user); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -109,16 +107,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param body List of user object + * @param modelsUser List of user object */ - public createUsersWithArrayInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithArrayInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithArray'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); + // verify required parameter 'modelsUser' is not null or undefined + if (modelsUser === null || modelsUser === undefined) { + throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithArrayInput.'); } @@ -129,8 +127,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -143,7 +139,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(modelsUser); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -169,16 +165,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param body List of user object + * @param modelsUser List of user object */ - public createUsersWithListInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithListInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithList'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); + // verify required parameter 'modelsUser' is not null or undefined + if (modelsUser === null || modelsUser === undefined) { + throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithListInput.'); } @@ -189,8 +185,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -203,7 +197,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(modelsUser); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -249,8 +243,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -286,7 +278,7 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.User; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); @@ -426,8 +418,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -464,9 +454,9 @@ export class UserApi { * This can only be done by the logged in user. * @summary Updated user * @param username name that need to be deleted - * @param body Updated user object + * @param user Updated user object */ - public updateUser(username: string, body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updateUser(username: string, user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -476,9 +466,9 @@ export class UserApi { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling updateUser.'); } @@ -489,8 +479,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -503,7 +491,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(user); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/git_push.sh b/samples/client/petstore/typescript-jquery/default/git_push.sh index ae01b182ae9e..8442b80bb445 100644 --- a/samples/client/petstore/typescript-jquery/default/git_push.sh +++ b/samples/client/petstore/typescript-jquery/default/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts index f86e84f93a3a..f55509ae2ba7 100644 --- a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts +++ b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Category.ts b/samples/client/petstore/typescript-jquery/default/model/Category.ts index 254c3003c89a..7def6ebb648f 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Category.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Category.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Order.ts b/samples/client/petstore/typescript-jquery/default/model/Order.ts index 2b6c7aeebd66..122efb30a437 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Order.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Pet.ts b/samples/client/petstore/typescript-jquery/default/model/Pet.ts index b878cadb9058..92925560af98 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Pet.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Pet.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Tag.ts b/samples/client/petstore/typescript-jquery/default/model/Tag.ts index 8cbdc4fa145e..9ab112007cea 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Tag.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Tag.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/User.ts b/samples/client/petstore/typescript-jquery/default/model/User.ts index fbf75dfe28e3..8e1f9d817b32 100644 --- a/samples/client/petstore/typescript-jquery/default/model/User.ts +++ b/samples/client/petstore/typescript-jquery/default/model/User.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/README.md b/samples/client/petstore/typescript-jquery/npm/README.md index 6b1105e1d49c..7a4d336b17cd 100644 --- a/samples/client/petstore/typescript-jquery/npm/README.md +++ b/samples/client/petstore/typescript-jquery/npm/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 13b8db92be6f..a6e6c97eb340 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -56,7 +56,12 @@ class ObjectSerializer { return expectedType; // the type does not have a discriminator. use it. } else { if (data[discriminatorProperty]) { - return data[discriminatorProperty]; // use the type given in the discriminator + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } } else { return expectedType; // discriminator was not present (or an empty string) } @@ -87,6 +92,9 @@ class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } + + // Get the actual type of this object + type = this.findCorrectType(data, type); // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); @@ -144,7 +152,7 @@ export class ApiResponse { 'type'?: string; 'message'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -175,7 +183,7 @@ export class Category { 'id'?: number; 'name'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -208,7 +216,7 @@ export class Order { 'status'?: Order.StatusEnum; 'complete'?: boolean; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -268,7 +276,7 @@ export class Pet { */ 'status'?: Pet.StatusEnum; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -321,7 +329,7 @@ export class Tag { 'id'?: number; 'name'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -356,7 +364,7 @@ export class User { */ 'userStatus'?: number; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index 2005298bd9bb..48691faac6da 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -16,13 +16,12 @@ "bluebird": "^3.5.0", "request": "^2.81.0", "@types/bluebird": "*", - "@types/request": "*", - "rewire": "^3.0.2" + "@types/request": "*" }, "devDependencies": { "typescript": "^2.4.2" }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" + "publishConfig":{ + "registry":"https://skimdb.npmjs.com/registry" } } diff --git a/samples/client/test/swift4/default/.openapi-generator/VERSION b/samples/client/test/swift4/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/test/swift4/default/.openapi-generator/VERSION +++ b/samples/client/test/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient.podspec b/samples/client/test/swift4/default/TestClient.podspec index 1c434b30306c..83aee4c5d052 100644 --- a/samples/client/test/swift4/default/TestClient.podspec +++ b/samples/client/test/swift4/default/TestClient.podspec @@ -4,10 +4,10 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' s.version = '0.0.1' - s.source = { :git => 'git@github.com:swagger-api/swagger-mustache.git', :tag => 'v1.0.0' } + s.source = { :git => 'git@github.com:openapitools/openapi-generator.git', :tag => 'v1.0.0' } s.authors = '' s.license = 'Proprietary' - s.homepage = 'https://github.com/swagger-api/swagger-codegen' + s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'TestClient' s.source_files = 'TestClient/Classes/**/*.swift' s.dependency 'Alamofire', '~> 4.5.0' diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 000000000000..3c7b53f81496 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,65 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? Array { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 000000000000..6835520c9904 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,61 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class TestClientAPI { + open static var basePath = "http://api.example.com/basePath" + open static var credential: URLCredential? + open static var customHeaders: [String:String] = [:] + open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String:String] + public let parameters: [String:Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((Progress) -> ())? + + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(TestClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders:[String:String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = TestClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift new file mode 100644 index 000000000000..537b874f2621 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift @@ -0,0 +1,49 @@ +// +// Swift4TestAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + + + +open class Swift4TestAPI { + /** + Get all of the models + + - parameter clientId: (query) id that represent the Api client + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getAllModels(clientId: String, completion: @escaping ((_ data: GetAllModelsResult?,_ error: Error?) -> Void)) { + getAllModelsWithRequestBuilder(clientId: clientId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + Get all of the models + - GET /allModels + - This endpoint tests get a dictionary which contains examples of all of the models. + - parameter clientId: (query) id that represent the Api client + - returns: RequestBuilder + */ + open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { + let path = "/allModels" + let URLString = TestClientAPI.basePath + path + let parameters: [String:Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "client_id": clientId + ]) + + let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift new file mode 100644 index 000000000000..280b4e53389d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -0,0 +1,413 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +// Store manager to retain its reference +private var managerStore: [String: Alamofire.SessionManager] = [:] + +open class AlamofireRequestBuilder: RequestBuilder { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + open func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + let managerId:String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } + else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, completion) + case .failure(let encodingError): + completion(nil, ErrorResponse.error(415, nil, encodingError)) + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + _ = managerStore.removeValue(forKey: managerId) + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is URL.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion( + Response( + response: dataResponse.response!, + body: (filePath as! T) + ), + nil + ) + + } catch let requestParserError as DownloadException { + completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) + } catch let error { + completion(nil, ErrorResponse.error(400, dataResponse.data, error)) + } + return + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + } + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename : String? = nil + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with:"") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url : URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +fileprivate enum DownloadException : Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum AlamofireDecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + _ = managerStore.removeValue(forKey: managerId) + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + case is Data.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) + return + } + + guard let httpResponse = dataResponse.response else { + completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) + return + } + + var responseObj: Response? = nil + + let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) + if decodeResult.error == nil { + responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) + } + + completion(responseObj, decodeResult.error) + }) + } + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 000000000000..2d50e463ae11 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,67 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias EncodeResult = (data: Data?, error: Error?) + +open class CodableHelper { + + open static var dateformatter: DateFormatter? + + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { + var returnedDecodable: T? = nil + var returnedError: Error? = nil + + let decoder = JSONDecoder() + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" + decoder.dateDecodingStrategy = .formatted(formatter) + } + + do { + returnedDecodable = try decoder.decode(type, from: data) + } catch { + returnedError = error + } + + return (returnedDecodable, returnedError) + } + + open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable { + var returnedData: Data? + var returnedError: Error? = nil + + let encoder = JSONEncoder() + if prettyPrint { + encoder.outputFormatting = .prettyPrinted + } + encoder.dataEncodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" + encoder.dateEncodingStrategy = .formatted(formatter) + + do { + returnedData = try encoder.encode(value) + } catch { + returnedError = error + } + + return (returnedData, returnedError) + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 000000000000..f8180752b67b --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,15 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 000000000000..abe218b4e7ac --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +private let dateFormatter: DateFormatter = { + let fmt = DateFormatter() + fmt.dateFormat = Configuration.dateFormat + fmt.locale = Locale(identifier: "en_US_POSIX") + return fmt +}() + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return dateFormatter.string(from: self) as Any + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift new file mode 100644 index 000000000000..ca05906d4206 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -0,0 +1,54 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +public struct JSONDataEncoding: ParameterEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> Parameters? { + var returnedParams: Parameters? = nil + if let jsonData = jsonData, !jsonData.isEmpty { + var params = Parameters() + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 000000000000..70449515842d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,43 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + if encodeResult.error == nil { + params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { + var params: Parameters? = nil + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error) + return nil + } + } + + return params + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 000000000000..42f8186ae4af --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,36 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse : Error { + case error(Int, Data?, Error) +} + +open class Response { + open let statusCode: Int + open let header: [String: String] + open let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String:String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift new file mode 100644 index 000000000000..3ce27fcd98f5 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift @@ -0,0 +1,76 @@ +// +// AllPrimitives.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Object which contains lots of different primitive Swagger types */ + +public struct AllPrimitives: Codable { + + public enum MyInlineStringEnum: String, Codable { + case inlinestringenumvalue1 = "inlineStringEnumValue1" + case inlinestringenumvalue2 = "inlineStringEnumValue2" + case inlinestringenumvalue3 = "inlineStringEnumValue3" + } + public var myInteger: Int? + public var myIntegerArray: [Int]? + public var myLong: Int64? + public var myLongArray: [Int64]? + public var myFloat: Float? + public var myFloatArray: [Float]? + public var myDouble: Double? + public var myDoubleArray: [Double]? + public var myString: String? + public var myStringArray: [String]? + public var myBytes: Data? + public var myBytesArray: [Data]? + public var myBoolean: Bool? + public var myBooleanArray: [Bool]? + public var myDate: Date? + public var myDateArray: [Date]? + public var myDateTime: Date? + public var myDateTimeArray: [Date]? + public var myFile: URL? + public var myFileArray: [URL]? + public var myUUID: UUID? + public var myUUIDArray: [UUID]? + public var myStringEnum: StringEnum? + public var myStringEnumArray: [StringEnum]? + public var myInlineStringEnum: MyInlineStringEnum? + + public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { + self.myInteger = myInteger + self.myIntegerArray = myIntegerArray + self.myLong = myLong + self.myLongArray = myLongArray + self.myFloat = myFloat + self.myFloatArray = myFloatArray + self.myDouble = myDouble + self.myDoubleArray = myDoubleArray + self.myString = myString + self.myStringArray = myStringArray + self.myBytes = myBytes + self.myBytesArray = myBytesArray + self.myBoolean = myBoolean + self.myBooleanArray = myBooleanArray + self.myDate = myDate + self.myDateArray = myDateArray + self.myDateTime = myDateTime + self.myDateTimeArray = myDateTimeArray + self.myFile = myFile + self.myFileArray = myFileArray + self.myUUID = myUUID + self.myUUIDArray = myUUIDArray + self.myStringEnum = myStringEnum + self.myStringEnumArray = myStringEnumArray + self.myInlineStringEnum = myInlineStringEnum + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift new file mode 100644 index 000000000000..7e4bb2c0cd5a --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift @@ -0,0 +1,23 @@ +// +// BaseCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a base card object which uses a 'cardType' discriminator. */ + +public struct BaseCard: Codable { + + public var cardType: String + + public init(cardType: String) { + self.cardType = cardType + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift new file mode 100644 index 000000000000..ae5327eda329 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift @@ -0,0 +1,27 @@ +// +// ErrorInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Example Error object */ + +public struct ErrorInfo: Codable { + + public var code: Int? + public var message: String? + public var details: [String]? + + public init(code: Int?, message: String?, details: [String]?) { + self.code = code + self.message = message + self.details = details + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift new file mode 100644 index 000000000000..286c5a7a35be --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift @@ -0,0 +1,27 @@ +// +// GetAllModelsResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Response object containing AllPrimitives object */ + +public struct GetAllModelsResult: Codable { + + public var myPrimitiveArray: [AllPrimitives]? + public var myPrimitive: AllPrimitives? + public var myVariableNameTest: VariableNameTest? + + public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { + self.myPrimitiveArray = myPrimitiveArray + self.myPrimitive = myPrimitive + self.myVariableNameTest = myVariableNameTest + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift new file mode 100644 index 000000000000..e6e986dce61d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift @@ -0,0 +1,12 @@ +// +// ModelDoubleArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of doubles. */ +public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift new file mode 100644 index 000000000000..6656e6abe8c8 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift @@ -0,0 +1,12 @@ +// +// ModelErrorInfoArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of ErrorInfo objects. */ +public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift new file mode 100644 index 000000000000..7f0e0cbd1357 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift @@ -0,0 +1,12 @@ +// +// ModelStringArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of strings. */ +public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift new file mode 100644 index 000000000000..9ce70e0b95e6 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift @@ -0,0 +1,27 @@ +// +// PersonCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PersonCard: Codable { + + public var cardType: String + public var firstName: String? + public var lastName: String? + + public init(cardType: String, firstName: String?, lastName: String?) { + self.cardType = cardType + self.firstName = firstName + self.lastName = lastName + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift new file mode 100644 index 000000000000..905b80ae5241 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift @@ -0,0 +1,27 @@ +// +// PlaceCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PlaceCard: Codable { + + public var cardType: String + public var placeName: String? + public var placeAddress: String? + + public init(cardType: String, placeName: String?, placeAddress: String?) { + self.cardType = cardType + self.placeName = placeName + self.placeAddress = placeAddress + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift new file mode 100644 index 000000000000..77f8897cdf3f --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift @@ -0,0 +1,25 @@ +// +// SampleBase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a base class object from which other classes will derive. */ + +public struct SampleBase: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift new file mode 100644 index 000000000000..d53cd948fe76 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift @@ -0,0 +1,29 @@ +// +// SampleSubClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a subclass defived from the SampleBase class. */ + +public struct SampleSubClass: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + self.subClassStringProp = subClassStringProp + self.subClassIntegerProp = subClassIntegerProp + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift new file mode 100644 index 000000000000..d4cce19e6d6d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift @@ -0,0 +1,15 @@ +// +// StringEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +public enum StringEnum: String, Codable { + case stringenumvalue1 = "stringEnumValue1" + case stringenumvalue2 = "stringEnumValue2" + case stringenumvalue3 = "stringEnumValue3" +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift new file mode 100644 index 000000000000..1248e645c609 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift @@ -0,0 +1,36 @@ +// +// VariableNameTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ + +public struct VariableNameTest: Codable { + + /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ + public var exampleName: String? + /** This property name is a reserved word in most languages, including Swift 4. */ + public var _for: String? + /** This model object property name should be unchanged from the JSON property name. */ + public var normalName: String? + + public init(exampleName: String?, _for: String?, normalName: String?) { + self.exampleName = exampleName + self._for = _for + self.normalName = normalName + } + + public enum CodingKeys: String, CodingKey { + case exampleName = "example_name" + case _for = "for" + case normalName + } + + +} + diff --git a/samples/config/petstore/apache2/.openapi-generator/VERSION b/samples/config/petstore/apache2/.openapi-generator/VERSION index 7fea99011a6f..82602aa4190d 100644 --- a/samples/config/petstore/apache2/.openapi-generator/VERSION +++ b/samples/config/petstore/apache2/.openapi-generator/VERSION @@ -1 +1 @@ -2.2.3-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/apache2/PetApi.conf b/samples/config/petstore/apache2/PetApi.conf index c92843e2610f..2d28dcdaa61b 100644 --- a/samples/config/petstore/apache2/PetApi.conf +++ b/samples/config/petstore/apache2/PetApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -16,7 +16,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -34,7 +34,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -48,7 +48,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -62,7 +62,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/StoreApi.conf b/samples/config/petstore/apache2/StoreApi.conf index f0fb742f55ac..b223a8816ba6 100644 --- a/samples/config/petstore/apache2/StoreApi.conf +++ b/samples/config/petstore/apache2/StoreApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -14,7 +14,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/UserApi.conf b/samples/config/petstore/apache2/UserApi.conf index b01bb509728a..699b2b72c16c 100644 --- a/samples/config/petstore/apache2/UserApi.conf +++ b/samples/config/petstore/apache2/UserApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -11,7 +11,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -37,7 +37,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -56,7 +56,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -69,7 +69,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/documentation/cwiki/.openapi-generator/VERSION b/samples/documentation/cwiki/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/documentation/cwiki/.openapi-generator/VERSION +++ b/samples/documentation/cwiki/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/dynamic-html/.openapi-generator/VERSION b/samples/dynamic-html/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/dynamic-html/.openapi-generator/VERSION +++ b/samples/dynamic-html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html.md/.openapi-generator/VERSION b/samples/html.md/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html.md/.openapi-generator/VERSION +++ b/samples/html.md/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html/.openapi-generator/VERSION b/samples/html/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html/.openapi-generator/VERSION +++ b/samples/html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/.openapi-generator/VERSION b/samples/html2/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html2/.openapi-generator/VERSION +++ b/samples/html2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index dd8dcf14fea7..37e85ee61853 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -116,7 +116,7 @@ UTF-8 - 3.0.0-SNAPSHOT + 3.0.3-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 34eb757240dd..82d674b55753 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -104,6 +104,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -157,6 +158,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/api/PetApi.cpp index af068a3422fa..b0fab3b042d6 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/PetApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.h b/samples/server/petstore/cpp-restbed/api/PetApi.h index 83607a10bcb3..20aee014fe98 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/api/PetApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp index 97f38c052072..3448b2800571 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.h b/samples/server/petstore/cpp-restbed/api/StoreApi.h index 0f0f34d91445..309dae22fb4c 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/api/UserApi.cpp index 158e5e8472b8..30825e5f5ab3 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/UserApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.h b/samples/server/petstore/cpp-restbed/api/UserApi.h index 9c638e11c5e7..2bcd51778518 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/api/UserApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp index 0ad763742285..dc816c8ca28b 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/model/ApiResponse.h index 704fade4a1c3..3032ad6d3445 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.cpp b/samples/server/petstore/cpp-restbed/model/Category.cpp index 4156dc195fc6..39e77a10fd80 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/model/Category.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.h b/samples/server/petstore/cpp-restbed/model/Category.h index cd514f3d33dc..e67a3cf8fe3f 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.h +++ b/samples/server/petstore/cpp-restbed/model/Category.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.cpp b/samples/server/petstore/cpp-restbed/model/Order.cpp index a82a0bb34665..1b30130bad8b 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/model/Order.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.h b/samples/server/petstore/cpp-restbed/model/Order.h index e66688973006..463aa5fa3bf7 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.h +++ b/samples/server/petstore/cpp-restbed/model/Order.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.cpp b/samples/server/petstore/cpp-restbed/model/Pet.cpp index 5fbecd6bc915..ba0a73c08b17 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/model/Pet.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.h b/samples/server/petstore/cpp-restbed/model/Pet.h index 96e9fba3c73b..e97a8ae269f6 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/model/Pet.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.cpp b/samples/server/petstore/cpp-restbed/model/Tag.cpp index ccefa0e8c757..42e4618af2c8 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/model/Tag.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.h b/samples/server/petstore/cpp-restbed/model/Tag.h index 29b9a90e79e3..ca0615a97374 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/model/Tag.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.cpp b/samples/server/petstore/cpp-restbed/model/User.cpp index 637e5826c0bc..9079c0392a07 100644 --- a/samples/server/petstore/cpp-restbed/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/model/User.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.h b/samples/server/petstore/cpp-restbed/model/User.h index 054b31c534e3..d66f50f94c8f 100644 --- a/samples/server/petstore/cpp-restbed/model/User.h +++ b/samples/server/petstore/cpp-restbed/model/User.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index 34eb757240dd..82d674b55753 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -104,6 +104,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -157,6 +158,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/finch/.openapi-generator/VERSION b/samples/server/petstore/finch/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/finch/.openapi-generator/VERSION +++ b/samples/server/petstore/finch/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml index cc02c545f9a5..dca523e5557c 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml @@ -1,163 +1,202 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: add_pet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + put: operationId: update_pet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: add_pet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by status + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - tags: - - pet - summary: Finds Pets by tags + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - get: + delete: + operationId: delete_pet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-openapi-router-controller: openapi_server.controllers.pet_controller + get: description: Returns a single pet operationId: get_pet_by_id parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -165,140 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: operationId: update_pet_with_form parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: delete_pet - parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - style: simple - explode: false - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: upload_file parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] + summary: Returns pet inventories by status + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: - tags: - - store - summary: Place an order for a pet operationId: place_order requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -306,31 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -338,153 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - x-openapi-router-controller: openapi_server.controllers.store_controller - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation + summary: Create user + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: - tags: - - user - summary: Logs user into the system operationId: login_user parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires - style: simple - explode: false schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: - tags: - - user - summary: Logs out current logged in user session operationId: logout_user responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-openapi-router-controller: openapi_server.controllers.user_controller + get: operationId: get_user_by_name parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -492,120 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - put: + summary: Get user by user name tags: - user - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + put: description: This can only be done by the logged in user. operationId: update_user parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -619,155 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message - body: - type: object properties: - name: + code: + format: int32 + type: integer + type: type: string - description: Updated name of the pet - status: + message: type: string - description: Updated status of the pet - body_1: + title: An uploaded response type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py index 4321570d5a0e..c7340cd00059 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml index cc02c545f9a5..dca523e5557c 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml @@ -1,163 +1,202 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: add_pet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + put: operationId: update_pet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: add_pet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by status + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - tags: - - pet - summary: Finds Pets by tags + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - get: + delete: + operationId: delete_pet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-openapi-router-controller: openapi_server.controllers.pet_controller + get: description: Returns a single pet operationId: get_pet_by_id parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -165,140 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: operationId: update_pet_with_form parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: delete_pet - parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - style: simple - explode: false - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: upload_file parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] + summary: Returns pet inventories by status + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: - tags: - - store - summary: Place an order for a pet operationId: place_order requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -306,31 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -338,153 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - x-openapi-router-controller: openapi_server.controllers.store_controller - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation + summary: Create user + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: - tags: - - user - summary: Logs user into the system operationId: login_user parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires - style: simple - explode: false schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: - tags: - - user - summary: Logs out current logged in user session operationId: logout_user responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-openapi-router-controller: openapi_server.controllers.user_controller + get: operationId: get_user_by_name parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -492,120 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - put: + summary: Get user by user name tags: - user - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + put: description: This can only be done by the logged in user. operationId: update_user parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -619,155 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message - body: - type: object properties: - name: + code: + format: int32 + type: integer + type: type: string - description: Updated name of the pet - status: + message: type: string - description: Updated status of the pet - body_1: + title: An uploaded response type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/flaskConnexion/openapi_server/util.py b/samples/server/petstore/flaskConnexion/openapi_server/util.py index 4321570d5a0e..c7340cd00059 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/.openapi-generator/VERSION b/samples/server/petstore/java-inflector/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/java-inflector/.openapi-generator/VERSION +++ b/samples/server/petstore/java-inflector/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java index cd276a634870..99fd61b22a4d 100644 --- a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java +++ b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java @@ -70,5 +70,11 @@ public ResponseContext uploadFile(RequestContext request , Long petId, String ad } */ + /* + public ResponseContext uploadFileWithRequiredFile(RequestContext request , Long petId, FormDataContentDisposition fileDetail, String additionalMetadata) { + return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" ); + } + */ + } diff --git a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml index 819110c3f904..76803fad02eb 100644 --- a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml @@ -294,6 +294,48 @@ paths: - pet x-contentType: multipart/form-data x-accepts: application/json + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/java-msf4j/.openapi-generator-ignore b/samples/server/petstore/java-msf4j/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-msf4j/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index fd1699a7c5f9..8fa7248e2317 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -43,10 +43,10 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean booleanPostBody + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body ) throws NotFoundException { - return delegate.fakeOuterBooleanSerialize(booleanPostBody); + return delegate.fakeOuterBooleanSerialize(body); } @POST @Path("/outer/composite") @@ -120,22 +120,22 @@ public Response testClientModel(@ApiParam(value = "client model" ,required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number -,@ApiParam(value = "None", required=true) @FormParam("double") Double _double -,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter -,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte -,@ApiParam(value = "None", allowableValues="range=[10, 100]") @FormParam("integer") Integer integer -,@ApiParam(value = "None", allowableValues="range=[20, 200]") @FormParam("int32") Integer int32 -,@ApiParam(value = "None") @FormParam("int64") Long int64 -,@ApiParam(value = "None") @FormParam("float") Float _float -,@ApiParam(value = "None") @FormParam("string") String string + public Response testEndpointParameters(@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("number") BigDecimal number +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("double") Double _double +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("pattern_without_delimiter") String patternWithoutDelimiter +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("byte") byte[] _byte +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("integer") Integer integer +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int32") Integer int32 +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int64") Long int64 +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("float") Float _float +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("string") String string , @FormDataParam("binary") InputStream binaryInputStream, @FormDataParam("binary") FileInfo binaryDetail -,@ApiParam(value = "None") @FormParam("date") Date date -,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime -,@ApiParam(value = "None") @FormParam("password") String password -,@ApiParam(value = "None") @FormParam("callback") String paramCallback +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("date") Date date +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("dateTime") Date dateTime +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("password") String password +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("callback") String paramCallback ) throws NotFoundException { return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binaryInputStream, binaryDetail,date,dateTime,password,paramCallback); @@ -155,8 +155,8 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble -,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List enumFormStringArray -,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)") @FormParam("enum_form_string") String enumFormString +,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray +,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString); @@ -168,7 +168,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) String requestBody + public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Map requestBody ) throws NotFoundException { return delegate.testInlineAdditionalProperties(requestBody); @@ -180,8 +180,8 @@ public Response testInlineAdditionalProperties(@ApiParam(value = "request body" @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param -,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 + public Response testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param") String param +,@ApiParam(value = "field2", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param2") String param2 ) throws NotFoundException { return delegate.testJsonFormData(param,param2); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java index 7ace08f487d9..ec6c30bb4c19 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java @@ -24,7 +24,7 @@ public abstract class FakeApiService { - public abstract Response fakeOuterBooleanSerialize(Boolean booleanPostBody + public abstract Response fakeOuterBooleanSerialize(Boolean body ) throws NotFoundException; public abstract Response fakeOuterCompositeSerialize(OuterComposite outerComposite ) throws NotFoundException; @@ -61,7 +61,7 @@ public abstract Response testEnumParameters(List enumHeaderStringArray ,List enumFormStringArray ,String enumFormString ) throws NotFoundException; - public abstract Response testInlineAdditionalProperties(String requestBody + public abstract Response testInlineAdditionalProperties(Map requestBody ) throws NotFoundException; public abstract Response testJsonFormData(String param ,String param2 diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java index dbce159ab076..2920fe12f984 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java @@ -157,8 +157,8 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name -,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status +,@ApiParam(value = "Updated name of the pet", defaultValue="null") @DefaultValue("null") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet", defaultValue="null") @DefaultValue("null") @FormParam("status") String status ) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status); @@ -176,7 +176,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FileInfo fileDetail @@ -184,4 +184,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FileInfo fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata); + } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java index d7fbedc2a337..cfd59b16b0db 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java @@ -40,5 +40,9 @@ public abstract Response updatePetWithForm(Long petId public abstract Response uploadFile(Long petId ,String additionalMetadata ,InputStream fileInputStream, FileInfo fileDetail + ) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId + ,InputStream fileInputStream, FileInfo fileDetail + ,String additionalMetadata ) throws NotFoundException; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java index c657b4ee3766..0a093d51ba92 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java @@ -69,7 +69,7 @@ public Response getInventory() @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]") @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId ) throws NotFoundException { return delegate.getOrderById(orderId); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java new file mode 100644 index 000000000000..fd690d2791c0 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java @@ -0,0 +1,50 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Animal; + +/** + * AnimalFarm + */ + +public class AnimalFarm extends ArrayList { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnimalFarm {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java index ad415532b6ca..9c68cb335233 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java @@ -78,7 +78,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java index f57655fee856..e04f098c7c07 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java @@ -48,7 +48,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index f2efccf5d1da..3f251ec15a5a 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -25,7 +25,7 @@ public class FakeApiServiceImpl extends FakeApiService { @Override - public Response fakeOuterBooleanSerialize(Boolean booleanPostBody + public Response fakeOuterBooleanSerialize(Boolean body ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -94,7 +94,7 @@ public Response testEnumParameters(List enumHeaderStringArray return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testInlineAdditionalProperties(String requestBody + public Response testInlineAdditionalProperties(Map requestBody ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index c7e28596d1d7..4945268b9db4 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -69,6 +69,14 @@ public Response updatePetWithForm(Long petId public Response uploadFile(Long petId , String additionalMetadata , InputStream fileInputStream, FileInfo fileDetail + ) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response uploadFileWithRequiredFile(Long petId +, InputStream fileInputStream, FileInfo fileDetail +, String additionalMetadata ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-pkmst/.openapi-generator-ignore b/samples/server/petstore/java-pkmst/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-pkmst/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION +++ b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/Readme.md b/samples/server/petstore/java-pkmst/Readme.md index ebef7835e7c7..9867e11590b6 100644 --- a/samples/server/petstore/java-pkmst/Readme.md +++ b/samples/server/petstore/java-pkmst/Readme.md @@ -17,20 +17,20 @@ g)Allow you to integrate with tracing server (Example Zipkin) h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk) i)Allow you to configure Oauth2 security based authorization for your microservice - Additonal Features + Additional Features j)generate sample cucumber file and dependency to drive your Behaviour driven development. - k)generate gatling based perfromance test , which can be excuted via build pipeline like jenkins etc. + k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc. Working: -Using swagger specification you can convert any definition to spring boot microservice. +Using OpenAPI specification you can convert any definition to spring boot microservice. It has the integration with the below services: eureka registry, zipkin , spring boot admin, circuit breaker. By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and related configuration for eureka, zipkin, spring boot admin one has two options: -1) When generating from UI one has to provide vendor extensions inside the swagger specification as below: +1) When generating from UI one has to provide vendor extensions inside the OpenAPI specification as below: swagger: "2.0" info: description: "This is a sample Product Catalogue Server.\ @@ -43,11 +43,11 @@ info: springBootAdminUri: "http://localhost:8000" pkmstInterceptor: "true" -PLease note the vendor extensions are inside the info tag of the swagger specification. All the tags are case sensitive. Once given all the related configuration and the dependency +PLease note the vendor extensions are inside the info tag of the OpenAPI specification. All the tags are case sensitive. Once given all the related configuration and the dependency will be enabled. 2) When generating from the maven plugin one has to provide configuration inside pom as below: -inside the swagger codegen maven plugin under the configuration section +inside the openapi generator maven plugin under the configuration section product-openapi.yaml @@ -136,7 +136,7 @@ HttpLogging filter is provided for logging in the request and response. Can be f Spring security is also provided to secure the resources. Please modify according to your needs. First run: -Import the project in to the eclipse. Run the app as an spring boot application.The project will run on http://localhost:8008 +Import the project in to the eclipse. Run the app as a spring boot application.The project will run on http://localhost:8008 Swagger ui available on: http://localhost:8008/swagger-ui.html If all the configurations have been enabled(depending on the port) below are some of the URls to access: @@ -152,4 +152,4 @@ Pkmst examples https://github.com/ProKarma-Inc/pkmst-getting-started-examples Pkmst Extensions -https://github.com/ProKarma-Inc/pkmst-extention \ No newline at end of file +https://github.com/ProKarma-Inc/pkmst-extention diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml index 5ca43f8a6f06..8a62b880bf6c 100644 --- a/samples/server/petstore/java-pkmst/pom.xml +++ b/samples/server/petstore/java-pkmst/pom.xml @@ -52,10 +52,10 @@ false - - jitpack.io - https://jitpack.io - + + jitpack.io + https://jitpack.io + @@ -83,35 +83,35 @@ + org.springframework.cloud + spring-cloud-starter-sleuth + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> org.springframework.boot spring-boot-starter-actuator - org.springframework.boot - spring-boot-starter-jetty + org.springframework.boot + spring-boot-starter-jetty + org.springframework.cloud + spring-cloud-netflix-hystrix-stream + + + org.springframework.cloud + spring-cloud-starter-bus-amqp + --> org.springframework.cloud spring-cloud-starter-hystrix-dashboard @@ -229,11 +229,11 @@ org.springframework spring-test - - org.threeten - threetenbp - 1.3.6 - + + org.threeten + threetenbp + 1.3.6 + @@ -263,7 +263,7 @@ **/*CucumberTest*.java + an example --> **/cucumber/*.java @@ -275,28 +275,28 @@ ${scala-maven-plugin.version} - + org.springframework.boot spring-boot-maven-plugin @@ -350,9 +350,9 @@ 2.19.1 - org.apache.maven.plugins - maven-pmd-plugin - + org.apache.maven.plugins + maven-pmd-plugin + diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java similarity index 98% rename from samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java rename to samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java index 67599c9bb45c..dac5a9cdd15f 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java @@ -20,7 +20,7 @@ */ @EnableSwagger2 @Configuration -public class SwaggerDocumentationConfig { +public class OpenAPIDocumentationConfig { public static final String DEFAULT_INCLUDE_PATTERN = "/pkmst/.*"; @Bean diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java index ae6b11d018f8..18b41246f8cc 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -128,7 +128,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @@ -143,6 +143,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java index 28752172722b..efd55c865beb 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java @@ -50,18 +50,48 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",requi public ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List tags, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } @@ -72,18 +102,23 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t } public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name, - @ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, + @ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! return new ResponseEntity(HttpStatus.OK); } public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, @ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", ModelApiResponse.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index be3ff14ebf64..4214fd18ff1b 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -58,7 +58,7 @@ public interface StoreApi { @RequestMapping(value = "/store/order/{orderId}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java index 6c5faee23f2e..16af6cd0225a 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java @@ -44,15 +44,35 @@ public ResponseEntity> getInventory(@RequestHeader(value = return new ResponseEntity>(HttpStatus.OK); } - public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, + public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order order, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java index f81441045ebb..81230453e81c 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java index 8ba2847e32e1..3dc6cf94c8fc 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java @@ -60,6 +60,16 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true ) @PathVariable("username") String username, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml index fecadb4b3ab2..13ef356233ca 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: -1 + port: 8080 # Spring Actuator management: diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml index c314f6e7a300..57e184773b0d 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: -1 + port: 8080 # Spring Actuator management: diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index a82c9ee422d7..5f2c63d116d3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -77,7 +77,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 7cd05af295f7..b84a9bee2bc1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -47,7 +47,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java index 8dff19402378..4b5720896eec 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java @@ -177,4 +177,25 @@ public Result uploadFile(Long petId) throws Exception { JsonNode result = mapper.valueToTree(obj); return ok(result); } + + @ApiAction + public Result uploadFileWithRequiredFile(Long petId) throws Exception { + String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String additionalMetadata; + if (valueadditionalMetadata != null) { + additionalMetadata = valueadditionalMetadata; + } else { + additionalMetadata = "null"; + } + Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file"); + if ((file == null || ((File) file.getFile()).length() == 0)) { + throw new IllegalArgumentException("'file' file cannot be empty"); + } + ModelApiResponse obj = imp.uploadFileWithRequiredFile(petId, file, additionalMetadata); + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + JsonNode result = mapper.valueToTree(obj); + return ok(result); + } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java index 2cd201c4bc35..85e0c60ef6cf 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java @@ -56,4 +56,10 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.M return new ModelApiResponse(); } + @Override + public ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception { + //Do your magic!!! + return new ModelApiResponse(); + } + } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java index 961632675800..1a87f77ac02c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java @@ -29,4 +29,6 @@ public interface PetApiControllerImpInterface { ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; + ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception; + } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes index de7b52199cbe..b7943a8a33d8 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes +++ b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes @@ -32,6 +32,7 @@ GET /v2/pet/:petId controllers.PetApiController.getPetBy PUT /v2/pet controllers.PetApiController.updatePet() POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long) POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) +POST /v2/pet/:petId/uploadImageWithRequiredFile controllers.PetApiController.uploadFileWithRequiredFile(petId: Long) #Functions for Store API DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 1fb6f6037ebc..7398708288f1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -379,6 +381,61 @@ "x-accepts" : "application/json" } }, + "/pet/{petId}/uploadImageWithRequiredFile" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "operationId" : "uploadFileWithRequiredFile", + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], + "requestBody" : { + "content" : { + "multipart/form-data" : { + "schema" : { + "required" : [ "file" ], + "properties" : { + "additionalMetadata" : { + "type" : "string", + "description" : "Additional data to pass to server" + }, + "file" : { + "type" : "string", + "description" : "file to upload", + "format" : "binary" + } + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "successful operation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponse" + } + } + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, "/store/inventory" : { "get" : { "tags" : [ "store" ], @@ -833,6 +890,8 @@ "name" : "enum_header_string_array", "in" : "header", "description" : "Header parameter enum test (string array)", + "style" : "simple", + "explode" : false, "schema" : { "type" : "array", "items" : { @@ -854,6 +913,7 @@ "name" : "enum_query_string_array", "in" : "query", "description" : "Query parameter enum test (string array)", + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json index eeb13a4729fb..01ebde2297ed 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json @@ -112,6 +112,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -168,6 +169,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json index eeb13a4729fb..01ebde2297ed 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json @@ -112,6 +112,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -168,6 +169,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index 8a3df9670023..3aff71de768d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -118,9 +118,24 @@ public interface PetApi { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, @FormParam(value = "file") Attachment fileDetail); + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index a2d2c5e11ab8..feea3adec9d5 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 3.0.2-SNAPSHOT. +Generated by OpenAPI Generator 3.0.3-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln new file mode 100644 index 000000000000..757078a1383c --- /dev/null +++ b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 000000000000..db083b73bdc7 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// Describes the result of uploading an image resource + /// + public sealed class ApiResponse: IEquatable + { + /// + /// Code + /// + public int? Code { get; private set; } + + /// + /// Type + /// + public string Type { get; private set; } + + /// + /// Message + /// + public string Message { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use ApiResponse.Builder() for instance creation instead. + /// + [Obsolete] + public ApiResponse() + { + } + + private ApiResponse(int? Code, string Type, string Message) + { + + this.Code = Code; + + this.Type = Type; + + this.Message = Message; + + } + + /// + /// Returns builder of ApiResponse. + /// + /// ApiResponseBuilder + public static ApiResponseBuilder Builder() + { + return new ApiResponseBuilder(); + } + + /// + /// Returns ApiResponseBuilder with properties set. + /// Use it to change properties. + /// + /// ApiResponseBuilder + public ApiResponseBuilder With() + { + return Builder() + .Code(Code) + .Type(Type) + .Message(Message); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(ApiResponse other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are equals, false otherwise + public static bool operator == (ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are not equals, false otherwise + public static bool operator != (ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + /// + /// Builder of ApiResponse. + /// + public sealed class ApiResponseBuilder + { + private int? _Code; + private string _Type; + private string _Message; + + internal ApiResponseBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for ApiResponse.Code property. + /// + /// Code + public ApiResponseBuilder Code(int? value) + { + _Code = value; + return this; + } + + /// + /// Sets value for ApiResponse.Type property. + /// + /// Type + public ApiResponseBuilder Type(string value) + { + _Type = value; + return this; + } + + /// + /// Sets value for ApiResponse.Message property. + /// + /// Message + public ApiResponseBuilder Message(string value) + { + _Message = value; + return this; + } + + + /// + /// Builds instance of ApiResponse. + /// + /// ApiResponse + public ApiResponse Build() + { + Validate(); + return new ApiResponse( + Code: _Code, + Type: _Type, + Message: _Message + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 000000000000..1bfb30abb752 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A category for a pet + /// + public sealed class Category: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Category.Builder() for instance creation instead. + /// + [Obsolete] + public Category() + { + } + + private Category(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Category. + /// + /// CategoryBuilder + public static CategoryBuilder Builder() + { + return new CategoryBuilder(); + } + + /// + /// Returns CategoryBuilder with properties set. + /// Use it to change properties. + /// + /// CategoryBuilder + public CategoryBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Category other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are equals, false otherwise + public static bool operator == (Category left, Category right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are not equals, false otherwise + public static bool operator != (Category left, Category right) + { + return !Equals(left, right); + } + + /// + /// Builder of Category. + /// + public sealed class CategoryBuilder + { + private long? _Id; + private string _Name; + + internal CategoryBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Category.Id property. + /// + /// Id + public CategoryBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Category.Name property. + /// + /// Name + public CategoryBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Category. + /// + /// Category + public Category Build() + { + Validate(); + return new Category( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 000000000000..7bdec1016958 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,247 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// An order for a pets from the pet store + /// + public sealed class Order: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// PetId + /// + public long? PetId { get; private set; } + + /// + /// Quantity + /// + public int? Quantity { get; private set; } + + /// + /// ShipDate + /// + public ZonedDateTime? ShipDate { get; private set; } + + /// + /// Order Status + /// + public StatusEnum? Status { get; private set; } + + /// + /// Complete + /// + public bool? Complete { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Order.Builder() for instance creation instead. + /// + [Obsolete] + public Order() + { + } + + private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) + { + + this.Id = Id; + + this.PetId = PetId; + + this.Quantity = Quantity; + + this.ShipDate = ShipDate; + + this.Status = Status; + + this.Complete = Complete; + + } + + /// + /// Returns builder of Order. + /// + /// OrderBuilder + public static OrderBuilder Builder() + { + return new OrderBuilder(); + } + + /// + /// Returns OrderBuilder with properties set. + /// Use it to change properties. + /// + /// OrderBuilder + public OrderBuilder With() + { + return Builder() + .Id(Id) + .PetId(PetId) + .Quantity(Quantity) + .ShipDate(ShipDate) + .Status(Status) + .Complete(Complete); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Order other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are equals, false otherwise + public static bool operator == (Order left, Order right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are not equals, false otherwise + public static bool operator != (Order left, Order right) + { + return !Equals(left, right); + } + + /// + /// Builder of Order. + /// + public sealed class OrderBuilder + { + private long? _Id; + private long? _PetId; + private int? _Quantity; + private ZonedDateTime? _ShipDate; + private StatusEnum? _Status; + private bool? _Complete; + + internal OrderBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + _Complete = false; + } + + /// + /// Sets value for Order.Id property. + /// + /// Id + public OrderBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Order.PetId property. + /// + /// PetId + public OrderBuilder PetId(long? value) + { + _PetId = value; + return this; + } + + /// + /// Sets value for Order.Quantity property. + /// + /// Quantity + public OrderBuilder Quantity(int? value) + { + _Quantity = value; + return this; + } + + /// + /// Sets value for Order.ShipDate property. + /// + /// ShipDate + public OrderBuilder ShipDate(ZonedDateTime? value) + { + _ShipDate = value; + return this; + } + + /// + /// Sets value for Order.Status property. + /// + /// Order Status + public OrderBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + /// + /// Sets value for Order.Complete property. + /// + /// Complete + public OrderBuilder Complete(bool? value) + { + _Complete = value; + return this; + } + + + /// + /// Builds instance of Order. + /// + /// Order + public Order Build() + { + Validate(); + return new Order( + Id: _Id, + PetId: _PetId, + Quantity: _Quantity, + ShipDate: _ShipDate, + Status: _Status, + Complete: _Complete + ); + } + + private void Validate() + { + } + } + + + public enum StatusEnum { Placed, Approved, Delivered }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 000000000000..a3f02e090883 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A pet for sale in the pet store + /// + public sealed class Pet: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Category + /// + public Category Category { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + /// + /// PhotoUrls + /// + public List PhotoUrls { get; private set; } + + /// + /// Tags + /// + public List Tags { get; private set; } + + /// + /// pet status in the store + /// + public StatusEnum? Status { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Pet.Builder() for instance creation instead. + /// + [Obsolete] + public Pet() + { + } + + private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) + { + + this.Id = Id; + + this.Category = Category; + + this.Name = Name; + + this.PhotoUrls = PhotoUrls; + + this.Tags = Tags; + + this.Status = Status; + + } + + /// + /// Returns builder of Pet. + /// + /// PetBuilder + public static PetBuilder Builder() + { + return new PetBuilder(); + } + + /// + /// Returns PetBuilder with properties set. + /// Use it to change properties. + /// + /// PetBuilder + public PetBuilder With() + { + return Builder() + .Id(Id) + .Category(Category) + .Name(Name) + .PhotoUrls(PhotoUrls) + .Tags(Tags) + .Status(Status); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Pet other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are equals, false otherwise + public static bool operator == (Pet left, Pet right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are not equals, false otherwise + public static bool operator != (Pet left, Pet right) + { + return !Equals(left, right); + } + + /// + /// Builder of Pet. + /// + public sealed class PetBuilder + { + private long? _Id; + private Category _Category; + private string _Name; + private List _PhotoUrls; + private List _Tags; + private StatusEnum? _Status; + + internal PetBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Pet.Id property. + /// + /// Id + public PetBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Pet.Category property. + /// + /// Category + public PetBuilder Category(Category value) + { + _Category = value; + return this; + } + + /// + /// Sets value for Pet.Name property. + /// + /// Name + public PetBuilder Name(string value) + { + _Name = value; + return this; + } + + /// + /// Sets value for Pet.PhotoUrls property. + /// + /// PhotoUrls + public PetBuilder PhotoUrls(List value) + { + _PhotoUrls = value; + return this; + } + + /// + /// Sets value for Pet.Tags property. + /// + /// Tags + public PetBuilder Tags(List value) + { + _Tags = value; + return this; + } + + /// + /// Sets value for Pet.Status property. + /// + /// pet status in the store + public PetBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + + /// + /// Builds instance of Pet. + /// + /// Pet + public Pet Build() + { + Validate(); + return new Pet( + Id: _Id, + Category: _Category, + Name: _Name, + PhotoUrls: _PhotoUrls, + Tags: _Tags, + Status: _Status + ); + } + + private void Validate() + { + if (_Name == null) + { + throw new ArgumentException("Name is a required property for Pet and cannot be null"); + } + if (_PhotoUrls == null) + { + throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); + } + } + } + + + public enum StatusEnum { Available, Pending, Sold }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 000000000000..7ce321d25114 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A tag for a pet + /// + public sealed class Tag: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Tag.Builder() for instance creation instead. + /// + [Obsolete] + public Tag() + { + } + + private Tag(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Tag. + /// + /// TagBuilder + public static TagBuilder Builder() + { + return new TagBuilder(); + } + + /// + /// Returns TagBuilder with properties set. + /// Use it to change properties. + /// + /// TagBuilder + public TagBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Tag other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are equals, false otherwise + public static bool operator == (Tag left, Tag right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are not equals, false otherwise + public static bool operator != (Tag left, Tag right) + { + return !Equals(left, right); + } + + /// + /// Builder of Tag. + /// + public sealed class TagBuilder + { + private long? _Id; + private string _Name; + + internal TagBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Tag.Id property. + /// + /// Id + public TagBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Tag.Name property. + /// + /// Name + public TagBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Tag. + /// + /// Tag + public Tag Build() + { + Validate(); + return new Tag( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 000000000000..04d33ca07f77 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A User who is purchasing from the pet store + /// + public sealed class User: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Username + /// + public string Username { get; private set; } + + /// + /// FirstName + /// + public string FirstName { get; private set; } + + /// + /// LastName + /// + public string LastName { get; private set; } + + /// + /// Email + /// + public string Email { get; private set; } + + /// + /// Password + /// + public string Password { get; private set; } + + /// + /// Phone + /// + public string Phone { get; private set; } + + /// + /// User Status + /// + public int? UserStatus { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use User.Builder() for instance creation instead. + /// + [Obsolete] + public User() + { + } + + private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) + { + + this.Id = Id; + + this.Username = Username; + + this.FirstName = FirstName; + + this.LastName = LastName; + + this.Email = Email; + + this.Password = Password; + + this.Phone = Phone; + + this.UserStatus = UserStatus; + + } + + /// + /// Returns builder of User. + /// + /// UserBuilder + public static UserBuilder Builder() + { + return new UserBuilder(); + } + + /// + /// Returns UserBuilder with properties set. + /// Use it to change properties. + /// + /// UserBuilder + public UserBuilder With() + { + return Builder() + .Id(Id) + .Username(Username) + .FirstName(FirstName) + .LastName(LastName) + .Email(Email) + .Password(Password) + .Phone(Phone) + .UserStatus(UserStatus); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(User other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are equals, false otherwise + public static bool operator == (User left, User right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are not equals, false otherwise + public static bool operator != (User left, User right) + { + return !Equals(left, right); + } + + /// + /// Builder of User. + /// + public sealed class UserBuilder + { + private long? _Id; + private string _Username; + private string _FirstName; + private string _LastName; + private string _Email; + private string _Password; + private string _Phone; + private int? _UserStatus; + + internal UserBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for User.Id property. + /// + /// Id + public UserBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for User.Username property. + /// + /// Username + public UserBuilder Username(string value) + { + _Username = value; + return this; + } + + /// + /// Sets value for User.FirstName property. + /// + /// FirstName + public UserBuilder FirstName(string value) + { + _FirstName = value; + return this; + } + + /// + /// Sets value for User.LastName property. + /// + /// LastName + public UserBuilder LastName(string value) + { + _LastName = value; + return this; + } + + /// + /// Sets value for User.Email property. + /// + /// Email + public UserBuilder Email(string value) + { + _Email = value; + return this; + } + + /// + /// Sets value for User.Password property. + /// + /// Password + public UserBuilder Password(string value) + { + _Password = value; + return this; + } + + /// + /// Sets value for User.Phone property. + /// + /// Phone + public UserBuilder Phone(string value) + { + _Phone = value; + return this; + } + + /// + /// Sets value for User.UserStatus property. + /// + /// User Status + public UserBuilder UserStatus(int? value) + { + _UserStatus = value; + return this; + } + + + /// + /// Builds instance of User. + /// + /// User + public User Build() + { + Validate(); + return new User( + Id: _Id, + Username: _Username, + FirstName: _FirstName, + LastName: _LastName, + Email: _Email, + Password: _Password, + Phone: _Phone, + UserStatus: _UserStatus + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs new file mode 100644 index 000000000000..d978df59cb2e --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs @@ -0,0 +1,247 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + /// + /// Status values that need to be considered for filter + /// + public enum FindPetsByStatusStatusEnum + { + available = 1, + pending = 2, + sold = 3 + }; + + + /// + /// Module processing requests of Pet domain. + /// + public sealed class PetModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public PetModule(PetService service) : base("/v2") + { + Post["/pet", true] = async (parameters, ct) => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); + + await service.AddPet(Context, pet); + return new Response { ContentType = ""}; + }; + + Delete["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); + + await service.DeletePet(Context, petId, apiKey); + return new Response { ContentType = ""}; + }; + + Get["/pet/findByStatus", true] = async (parameters, ct) => + { + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); + Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); + + return await service.FindPetsByStatus(Context, status).ToArray(); + }; + + Get["/pet/findByTags", true] = async (parameters, ct) => + { + var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); + Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); + + return await service.FindPetsByTags(Context, tags).ToArray(); + }; + + Get["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); + + return await service.GetPetById(Context, petId); + }; + + Put["/pet", true] = async (parameters, ct) => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); + + await service.UpdatePet(Context, pet); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); + + await service.UpdatePetWithForm(Context, petId, name, status); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}/uploadImage", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); + var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); + + return await service.UploadFile(Context, petId, additionalMetadata, file); + }; + } + } + + /// + /// Service handling Pet requests. + /// + public interface PetService + { + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + Task AddPet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// Pet id to delete + /// (optional) + /// + Task DeletePet(NancyContext context, long? petId, string apiKey); + + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Context of request + /// Status values that need to be considered for filter + /// List<Pet> + Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); + + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Context of request + /// Tags to filter by + /// List<Pet> + Task> FindPetsByTags(NancyContext context, List tags); + + /// + /// Returns a single pet + /// + /// Context of request + /// ID of pet to return + /// Pet + Task GetPetById(NancyContext context, long? petId); + + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + Task UpdatePet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) + /// + Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status); + + /// + /// + /// + /// Context of request + /// ID of pet to update + /// Additional data to pass to server (optional) + /// file to upload (optional) + /// ApiResponse + Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); + } + + /// + /// Abstraction of PetService. + /// + public abstract class AbstractPetService: PetService + { + public virtual Task AddPet(NancyContext context, Pet pet) + { + return AddPet(pet); + } + + public virtual Task DeletePet(NancyContext context, long? petId, string apiKey) + { + return DeletePet(petId, apiKey); + } + + public virtual Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) + { + return FindPetsByStatus(status); + } + + public virtual Task> FindPetsByTags(NancyContext context, List tags) + { + return FindPetsByTags(tags); + } + + public virtual Task GetPetById(NancyContext context, long? petId) + { + return GetPetById(petId); + } + + public virtual Task UpdatePet(NancyContext context, Pet pet) + { + return UpdatePet(pet); + } + + public virtual Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status) + { + return UpdatePetWithForm(petId, name, status); + } + + public virtual Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) + { + return UploadFile(petId, additionalMetadata, file); + } + + protected abstract Task AddPet(Pet pet); + + protected abstract Task DeletePet(long? petId, string apiKey); + + protected abstract Task> FindPetsByStatus(FindPetsByStatusStatusEnum? status); + + protected abstract Task> FindPetsByTags(List tags); + + protected abstract Task GetPetById(long? petId); + + protected abstract Task UpdatePet(Pet pet); + + protected abstract Task UpdatePetWithForm(long? petId, string name, string status); + + protected abstract Task UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs new file mode 100644 index 000000000000..47786fb496d4 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs @@ -0,0 +1,129 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of Store domain. + /// + public sealed class StoreModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public StoreModule(StoreService service) : base("/v2") + { + Delete["/store/order/{orderId}", true] = async (parameters, ct) => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); + + await service.DeleteOrder(Context, orderId); + return new Response { ContentType = ""}; + }; + + Get["/store/inventory", true] = async (parameters, ct) => + { + + return await service.GetInventory(Context); + }; + + Get["/store/order/{orderId}", true] = async (parameters, ct) => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); + + return await service.GetOrderById(Context, orderId); + }; + + Post["/store/order", true] = async (parameters, ct) => + { + var order = this.Bind(); + Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); + + return await service.PlaceOrder(Context, order); + }; + } + } + + /// + /// Service handling Store requests. + /// + public interface StoreService + { + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Context of request + /// ID of the order that needs to be deleted + /// + Task DeleteOrder(NancyContext context, string orderId); + + /// + /// Returns a map of status codes to quantities + /// + /// Context of request + /// Dictionary<string, int?> + Task> GetInventory(NancyContext context); + + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// + /// Context of request + /// ID of pet that needs to be fetched + /// Order + Task GetOrderById(NancyContext context, long? orderId); + + /// + /// + /// + /// Context of request + /// order placed for purchasing the pet + /// Order + Task PlaceOrder(NancyContext context, Order order); + } + + /// + /// Abstraction of StoreService. + /// + public abstract class AbstractStoreService: StoreService + { + public virtual Task DeleteOrder(NancyContext context, string orderId) + { + return DeleteOrder(orderId); + } + + public virtual Task> GetInventory(NancyContext context) + { + return GetInventory(); + } + + public virtual Task GetOrderById(NancyContext context, long? orderId) + { + return GetOrderById(orderId); + } + + public virtual Task PlaceOrder(NancyContext context, Order order) + { + return PlaceOrder(order); + } + + protected abstract Task DeleteOrder(string orderId); + + protected abstract Task> GetInventory(); + + protected abstract Task GetOrderById(long? orderId); + + protected abstract Task PlaceOrder(Order order); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs new file mode 100644 index 000000000000..38efbe0f7cc4 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs @@ -0,0 +1,234 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of User domain. + /// + public sealed class UserModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public UserModule(UserService service) : base("/v2") + { + Post["/user", true] = async (parameters, ct) => + { + var user = this.Bind(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); + + await service.CreateUser(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithArray", true] = async (parameters, ct) => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); + + await service.CreateUsersWithArrayInput(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithList", true] = async (parameters, ct) => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); + + await service.CreateUsersWithListInput(Context, user); + return new Response { ContentType = ""}; + }; + + Delete["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); + + await service.DeleteUser(Context, username); + return new Response { ContentType = ""}; + }; + + Get["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); + + return await service.GetUserByName(Context, username); + }; + + Get["/user/login", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); + var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); + + Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); + + return await service.LoginUser(Context, username, password); + }; + + Get["/user/logout", true] = async (parameters, ct) => + { + + await service.LogoutUser(Context); + return new Response { ContentType = ""}; + }; + + Put["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + var user = this.Bind(); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); + + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); + + await service.UpdateUser(Context, username, user); + return new Response { ContentType = ""}; + }; + } + } + + /// + /// Service handling User requests. + /// + public interface UserService + { + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// Created user object + /// + Task CreateUser(NancyContext context, User user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + Task CreateUsersWithArrayInput(NancyContext context, List user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + Task CreateUsersWithListInput(NancyContext context, List user); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// The name that needs to be deleted + /// + Task DeleteUser(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The name that needs to be fetched. Use user1 for testing. + /// User + Task GetUserByName(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The user name for login + /// The password for login in clear text + /// string + Task LoginUser(NancyContext context, string username, string password); + + /// + /// + /// + /// Context of request + /// + Task LogoutUser(NancyContext context); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// name that need to be deleted + /// Updated user object + /// + Task UpdateUser(NancyContext context, string username, User user); + } + + /// + /// Abstraction of UserService. + /// + public abstract class AbstractUserService: UserService + { + public virtual Task CreateUser(NancyContext context, User user) + { + return CreateUser(user); + } + + public virtual Task CreateUsersWithArrayInput(NancyContext context, List user) + { + return CreateUsersWithArrayInput(user); + } + + public virtual Task CreateUsersWithListInput(NancyContext context, List user) + { + return CreateUsersWithListInput(user); + } + + public virtual Task DeleteUser(NancyContext context, string username) + { + return DeleteUser(username); + } + + public virtual Task GetUserByName(NancyContext context, string username) + { + return GetUserByName(username); + } + + public virtual Task LoginUser(NancyContext context, string username, string password) + { + return LoginUser(username, password); + } + + public virtual Task LogoutUser(NancyContext context) + { + return LogoutUser(); + } + + public virtual Task UpdateUser(NancyContext context, string username, User user) + { + return UpdateUser(username, user); + } + + protected abstract Task CreateUser(User user); + + protected abstract Task CreateUsersWithArrayInput(List user); + + protected abstract Task CreateUsersWithListInput(List user); + + protected abstract Task DeleteUser(string username); + + protected abstract Task GetUserByName(string username); + + protected abstract Task LoginUser(string username, string password); + + protected abstract Task LogoutUser(); + + protected abstract Task UpdateUser(string username, User user); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj new file mode 100644 index 000000000000..04b710b25cbd --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + {768B8DC6-54EE-4D40-9B20-7857E1D742A4} + Library + Properties + Org.OpenAPITools.v2 + Org.OpenAPITools + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Org.OpenAPITools.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\Org.OpenAPITools.XML + + + + ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + True + + + ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll + True + + + ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll + True + + + ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec new file mode 100644 index 000000000000..102c48def9d8 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -0,0 +1,13 @@ + + + + Org.OpenAPITools + Org.OpenAPITools + 1.0.0 + openapi-generator + openapi-generator + false + NancyFx Org.OpenAPITools API + http://www.apache.org/licenses/LICENSE-2.0.html + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs new file mode 100644 index 000000000000..9e7cfd8a8570 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs @@ -0,0 +1,55 @@ +using Nancy.Bootstrapper; +using Nancy.Json; +using NodaTime; +using NodaTime.Text; +using System; +using System.Collections.Generic; + +namespace Org.OpenAPITools.v2.Utils +{ + /// + /// (De)serializes a to a string using + /// the RFC3339 + /// full-date format. + /// + public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup + { + public override IEnumerable SupportedTypes + { + get + { + yield return typeof(LocalDate); + yield return typeof(LocalDate?); + } + } + + public void Initialize(IPipelines pipelines) + { + JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); + } + + + public override object Serialize(object obj, JavaScriptSerializer serializer) + { + if (obj is LocalDate) + { + LocalDate localDate = (LocalDate)obj; + return LocalDatePattern.IsoPattern.Format(localDate); + } + return null; + } + + public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) + { + if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) + { + try + { + return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); + } + catch { } + } + return null; + } + } +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs new file mode 100644 index 000000000000..9bc5408abfea --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Nancy; +using NodaTime; +using NodaTime.Text; +using Sharpility.Base; +using Sharpility.Extensions; +using Sharpility.Util; + +namespace Org.OpenAPITools.v2.Utils +{ + internal static class Parameters + { + private static readonly IDictionary> Parsers = CreateParsers(); + + internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + var valueType = typeof(TValue); + var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); + var isNullable = default(TValue) == null; + string value = RawValueOf(parameters, request, name, parameterType); + Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); + if (value == null && isNullable) + { + return default(TValue); + } + if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) + { + return EnumValueOf(name, value); + } + return ValueOf(parameters, name, value, valueType, request, parameterType); + } + + private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + try + { + switch (parameterType) + { + case ParameterType.Query: + string querValue = request.Query[name]; + return querValue; + case ParameterType.Path: + string pathValue = parameters[name]; + return pathValue; + case ParameterType.Header: + var headerValue = request.Headers[name]; + return headerValue != null ? string.Join(",", headerValue) : null; + } + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); + } + throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); + } + + private static TValue EnumValueOf(string name, string value) + { + var valueType = typeof(TValue); + var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); + Preconditions.IsNotNull(enumType, () => new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); + var values = Enum.GetValues(enumType); + foreach (var entry in values) + { + if (entry.ToString().EqualsIgnoreCases(value) + || ((int)entry).ToString().EqualsIgnoreCases(value)) + { + return (TValue)entry; + } + } + throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", + name, value, Strings.ToString(values))); + } + + private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) + { + var parser = Parsers.GetIfPresent(valueType); + if (parser != null) + { + return ParseValueUsing(name, value, valueType, parser); + } + if (parameterType == ParameterType.Path) + { + return DynamicValueOf(parameters, name); + } + if (parameterType == ParameterType.Query) + { + return DynamicValueOf(request.Query, name); + } + throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); + } + + private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) + { + var result = parser(Parameter.Of(name, value)); + try + { + return (TValue)result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + + "Received: '{2}', expected: '{3}'.", + name, value, result.GetType(), valueType)); + } + } + + private static TValue DynamicValueOf(dynamic parameters, string name) + { + string value = parameters[name]; + try + { + TValue result = parameters[name]; + return result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + + "Expected type: '{2}' is not supported", + name, value, typeof(TValue))); + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", + name, typeof(TValue)), e); + } + } + + private static IDictionary> CreateParsers() + { + var parsers = ImmutableDictionary.CreateBuilder>(); + parsers.Put(typeof(string), value => value.Value); + parsers.Put(typeof(bool), SafeParse(bool.Parse)); + parsers.Put(typeof(bool?), SafeParse(bool.Parse)); + parsers.Put(typeof(byte), SafeParse(byte.Parse)); + parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); + parsers.Put(typeof(short), SafeParse(short.Parse)); + parsers.Put(typeof(short?), SafeParse(short.Parse)); + parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); + parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); + parsers.Put(typeof(int), SafeParse(int.Parse)); + parsers.Put(typeof(int?), SafeParse(int.Parse)); + parsers.Put(typeof(uint), SafeParse(uint.Parse)); + parsers.Put(typeof(uint?), SafeParse(uint.Parse)); + parsers.Put(typeof(long), SafeParse(long.Parse)); + parsers.Put(typeof(long?), SafeParse(long.Parse)); + parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); + parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); + parsers.Put(typeof(float), SafeParse(float.Parse)); + parsers.Put(typeof(float?), SafeParse(float.Parse)); + parsers.Put(typeof(double), SafeParse(double.Parse)); + parsers.Put(typeof(double?), SafeParse(double.Parse)); + parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); + parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); + parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); + parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); + parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); + parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(List), ListParse(byte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); + parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(List), ListParse(sbyte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); + parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); + parsers.Put(typeof(List), ListParse(short.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); + parsers.Put(typeof(HashSet), SetParse(short.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(List), ListParse(ushort.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); + parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(List), ListParse(uint.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); + parsers.Put(typeof(HashSet), SetParse(uint.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(List), ListParse(ulong.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); + parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); + parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); + + return parsers.ToImmutableDictionary(); + } + + private static Func SafeParse(Func parse) + { + return parameter => + { + try + { + return parse(parameter.Value); + } + catch (OverflowException) + { + throw ParameterOutOfRange(parameter, typeof(T)); + } + catch (FormatException) + { + throw InvalidParameterFormat(parameter, typeof(T)); + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", + parameter.Name, parameter.Value, typeof(T)), e); + } + }; + } + + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + + private static Func ListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new List(); + } + return ParseCollection(parameter.Value, itemParser).ToList(); + }; + } + + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Lists.EmptyList(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); + }; + } + + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + + private static Func SetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new HashSet(); + } + return ParseCollection(parameter.Value, itemParser).ToSet(); + }; + } + + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableSetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Sets.EmptySet(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); + }; + } + + private static ZonedDateTime ParseZonedDateTime(string value) + { + var dateTime = DateTime.Parse(value); + return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); + } + + private static LocalDate ParseLocalDate(string value) + { + return LocalDatePattern.IsoPattern.Parse(value).Value; + } + + private static LocalTime ParseLocalTime(string value) + { + return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; + } + + private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + + private class Parameter + { + internal string Name { get; private set; } + internal string Value { get; private set; } + + private Parameter(string name, string value) + { + Name = name; + Value = value; + } + + internal static Parameter Of(string name, string value) + { + return new Parameter(name, value); + } + } + } + + internal enum ParameterType + { + Undefined, + Query, + Path, + Header + } +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config new file mode 100644 index 000000000000..e3401566e5d2 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/.openapi-generator/VERSION b/samples/server/petstore/nancyfx/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/nancyfx/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln new file mode 100644 index 000000000000..757078a1383c --- /dev/null +++ b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 000000000000..db083b73bdc7 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// Describes the result of uploading an image resource + /// + public sealed class ApiResponse: IEquatable + { + /// + /// Code + /// + public int? Code { get; private set; } + + /// + /// Type + /// + public string Type { get; private set; } + + /// + /// Message + /// + public string Message { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use ApiResponse.Builder() for instance creation instead. + /// + [Obsolete] + public ApiResponse() + { + } + + private ApiResponse(int? Code, string Type, string Message) + { + + this.Code = Code; + + this.Type = Type; + + this.Message = Message; + + } + + /// + /// Returns builder of ApiResponse. + /// + /// ApiResponseBuilder + public static ApiResponseBuilder Builder() + { + return new ApiResponseBuilder(); + } + + /// + /// Returns ApiResponseBuilder with properties set. + /// Use it to change properties. + /// + /// ApiResponseBuilder + public ApiResponseBuilder With() + { + return Builder() + .Code(Code) + .Type(Type) + .Message(Message); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(ApiResponse other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are equals, false otherwise + public static bool operator == (ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are not equals, false otherwise + public static bool operator != (ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + /// + /// Builder of ApiResponse. + /// + public sealed class ApiResponseBuilder + { + private int? _Code; + private string _Type; + private string _Message; + + internal ApiResponseBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for ApiResponse.Code property. + /// + /// Code + public ApiResponseBuilder Code(int? value) + { + _Code = value; + return this; + } + + /// + /// Sets value for ApiResponse.Type property. + /// + /// Type + public ApiResponseBuilder Type(string value) + { + _Type = value; + return this; + } + + /// + /// Sets value for ApiResponse.Message property. + /// + /// Message + public ApiResponseBuilder Message(string value) + { + _Message = value; + return this; + } + + + /// + /// Builds instance of ApiResponse. + /// + /// ApiResponse + public ApiResponse Build() + { + Validate(); + return new ApiResponse( + Code: _Code, + Type: _Type, + Message: _Message + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 000000000000..1bfb30abb752 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A category for a pet + /// + public sealed class Category: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Category.Builder() for instance creation instead. + /// + [Obsolete] + public Category() + { + } + + private Category(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Category. + /// + /// CategoryBuilder + public static CategoryBuilder Builder() + { + return new CategoryBuilder(); + } + + /// + /// Returns CategoryBuilder with properties set. + /// Use it to change properties. + /// + /// CategoryBuilder + public CategoryBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Category other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are equals, false otherwise + public static bool operator == (Category left, Category right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are not equals, false otherwise + public static bool operator != (Category left, Category right) + { + return !Equals(left, right); + } + + /// + /// Builder of Category. + /// + public sealed class CategoryBuilder + { + private long? _Id; + private string _Name; + + internal CategoryBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Category.Id property. + /// + /// Id + public CategoryBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Category.Name property. + /// + /// Name + public CategoryBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Category. + /// + /// Category + public Category Build() + { + Validate(); + return new Category( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 000000000000..7bdec1016958 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,247 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// An order for a pets from the pet store + /// + public sealed class Order: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// PetId + /// + public long? PetId { get; private set; } + + /// + /// Quantity + /// + public int? Quantity { get; private set; } + + /// + /// ShipDate + /// + public ZonedDateTime? ShipDate { get; private set; } + + /// + /// Order Status + /// + public StatusEnum? Status { get; private set; } + + /// + /// Complete + /// + public bool? Complete { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Order.Builder() for instance creation instead. + /// + [Obsolete] + public Order() + { + } + + private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) + { + + this.Id = Id; + + this.PetId = PetId; + + this.Quantity = Quantity; + + this.ShipDate = ShipDate; + + this.Status = Status; + + this.Complete = Complete; + + } + + /// + /// Returns builder of Order. + /// + /// OrderBuilder + public static OrderBuilder Builder() + { + return new OrderBuilder(); + } + + /// + /// Returns OrderBuilder with properties set. + /// Use it to change properties. + /// + /// OrderBuilder + public OrderBuilder With() + { + return Builder() + .Id(Id) + .PetId(PetId) + .Quantity(Quantity) + .ShipDate(ShipDate) + .Status(Status) + .Complete(Complete); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Order other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are equals, false otherwise + public static bool operator == (Order left, Order right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are not equals, false otherwise + public static bool operator != (Order left, Order right) + { + return !Equals(left, right); + } + + /// + /// Builder of Order. + /// + public sealed class OrderBuilder + { + private long? _Id; + private long? _PetId; + private int? _Quantity; + private ZonedDateTime? _ShipDate; + private StatusEnum? _Status; + private bool? _Complete; + + internal OrderBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + _Complete = false; + } + + /// + /// Sets value for Order.Id property. + /// + /// Id + public OrderBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Order.PetId property. + /// + /// PetId + public OrderBuilder PetId(long? value) + { + _PetId = value; + return this; + } + + /// + /// Sets value for Order.Quantity property. + /// + /// Quantity + public OrderBuilder Quantity(int? value) + { + _Quantity = value; + return this; + } + + /// + /// Sets value for Order.ShipDate property. + /// + /// ShipDate + public OrderBuilder ShipDate(ZonedDateTime? value) + { + _ShipDate = value; + return this; + } + + /// + /// Sets value for Order.Status property. + /// + /// Order Status + public OrderBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + /// + /// Sets value for Order.Complete property. + /// + /// Complete + public OrderBuilder Complete(bool? value) + { + _Complete = value; + return this; + } + + + /// + /// Builds instance of Order. + /// + /// Order + public Order Build() + { + Validate(); + return new Order( + Id: _Id, + PetId: _PetId, + Quantity: _Quantity, + ShipDate: _ShipDate, + Status: _Status, + Complete: _Complete + ); + } + + private void Validate() + { + } + } + + + public enum StatusEnum { Placed, Approved, Delivered }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 000000000000..a3f02e090883 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A pet for sale in the pet store + /// + public sealed class Pet: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Category + /// + public Category Category { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + /// + /// PhotoUrls + /// + public List PhotoUrls { get; private set; } + + /// + /// Tags + /// + public List Tags { get; private set; } + + /// + /// pet status in the store + /// + public StatusEnum? Status { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Pet.Builder() for instance creation instead. + /// + [Obsolete] + public Pet() + { + } + + private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) + { + + this.Id = Id; + + this.Category = Category; + + this.Name = Name; + + this.PhotoUrls = PhotoUrls; + + this.Tags = Tags; + + this.Status = Status; + + } + + /// + /// Returns builder of Pet. + /// + /// PetBuilder + public static PetBuilder Builder() + { + return new PetBuilder(); + } + + /// + /// Returns PetBuilder with properties set. + /// Use it to change properties. + /// + /// PetBuilder + public PetBuilder With() + { + return Builder() + .Id(Id) + .Category(Category) + .Name(Name) + .PhotoUrls(PhotoUrls) + .Tags(Tags) + .Status(Status); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Pet other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are equals, false otherwise + public static bool operator == (Pet left, Pet right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are not equals, false otherwise + public static bool operator != (Pet left, Pet right) + { + return !Equals(left, right); + } + + /// + /// Builder of Pet. + /// + public sealed class PetBuilder + { + private long? _Id; + private Category _Category; + private string _Name; + private List _PhotoUrls; + private List _Tags; + private StatusEnum? _Status; + + internal PetBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Pet.Id property. + /// + /// Id + public PetBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Pet.Category property. + /// + /// Category + public PetBuilder Category(Category value) + { + _Category = value; + return this; + } + + /// + /// Sets value for Pet.Name property. + /// + /// Name + public PetBuilder Name(string value) + { + _Name = value; + return this; + } + + /// + /// Sets value for Pet.PhotoUrls property. + /// + /// PhotoUrls + public PetBuilder PhotoUrls(List value) + { + _PhotoUrls = value; + return this; + } + + /// + /// Sets value for Pet.Tags property. + /// + /// Tags + public PetBuilder Tags(List value) + { + _Tags = value; + return this; + } + + /// + /// Sets value for Pet.Status property. + /// + /// pet status in the store + public PetBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + + /// + /// Builds instance of Pet. + /// + /// Pet + public Pet Build() + { + Validate(); + return new Pet( + Id: _Id, + Category: _Category, + Name: _Name, + PhotoUrls: _PhotoUrls, + Tags: _Tags, + Status: _Status + ); + } + + private void Validate() + { + if (_Name == null) + { + throw new ArgumentException("Name is a required property for Pet and cannot be null"); + } + if (_PhotoUrls == null) + { + throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); + } + } + } + + + public enum StatusEnum { Available, Pending, Sold }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 000000000000..7ce321d25114 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A tag for a pet + /// + public sealed class Tag: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Tag.Builder() for instance creation instead. + /// + [Obsolete] + public Tag() + { + } + + private Tag(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Tag. + /// + /// TagBuilder + public static TagBuilder Builder() + { + return new TagBuilder(); + } + + /// + /// Returns TagBuilder with properties set. + /// Use it to change properties. + /// + /// TagBuilder + public TagBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Tag other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are equals, false otherwise + public static bool operator == (Tag left, Tag right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are not equals, false otherwise + public static bool operator != (Tag left, Tag right) + { + return !Equals(left, right); + } + + /// + /// Builder of Tag. + /// + public sealed class TagBuilder + { + private long? _Id; + private string _Name; + + internal TagBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Tag.Id property. + /// + /// Id + public TagBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Tag.Name property. + /// + /// Name + public TagBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Tag. + /// + /// Tag + public Tag Build() + { + Validate(); + return new Tag( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 000000000000..04d33ca07f77 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A User who is purchasing from the pet store + /// + public sealed class User: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Username + /// + public string Username { get; private set; } + + /// + /// FirstName + /// + public string FirstName { get; private set; } + + /// + /// LastName + /// + public string LastName { get; private set; } + + /// + /// Email + /// + public string Email { get; private set; } + + /// + /// Password + /// + public string Password { get; private set; } + + /// + /// Phone + /// + public string Phone { get; private set; } + + /// + /// User Status + /// + public int? UserStatus { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use User.Builder() for instance creation instead. + /// + [Obsolete] + public User() + { + } + + private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) + { + + this.Id = Id; + + this.Username = Username; + + this.FirstName = FirstName; + + this.LastName = LastName; + + this.Email = Email; + + this.Password = Password; + + this.Phone = Phone; + + this.UserStatus = UserStatus; + + } + + /// + /// Returns builder of User. + /// + /// UserBuilder + public static UserBuilder Builder() + { + return new UserBuilder(); + } + + /// + /// Returns UserBuilder with properties set. + /// Use it to change properties. + /// + /// UserBuilder + public UserBuilder With() + { + return Builder() + .Id(Id) + .Username(Username) + .FirstName(FirstName) + .LastName(LastName) + .Email(Email) + .Password(Password) + .Phone(Phone) + .UserStatus(UserStatus); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(User other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are equals, false otherwise + public static bool operator == (User left, User right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are not equals, false otherwise + public static bool operator != (User left, User right) + { + return !Equals(left, right); + } + + /// + /// Builder of User. + /// + public sealed class UserBuilder + { + private long? _Id; + private string _Username; + private string _FirstName; + private string _LastName; + private string _Email; + private string _Password; + private string _Phone; + private int? _UserStatus; + + internal UserBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for User.Id property. + /// + /// Id + public UserBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for User.Username property. + /// + /// Username + public UserBuilder Username(string value) + { + _Username = value; + return this; + } + + /// + /// Sets value for User.FirstName property. + /// + /// FirstName + public UserBuilder FirstName(string value) + { + _FirstName = value; + return this; + } + + /// + /// Sets value for User.LastName property. + /// + /// LastName + public UserBuilder LastName(string value) + { + _LastName = value; + return this; + } + + /// + /// Sets value for User.Email property. + /// + /// Email + public UserBuilder Email(string value) + { + _Email = value; + return this; + } + + /// + /// Sets value for User.Password property. + /// + /// Password + public UserBuilder Password(string value) + { + _Password = value; + return this; + } + + /// + /// Sets value for User.Phone property. + /// + /// Phone + public UserBuilder Phone(string value) + { + _Phone = value; + return this; + } + + /// + /// Sets value for User.UserStatus property. + /// + /// User Status + public UserBuilder UserStatus(int? value) + { + _UserStatus = value; + return this; + } + + + /// + /// Builds instance of User. + /// + /// User + public User Build() + { + Validate(); + return new User( + Id: _Id, + Username: _Username, + FirstName: _FirstName, + LastName: _LastName, + Email: _Email, + Password: _Password, + Phone: _Phone, + UserStatus: _UserStatus + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs new file mode 100644 index 000000000000..9cdfe6b814e6 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs @@ -0,0 +1,246 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + /// + /// Status values that need to be considered for filter + /// + public enum FindPetsByStatusStatusEnum + { + available = 1, + pending = 2, + sold = 3 + }; + + + /// + /// Module processing requests of Pet domain. + /// + public sealed class PetModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public PetModule(PetService service) : base("/v2") + { + Post["/pet"] = parameters => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); + + service.AddPet(Context, pet); + return new Response { ContentType = ""}; + }; + + Delete["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); + + service.DeletePet(Context, petId, apiKey); + return new Response { ContentType = ""}; + }; + + Get["/pet/findByStatus"] = parameters => + { + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); + Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); + + return service.FindPetsByStatus(Context, status).ToArray(); + }; + + Get["/pet/findByTags"] = parameters => + { + var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); + Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); + + return service.FindPetsByTags(Context, tags).ToArray(); + }; + + Get["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); + + return service.GetPetById(Context, petId); + }; + + Put["/pet"] = parameters => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); + + service.UpdatePet(Context, pet); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); + + service.UpdatePetWithForm(Context, petId, name, status); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}/uploadImage"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); + var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); + + return service.UploadFile(Context, petId, additionalMetadata, file); + }; + } + } + + /// + /// Service handling Pet requests. + /// + public interface PetService + { + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + void AddPet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// Pet id to delete + /// (optional) + /// + void DeletePet(NancyContext context, long? petId, string apiKey); + + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Context of request + /// Status values that need to be considered for filter + /// List<Pet> + List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); + + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Context of request + /// Tags to filter by + /// List<Pet> + List FindPetsByTags(NancyContext context, List tags); + + /// + /// Returns a single pet + /// + /// Context of request + /// ID of pet to return + /// Pet + Pet GetPetById(NancyContext context, long? petId); + + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + void UpdatePet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) + /// + void UpdatePetWithForm(NancyContext context, long? petId, string name, string status); + + /// + /// + /// + /// Context of request + /// ID of pet to update + /// Additional data to pass to server (optional) + /// file to upload (optional) + /// ApiResponse + ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); + } + + /// + /// Abstraction of PetService. + /// + public abstract class AbstractPetService: PetService + { + public virtual void AddPet(NancyContext context, Pet pet) + { + AddPet(pet); + } + + public virtual void DeletePet(NancyContext context, long? petId, string apiKey) + { + DeletePet(petId, apiKey); + } + + public virtual List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) + { + return FindPetsByStatus(status); + } + + public virtual List FindPetsByTags(NancyContext context, List tags) + { + return FindPetsByTags(tags); + } + + public virtual Pet GetPetById(NancyContext context, long? petId) + { + return GetPetById(petId); + } + + public virtual void UpdatePet(NancyContext context, Pet pet) + { + UpdatePet(pet); + } + + public virtual void UpdatePetWithForm(NancyContext context, long? petId, string name, string status) + { + UpdatePetWithForm(petId, name, status); + } + + public virtual ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) + { + return UploadFile(petId, additionalMetadata, file); + } + + protected abstract void AddPet(Pet pet); + + protected abstract void DeletePet(long? petId, string apiKey); + + protected abstract List FindPetsByStatus(FindPetsByStatusStatusEnum? status); + + protected abstract List FindPetsByTags(List tags); + + protected abstract Pet GetPetById(long? petId); + + protected abstract void UpdatePet(Pet pet); + + protected abstract void UpdatePetWithForm(long? petId, string name, string status); + + protected abstract ApiResponse UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs new file mode 100644 index 000000000000..be42a7b8b520 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs @@ -0,0 +1,128 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of Store domain. + /// + public sealed class StoreModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public StoreModule(StoreService service) : base("/v2") + { + Delete["/store/order/{orderId}"] = parameters => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); + + service.DeleteOrder(Context, orderId); + return new Response { ContentType = ""}; + }; + + Get["/store/inventory"] = parameters => + { + + return service.GetInventory(Context); + }; + + Get["/store/order/{orderId}"] = parameters => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); + + return service.GetOrderById(Context, orderId); + }; + + Post["/store/order"] = parameters => + { + var order = this.Bind(); + Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); + + return service.PlaceOrder(Context, order); + }; + } + } + + /// + /// Service handling Store requests. + /// + public interface StoreService + { + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Context of request + /// ID of the order that needs to be deleted + /// + void DeleteOrder(NancyContext context, string orderId); + + /// + /// Returns a map of status codes to quantities + /// + /// Context of request + /// Dictionary<string, int?> + Dictionary GetInventory(NancyContext context); + + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// + /// Context of request + /// ID of pet that needs to be fetched + /// Order + Order GetOrderById(NancyContext context, long? orderId); + + /// + /// + /// + /// Context of request + /// order placed for purchasing the pet + /// Order + Order PlaceOrder(NancyContext context, Order order); + } + + /// + /// Abstraction of StoreService. + /// + public abstract class AbstractStoreService: StoreService + { + public virtual void DeleteOrder(NancyContext context, string orderId) + { + DeleteOrder(orderId); + } + + public virtual Dictionary GetInventory(NancyContext context) + { + return GetInventory(); + } + + public virtual Order GetOrderById(NancyContext context, long? orderId) + { + return GetOrderById(orderId); + } + + public virtual Order PlaceOrder(NancyContext context, Order order) + { + return PlaceOrder(order); + } + + protected abstract void DeleteOrder(string orderId); + + protected abstract Dictionary GetInventory(); + + protected abstract Order GetOrderById(long? orderId); + + protected abstract Order PlaceOrder(Order order); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs new file mode 100644 index 000000000000..c35bc62dae10 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs @@ -0,0 +1,233 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of User domain. + /// + public sealed class UserModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public UserModule(UserService service) : base("/v2") + { + Post["/user"] = parameters => + { + var user = this.Bind(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); + + service.CreateUser(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithArray"] = parameters => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); + + service.CreateUsersWithArrayInput(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithList"] = parameters => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); + + service.CreateUsersWithListInput(Context, user); + return new Response { ContentType = ""}; + }; + + Delete["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); + + service.DeleteUser(Context, username); + return new Response { ContentType = ""}; + }; + + Get["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); + + return service.GetUserByName(Context, username); + }; + + Get["/user/login"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); + var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); + + Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); + + return service.LoginUser(Context, username, password); + }; + + Get["/user/logout"] = parameters => + { + + service.LogoutUser(Context); + return new Response { ContentType = ""}; + }; + + Put["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + var user = this.Bind(); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); + + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); + + service.UpdateUser(Context, username, user); + return new Response { ContentType = ""}; + }; + } + } + + /// + /// Service handling User requests. + /// + public interface UserService + { + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// Created user object + /// + void CreateUser(NancyContext context, User user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + void CreateUsersWithArrayInput(NancyContext context, List user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + void CreateUsersWithListInput(NancyContext context, List user); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// The name that needs to be deleted + /// + void DeleteUser(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The name that needs to be fetched. Use user1 for testing. + /// User + User GetUserByName(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The user name for login + /// The password for login in clear text + /// string + string LoginUser(NancyContext context, string username, string password); + + /// + /// + /// + /// Context of request + /// + void LogoutUser(NancyContext context); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// name that need to be deleted + /// Updated user object + /// + void UpdateUser(NancyContext context, string username, User user); + } + + /// + /// Abstraction of UserService. + /// + public abstract class AbstractUserService: UserService + { + public virtual void CreateUser(NancyContext context, User user) + { + CreateUser(user); + } + + public virtual void CreateUsersWithArrayInput(NancyContext context, List user) + { + CreateUsersWithArrayInput(user); + } + + public virtual void CreateUsersWithListInput(NancyContext context, List user) + { + CreateUsersWithListInput(user); + } + + public virtual void DeleteUser(NancyContext context, string username) + { + DeleteUser(username); + } + + public virtual User GetUserByName(NancyContext context, string username) + { + return GetUserByName(username); + } + + public virtual string LoginUser(NancyContext context, string username, string password) + { + return LoginUser(username, password); + } + + public virtual void LogoutUser(NancyContext context) + { + LogoutUser(); + } + + public virtual void UpdateUser(NancyContext context, string username, User user) + { + UpdateUser(username, user); + } + + protected abstract void CreateUser(User user); + + protected abstract void CreateUsersWithArrayInput(List user); + + protected abstract void CreateUsersWithListInput(List user); + + protected abstract void DeleteUser(string username); + + protected abstract User GetUserByName(string username); + + protected abstract string LoginUser(string username, string password); + + protected abstract void LogoutUser(); + + protected abstract void UpdateUser(string username, User user); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj new file mode 100644 index 000000000000..04b710b25cbd --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + {768B8DC6-54EE-4D40-9B20-7857E1D742A4} + Library + Properties + Org.OpenAPITools.v2 + Org.OpenAPITools + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Org.OpenAPITools.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\Org.OpenAPITools.XML + + + + ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + True + + + ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll + True + + + ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll + True + + + ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec new file mode 100644 index 000000000000..102c48def9d8 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -0,0 +1,13 @@ + + + + Org.OpenAPITools + Org.OpenAPITools + 1.0.0 + openapi-generator + openapi-generator + false + NancyFx Org.OpenAPITools API + http://www.apache.org/licenses/LICENSE-2.0.html + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs new file mode 100644 index 000000000000..9e7cfd8a8570 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs @@ -0,0 +1,55 @@ +using Nancy.Bootstrapper; +using Nancy.Json; +using NodaTime; +using NodaTime.Text; +using System; +using System.Collections.Generic; + +namespace Org.OpenAPITools.v2.Utils +{ + /// + /// (De)serializes a to a string using + /// the RFC3339 + /// full-date format. + /// + public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup + { + public override IEnumerable SupportedTypes + { + get + { + yield return typeof(LocalDate); + yield return typeof(LocalDate?); + } + } + + public void Initialize(IPipelines pipelines) + { + JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); + } + + + public override object Serialize(object obj, JavaScriptSerializer serializer) + { + if (obj is LocalDate) + { + LocalDate localDate = (LocalDate)obj; + return LocalDatePattern.IsoPattern.Format(localDate); + } + return null; + } + + public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) + { + if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) + { + try + { + return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); + } + catch { } + } + return null; + } + } +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs new file mode 100644 index 000000000000..9bc5408abfea --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Nancy; +using NodaTime; +using NodaTime.Text; +using Sharpility.Base; +using Sharpility.Extensions; +using Sharpility.Util; + +namespace Org.OpenAPITools.v2.Utils +{ + internal static class Parameters + { + private static readonly IDictionary> Parsers = CreateParsers(); + + internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + var valueType = typeof(TValue); + var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); + var isNullable = default(TValue) == null; + string value = RawValueOf(parameters, request, name, parameterType); + Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); + if (value == null && isNullable) + { + return default(TValue); + } + if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) + { + return EnumValueOf(name, value); + } + return ValueOf(parameters, name, value, valueType, request, parameterType); + } + + private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + try + { + switch (parameterType) + { + case ParameterType.Query: + string querValue = request.Query[name]; + return querValue; + case ParameterType.Path: + string pathValue = parameters[name]; + return pathValue; + case ParameterType.Header: + var headerValue = request.Headers[name]; + return headerValue != null ? string.Join(",", headerValue) : null; + } + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); + } + throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); + } + + private static TValue EnumValueOf(string name, string value) + { + var valueType = typeof(TValue); + var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); + Preconditions.IsNotNull(enumType, () => new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); + var values = Enum.GetValues(enumType); + foreach (var entry in values) + { + if (entry.ToString().EqualsIgnoreCases(value) + || ((int)entry).ToString().EqualsIgnoreCases(value)) + { + return (TValue)entry; + } + } + throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", + name, value, Strings.ToString(values))); + } + + private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) + { + var parser = Parsers.GetIfPresent(valueType); + if (parser != null) + { + return ParseValueUsing(name, value, valueType, parser); + } + if (parameterType == ParameterType.Path) + { + return DynamicValueOf(parameters, name); + } + if (parameterType == ParameterType.Query) + { + return DynamicValueOf(request.Query, name); + } + throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); + } + + private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) + { + var result = parser(Parameter.Of(name, value)); + try + { + return (TValue)result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + + "Received: '{2}', expected: '{3}'.", + name, value, result.GetType(), valueType)); + } + } + + private static TValue DynamicValueOf(dynamic parameters, string name) + { + string value = parameters[name]; + try + { + TValue result = parameters[name]; + return result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + + "Expected type: '{2}' is not supported", + name, value, typeof(TValue))); + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", + name, typeof(TValue)), e); + } + } + + private static IDictionary> CreateParsers() + { + var parsers = ImmutableDictionary.CreateBuilder>(); + parsers.Put(typeof(string), value => value.Value); + parsers.Put(typeof(bool), SafeParse(bool.Parse)); + parsers.Put(typeof(bool?), SafeParse(bool.Parse)); + parsers.Put(typeof(byte), SafeParse(byte.Parse)); + parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); + parsers.Put(typeof(short), SafeParse(short.Parse)); + parsers.Put(typeof(short?), SafeParse(short.Parse)); + parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); + parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); + parsers.Put(typeof(int), SafeParse(int.Parse)); + parsers.Put(typeof(int?), SafeParse(int.Parse)); + parsers.Put(typeof(uint), SafeParse(uint.Parse)); + parsers.Put(typeof(uint?), SafeParse(uint.Parse)); + parsers.Put(typeof(long), SafeParse(long.Parse)); + parsers.Put(typeof(long?), SafeParse(long.Parse)); + parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); + parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); + parsers.Put(typeof(float), SafeParse(float.Parse)); + parsers.Put(typeof(float?), SafeParse(float.Parse)); + parsers.Put(typeof(double), SafeParse(double.Parse)); + parsers.Put(typeof(double?), SafeParse(double.Parse)); + parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); + parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); + parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); + parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); + parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); + parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(List), ListParse(byte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); + parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(List), ListParse(sbyte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); + parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); + parsers.Put(typeof(List), ListParse(short.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); + parsers.Put(typeof(HashSet), SetParse(short.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(List), ListParse(ushort.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); + parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(List), ListParse(uint.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); + parsers.Put(typeof(HashSet), SetParse(uint.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(List), ListParse(ulong.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); + parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); + parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); + + return parsers.ToImmutableDictionary(); + } + + private static Func SafeParse(Func parse) + { + return parameter => + { + try + { + return parse(parameter.Value); + } + catch (OverflowException) + { + throw ParameterOutOfRange(parameter, typeof(T)); + } + catch (FormatException) + { + throw InvalidParameterFormat(parameter, typeof(T)); + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", + parameter.Name, parameter.Value, typeof(T)), e); + } + }; + } + + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + + private static Func ListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new List(); + } + return ParseCollection(parameter.Value, itemParser).ToList(); + }; + } + + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Lists.EmptyList(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); + }; + } + + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + + private static Func SetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new HashSet(); + } + return ParseCollection(parameter.Value, itemParser).ToSet(); + }; + } + + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableSetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Sets.EmptySet(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); + }; + } + + private static ZonedDateTime ParseZonedDateTime(string value) + { + var dateTime = DateTime.Parse(value); + return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); + } + + private static LocalDate ParseLocalDate(string value) + { + return LocalDatePattern.IsoPattern.Parse(value).Value; + } + + private static LocalTime ParseLocalTime(string value) + { + return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; + } + + private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + + private class Parameter + { + internal string Name { get; private set; } + internal string Value { get; private set; } + + private Parameter(string name, string value) + { + Name = name; + Value = value; + } + + internal static Parameter Of(string name, string value) + { + return new Parameter(name, value); + } + } + } + + internal enum ParameterType + { + Undefined, + Query, + Path, + Header + } +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config new file mode 100644 index 000000000000..e3401566e5d2 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml index 8a31b8d5b865..877989080caf 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml +++ b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,29 +27,23 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + x-swagger-router-controller: Pet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -61,118 +51,152 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + x-swagger-router-controller: Pet + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + x-swagger-router-controller: Pet + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: Finds Pets by tags + tags: + - pet + x-swagger-router-controller: Pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-swagger-router-controller: Pet + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -180,148 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - x-openapi-router-controller: Pet - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-swagger-router-controller: Pet + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet + x-swagger-router-controller: Pet /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: uploads an image + tags: + - pet + x-swagger-router-controller: Pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - x-openapi-router-controller: Store - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + x-swagger-router-controller: Store + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -329,30 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} - x-openapi-router-controller: Store + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-swagger-router-controller: Store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-swagger-router-controller: Store + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -360,164 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - x-openapi-router-controller: Store - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} - x-openapi-router-controller: Store + x-swagger-router-controller: Store /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + x-swagger-router-controller: User + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - x-openapi-router-controller: User - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + x-swagger-router-controller: User + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} - x-openapi-router-controller: User + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-swagger-router-controller: User /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-swagger-router-controller: User + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -525,122 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + x-swagger-router-controller: User + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} - x-openapi-router-controller: User + x-swagger-router-controller: User components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -654,116 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/nodejs/.openapi-generator/VERSION b/samples/server/petstore/nodejs/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/nodejs/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs/api/openapi.yaml b/samples/server/petstore/nodejs/api/openapi.yaml index 8a31b8d5b865..877989080caf 100644 --- a/samples/server/petstore/nodejs/api/openapi.yaml +++ b/samples/server/petstore/nodejs/api/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,29 +27,23 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + x-swagger-router-controller: Pet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -61,118 +51,152 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + x-swagger-router-controller: Pet + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + x-swagger-router-controller: Pet + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: Finds Pets by tags + tags: + - pet + x-swagger-router-controller: Pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-swagger-router-controller: Pet + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -180,148 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - x-openapi-router-controller: Pet - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-swagger-router-controller: Pet + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet + x-swagger-router-controller: Pet /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: uploads an image + tags: + - pet + x-swagger-router-controller: Pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - x-openapi-router-controller: Store - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + x-swagger-router-controller: Store + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -329,30 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} - x-openapi-router-controller: Store + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-swagger-router-controller: Store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-swagger-router-controller: Store + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -360,164 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - x-openapi-router-controller: Store - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} - x-openapi-router-controller: Store + x-swagger-router-controller: Store /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + x-swagger-router-controller: User + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - x-openapi-router-controller: User - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + x-swagger-router-controller: User + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} - x-openapi-router-controller: User + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-swagger-router-controller: User /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-swagger-router-controller: User + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -525,122 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + x-swagger-router-controller: User + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} - x-openapi-router-controller: User + x-swagger-router-controller: User components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -654,116 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/php-silex/.openapi-generator/VERSION b/samples/server/petstore/php-silex/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/php-silex/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rails5/.openapi-generator/VERSION b/samples/server/petstore/rails5/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/rails5/.openapi-generator/VERSION +++ b/samples/server/petstore/rails5/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/.openapi-generator/VERSION b/samples/server/petstore/rust-server/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/rust-server/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/README.md b/samples/server/petstore/scala-lagom-server/README.md index 938d7331cb7d..e80ddccb7e17 100644 --- a/samples/server/petstore/scala-lagom-server/README.md +++ b/samples/server/petstore/scala-lagom-server/README.md @@ -1,9 +1,9 @@ -# Swagger generated scala-lagomApi +# OpenAPI generated scala-lagomApi ## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the -[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This -is an example of building a swagger-enabled lagon-api. +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled lagon-api. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. diff --git a/samples/server/petstore/scala-lagom-server/build.sbt b/samples/server/petstore/scala-lagom-server/build.sbt index ea9dd5789f03..b6ab43cf17b3 100644 --- a/samples/server/petstore/scala-lagom-server/build.sbt +++ b/samples/server/petstore/scala-lagom-server/build.sbt @@ -2,7 +2,7 @@ version := "1.0.0" name := "scala-lagom-server" -organization := "io.swagger" +organization := "org.openapitools" scalaVersion := "2.11.8" diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index 6ee03b22acac..fea6ba05311d 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index ff42a995e9ae..a5b3b3dd8b30 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala index b62b48d87504..c78d28fc86dd 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -75,7 +75,7 @@ trait UserApi extends Service { * Get user by user name * * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName(username: String): ServiceCall[NotUsed ,User] diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala index 884853e5c25b..38f3bd8aa3d1 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -15,7 +15,7 @@ import play.api.libs.json._ case class ApiResponse ( code: Option[Int], - _type: Option[String], + `type`: Option[String], message: Option[String] ) diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala index c50c6e71c64d..5b058bb51d67 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala index c79ffb780e54..a40c7585cfa0 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala index acc6c25afc38..59c9446ee779 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala index 65aa9c628bcd..0155bfed72c8 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala index b21cd2e7e770..75a835cb7944 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scalatra/.openapi-generator/VERSION b/samples/server/petstore/scalatra/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/scalatra/.openapi-generator/VERSION +++ b/samples/server/petstore/scalatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/.openapi-generator/VERSION b/samples/server/petstore/sinatra/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/openapi.yaml b/samples/server/petstore/sinatra/openapi.yaml index 01e572ba924f..c0b60f85ddeb 100644 --- a/samples/server/petstore/sinatra/openapi.yaml +++ b/samples/server/petstore/sinatra/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,28 +27,22 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -60,115 +50,148 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -176,143 +199,118 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -320,29 +318,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -350,157 +368,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -508,119 +526,111 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -634,116 +644,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/undertow/.openapi-generator/VERSION b/samples/server/petstore/undertow/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/undertow/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/undertow/src/main/resources/config/openapi.json b/samples/server/petstore/undertow/src/main/resources/config/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/undertow/src/main/resources/config/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", From 3b15c3d9c3ea01a898546dfa4f8b703fc5114398 Mon Sep 17 00:00:00 2001 From: grokify Date: Tue, 26 Jun 2018 20:34:44 -0700 Subject: [PATCH 09/18] update samples --- .../api/impl/PetApiServiceImpl.java | 10 +++++++ .../openapitools/api/AnotherFakeApiTest.java | 10 +++---- .../org/openapitools/api/FakeApiTest.java | 16 +++++------ .../api/FakeClassnameTags123ApiTest.java | 10 +++---- .../java/org/openapitools/api/PetApiTest.java | 28 +++++++++++++++---- .../org/openapitools/api/StoreApiTest.java | 10 +++---- .../org/openapitools/api/UserApiTest.java | 10 +++---- 7 files changed, 61 insertions(+), 33 deletions(-) diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 5b48303cc587..ca3e7093ff1e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -111,5 +111,15 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attac return null; } + /** + * uploads an image + * + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment fileDetail, String additionalMetadata) { + // TODO: Implement... + + return null; + } + } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java index 79ec92b357f1..210ea87532bd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index 56a239eebf86..e3e9186319e8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,7 +54,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * @@ -84,8 +84,8 @@ public void setup() { */ @Test public void fakeOuterBooleanSerializeTest() { - Boolean booleanPostBody = null; - //Boolean response = api.fakeOuterBooleanSerialize(booleanPostBody); + Boolean body = null; + //Boolean response = api.fakeOuterBooleanSerialize(body); //assertNotNull(response); // TODO: test validations @@ -231,7 +231,7 @@ public void testEnumParametersTest() { */ @Test public void testInlineAdditionalPropertiesTest() { - String requestBody = null; + Map requestBody = null; //api.testInlineAdditionalProperties(requestBody); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java index c798a9e7b716..63a8e61733a0 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java index 8dd432fed9c4..8b0f3f9560f3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,7 +49,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * @@ -212,4 +212,22 @@ public void uploadFileTest() { } + /** + * uploads an image + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() { + Long petId = null; + org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; + String additionalMetadata = null; + //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, file, additionalMetadata); + //assertNotNull(response); + // TODO: test validations + + + } + } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java index eebc070db508..c2d3a5783686 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java index 27e54fe390a5..147227059eac 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * From 2c6791c7e6f7a7153c00eb9a8ad646c35e96d536 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 01:59:30 -0700 Subject: [PATCH 10/18] update samples run-all-petstore --- .../petstore/R/.openapi-generator/VERSION | 2 +- .../petstore/ada/.openapi-generator/VERSION | 2 +- .../src/client/samples-petstore-clients.adb | 77 +- .../src/client/samples-petstore-clients.ads | 30 +- .../ada/src/model/samples-petstore-models.adb | 10 +- .../ada/src/model/samples-petstore-models.ads | 12 +- .../petstore/ada/src/samples-petstore.ads | 8 +- samples/client/petstore/ada/src/samples.ads | 8 +- .../httpclient/.openapi-generator/VERSION | 2 +- .../android/httpclient/docs/PetApi.md | 8 +- .../android/volley/.openapi-generator/VERSION | 2 +- .../petstore/android/volley/docs/PetApi.md | 8 +- .../petstore/apex/.openapi-generator/VERSION | 2 +- .../petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/README.md | 1 + samples/client/petstore/bash/_petstore-cli | 10 +- samples/client/petstore/bash/docs/FakeApi.md | 2 +- samples/client/petstore/bash/docs/PetApi.md | 33 + samples/client/petstore/bash/petstore-cli | 68 + .../bash/petstore-cli.bash-completion | 2 + .../clojure/.openapi-generator/VERSION | 2 +- .../clojure/src/open_api_petstore/api/pet.clj | 4 +- .../cpp-qt5/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-qt5/client/OAIPet.h | 4 +- .../petstore/cpp-qt5/client/OAIPetApi.h | 4 +- .../petstore/cpp-qt5/client/OAIStoreApi.h | 2 +- .../petstore/cpp-qt5/client/OAIUserApi.h | 2 +- .../cpp-restsdk/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-restsdk/ApiClient.cpp | 2 +- .../client/petstore/cpp-restsdk/ApiClient.h | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.cpp | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.h | 2 +- .../petstore/cpp-restsdk/ApiException.cpp | 2 +- .../petstore/cpp-restsdk/ApiException.h | 2 +- .../petstore/cpp-restsdk/HttpContent.cpp | 2 +- .../client/petstore/cpp-restsdk/HttpContent.h | 2 +- .../client/petstore/cpp-restsdk/IHttpBody.h | 2 +- .../client/petstore/cpp-restsdk/JsonBody.cpp | 2 +- .../client/petstore/cpp-restsdk/JsonBody.h | 2 +- .../client/petstore/cpp-restsdk/ModelBase.cpp | 2 +- .../client/petstore/cpp-restsdk/ModelBase.h | 2 +- .../cpp-restsdk/MultipartFormData.cpp | 2 +- .../petstore/cpp-restsdk/MultipartFormData.h | 4 +- .../client/petstore/cpp-restsdk/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/Object.h | 2 +- .../petstore/cpp-restsdk/api/PetApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/PetApi.h | 2 +- .../petstore/cpp-restsdk/api/StoreApi.cpp | 2 +- .../petstore/cpp-restsdk/api/StoreApi.h | 2 +- .../petstore/cpp-restsdk/api/UserApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/UserApi.h | 2 +- .../cpp-restsdk/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restsdk/model/ApiResponse.h | 2 +- .../petstore/cpp-restsdk/model/Category.cpp | 2 +- .../petstore/cpp-restsdk/model/Category.h | 2 +- .../petstore/cpp-restsdk/model/Order.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Order.h | 2 +- .../client/petstore/cpp-restsdk/model/Pet.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Pet.h | 2 +- .../client/petstore/cpp-restsdk/model/Tag.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Tag.h | 2 +- .../petstore/cpp-restsdk/model/User.cpp | 2 +- .../client/petstore/cpp-restsdk/model/User.h | 2 +- .../cpp-tizen/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-tizen/doc/Doxyfile | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/README.md | 1 + .../csharp/OpenAPIClient/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClient/docs/PetApi.md | 67 + .../Org.OpenAPITools.Test.csproj | 6 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet35/README.md | 1 + .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet35/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 107 ++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet40/README.md | 1 + .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet40/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 107 ++ .../.openapi-generator/VERSION | 2 +- .../OpenAPIClientNetCoreProject/README.md | 1 + .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNetStandard/README.md | 1 + .../OpenAPIClientNetStandard/docs/FakeApi.md | 4 +- .../OpenAPIClientNetStandard/docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../.openapi-generator/VERSION | 2 +- .../README.md | 1 + .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 + .../src/Org.OpenAPITools/Api/PetApi.cs | 215 +++ .../openapi/.openapi-generator/VERSION | 2 +- .../swagger/.analysis_options | 2 + .../dart/flutter_petstore/swagger/.gitignore | 27 + .../swagger/.openapi-generator-ignore | 23 + .../swagger/.openapi-generator/VERSION | 1 + .../dart/flutter_petstore/swagger/README.md | 121 ++ .../swagger/docs/ApiResponse.md | 17 + .../flutter_petstore/swagger/docs/Category.md | 16 + .../flutter_petstore/swagger/docs/Order.md | 20 + .../dart/flutter_petstore/swagger/docs/Pet.md | 20 + .../flutter_petstore/swagger/docs/PetApi.md | 379 ++++ .../flutter_petstore/swagger/docs/StoreApi.md | 186 ++ .../dart/flutter_petstore/swagger/docs/Tag.md | 16 + .../flutter_petstore/swagger/docs/User.md | 22 + .../flutter_petstore/swagger/docs/UserApi.md | 349 ++++ .../dart/flutter_petstore/swagger/git_push.sh | 52 + .../flutter_petstore/swagger/lib/api.dart | 27 + .../swagger/lib/api/pet_api.dart | 432 +++++ .../swagger/lib/api/store_api.dart | 207 ++ .../swagger/lib/api/user_api.dart | 409 ++++ .../swagger/lib/api_client.dart | 160 ++ .../swagger/lib/api_exception.dart | 23 + .../swagger/lib/api_helper.dart | 44 + .../swagger/lib/auth/api_key_auth.dart | 27 + .../swagger/lib/auth/authentication.dart | 7 + .../swagger/lib/auth/http_basic_auth.dart | 14 + .../swagger/lib/auth/oauth.dart | 19 + .../swagger/lib/model/api_response.dart | 44 + .../swagger/lib/model/category.dart | 40 + .../swagger/lib/model/order.dart | 57 + .../swagger/lib/model/pet.dart | 57 + .../swagger/lib/model/tag.dart | 40 + .../swagger/lib/model/user.dart | 64 + .../flutter_petstore/swagger/pubspec.yaml | 5 + .../.openapi-generator/VERSION | 2 +- .../dart/openapi/.openapi-generator/VERSION | 2 +- .../petstore/eiffel/.openapi-generator-ignore | 23 + .../eiffel/.openapi-generator/VERSION | 2 +- samples/client/petstore/eiffel/README.md | 1 + samples/client/petstore/eiffel/api_client.ecf | 2 +- .../client/petstore/eiffel/docs/FAKE_API.md | 2 +- .../client/petstore/eiffel/docs/PET_API.md | 31 + .../client/petstore/eiffel/src/api/fake_api.e | 2 +- .../client/petstore/eiffel/src/api/pet_api.e | 46 + .../serialization/api_json_deserializer.e | 2 +- .../client/petstore/eiffel/test/api_test.ecf | 2 +- .../petstore/elixir/.openapi-generator-ignore | 23 + .../elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/elixir/config/config.exs | 4 +- .../elixir/lib/openapi_petstore/api/fake.ex | 2 +- .../elixir/lib/openapi_petstore/api/pet.ex | 30 + .../elixir/lib/openapi_petstore/connection.ex | 2 +- .../petstore/elm/.openapi-generator/VERSION | 2 +- .../erlang-client/.openapi-generator/VERSION | 2 +- .../petstore/flash/.openapi-generator/VERSION | 2 +- samples/client/petstore/flash/flash/build.xml | 6 +- .../org/openapitools/event/ApiClientEvent.as | 4 +- .../petstore/go/go-petstore-withXml/README.md | 1 + .../go/go-petstore-withXml/api/openapi.yaml | 40 + .../go/go-petstore-withXml/api_pet.go | 103 + .../go/go-petstore-withXml/docs/PetApi.md | 38 + .../groovy/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/README.md | 4 +- .../lib/OpenAPIPetstore.hs | 2 +- .../lib/OpenAPIPetstore/API.hs | 2 +- .../lib/OpenAPIPetstore/API/AnotherFake.hs | 2 +- .../lib/OpenAPIPetstore/API/Fake.hs | 75 +- .../API/FakeClassnameTags123.hs | 2 +- .../lib/OpenAPIPetstore/API/Pet.hs | 34 +- .../lib/OpenAPIPetstore/API/Store.hs | 14 +- .../lib/OpenAPIPetstore/API/User.hs | 50 +- .../lib/OpenAPIPetstore/Client.hs | 2 +- .../lib/OpenAPIPetstore/Core.hs | 2 +- .../lib/OpenAPIPetstore/Logging.hs | 2 +- .../lib/OpenAPIPetstore/MimeTypes.hs | 2 +- .../lib/OpenAPIPetstore/Model.hs | 5 +- .../lib/OpenAPIPetstore/ModelLens.hs | 2 +- .../openapi-petstore.cabal | 2 +- .../petstore/haskell-http-client/openapi.yaml | 1663 +++++++++-------- .../.openapi-generator/VERSION | 2 +- .../javascript-es6/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/README.md | 1 + .../petstore/javascript-es6/docs/PetApi.md | 52 + .../petstore/javascript-es6/src/api/PetApi.js | 56 + .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/README.md | 1 + .../javascript-promise-es6/docs/PetApi.md | 51 + .../javascript-promise-es6/src/api/PetApi.js | 63 + .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise/README.md | 1 + .../javascript-promise/docs/PetApi.md | 50 + .../javascript-promise/src/ApiClient.js | 2 +- .../src/api/AnotherFakeApi.js | 2 +- .../javascript-promise/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../javascript-promise/src/api/PetApi.js | 67 +- .../javascript-promise/src/api/StoreApi.js | 2 +- .../javascript-promise/src/api/UserApi.js | 2 +- .../petstore/javascript-promise/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/Animal.js | 2 +- .../src/model/AnimalFarm.js | 2 +- .../src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../src/model/ArrayOfNumberOnly.js | 2 +- .../javascript-promise/src/model/ArrayTest.js | 2 +- .../src/model/Capitalization.js | 2 +- .../javascript-promise/src/model/Cat.js | 2 +- .../javascript-promise/src/model/Category.js | 2 +- .../src/model/ClassModel.js | 2 +- .../javascript-promise/src/model/Client.js | 2 +- .../javascript-promise/src/model/Dog.js | 2 +- .../src/model/EnumArrays.js | 2 +- .../javascript-promise/src/model/EnumClass.js | 2 +- .../javascript-promise/src/model/EnumTest.js | 2 +- .../src/model/FormatTest.js | 2 +- .../src/model/HasOnlyReadOnly.js | 2 +- .../javascript-promise/src/model/List.js | 2 +- .../javascript-promise/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../src/model/Model200Response.js | 2 +- .../src/model/ModelReturn.js | 2 +- .../javascript-promise/src/model/Name.js | 2 +- .../src/model/NumberOnly.js | 2 +- .../javascript-promise/src/model/Order.js | 2 +- .../src/model/OuterComposite.js | 2 +- .../javascript-promise/src/model/OuterEnum.js | 2 +- .../javascript-promise/src/model/Pet.js | 2 +- .../src/model/ReadOnlyFirst.js | 2 +- .../src/model/SpecialModelName.js | 2 +- .../javascript-promise/src/model/Tag.js | 2 +- .../javascript-promise/src/model/User.js | 2 +- .../javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/README.md | 1 + .../client/petstore/javascript/docs/PetApi.md | 52 + .../petstore/javascript/src/ApiClient.js | 2 +- .../javascript/src/api/AnotherFakeApi.js | 2 +- .../petstore/javascript/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../petstore/javascript/src/api/PetApi.js | 60 +- .../petstore/javascript/src/api/StoreApi.js | 2 +- .../petstore/javascript/src/api/UserApi.js | 2 +- .../client/petstore/javascript/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../petstore/javascript/src/model/Animal.js | 2 +- .../javascript/src/model/AnimalFarm.js | 2 +- .../javascript/src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayTest.js | 2 +- .../javascript/src/model/Capitalization.js | 2 +- .../petstore/javascript/src/model/Cat.js | 2 +- .../petstore/javascript/src/model/Category.js | 2 +- .../javascript/src/model/ClassModel.js | 2 +- .../petstore/javascript/src/model/Client.js | 2 +- .../petstore/javascript/src/model/Dog.js | 2 +- .../javascript/src/model/EnumArrays.js | 2 +- .../javascript/src/model/EnumClass.js | 2 +- .../petstore/javascript/src/model/EnumTest.js | 2 +- .../javascript/src/model/FormatTest.js | 2 +- .../javascript/src/model/HasOnlyReadOnly.js | 2 +- .../petstore/javascript/src/model/List.js | 2 +- .../petstore/javascript/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../javascript/src/model/Model200Response.js | 2 +- .../javascript/src/model/ModelReturn.js | 2 +- .../petstore/javascript/src/model/Name.js | 2 +- .../javascript/src/model/NumberOnly.js | 2 +- .../petstore/javascript/src/model/Order.js | 2 +- .../javascript/src/model/OuterComposite.js | 2 +- .../javascript/src/model/OuterEnum.js | 2 +- .../petstore/javascript/src/model/Pet.js | 2 +- .../javascript/src/model/ReadOnlyFirst.js | 2 +- .../javascript/src/model/SpecialModelName.js | 2 +- .../petstore/javascript/src/model/Tag.js | 2 +- .../petstore/javascript/src/model/User.js | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/Order.java | 1 - .../gen/java/org/openapitools/model/Pet.java | 1 - .../petstore/lua/.openapi-generator/VERSION | 2 +- .../objc/core-data/.openapi-generator/VERSION | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../objc/default/.openapi-generator/VERSION | 2 +- .../default/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../petstore/perl/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/README.md | 1 + samples/client/petstore/perl/docs/FakeApi.md | 2 +- samples/client/petstore/perl/docs/PetApi.md | 52 + .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 95 + .../powershell/.openapi-generator/VERSION | 2 +- .../python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/README.md | 1 + .../petstore/python-asyncio/docs/PetApi.md | 55 + .../petstore_api/api/pet_api.py | 109 ++ .../python-asyncio/petstore_api/api_client.py | 2 +- .../python-tornado/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/README.md | 1 + .../petstore/python-tornado/docs/PetApi.md | 55 + .../petstore_api/api/pet_api.py | 109 ++ .../python-tornado/petstore_api/api_client.py | 2 +- .../python/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/README.md | 1 + samples/client/petstore/python/docs/PetApi.md | 55 + .../python/petstore_api/api/pet_api.py | 109 ++ .../python/petstore_api/api_client.py | 2 +- .../petstore/rust/.openapi-generator/VERSION | 2 +- .../scala-akka/.openapi-generator/VERSION | 2 +- .../scala-gatling/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../scalaz/.openapi-generator/VERSION | 2 +- .../swift/default/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../swift/rxswift/.openapi-generator/VERSION | 2 +- .../swift3/default/.openapi-generator/VERSION | 2 +- .../objcCompatible/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../swift3/rxswift/.openapi-generator/VERSION | 2 +- .../unwraprequired/.openapi-generator/VERSION | 2 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../objcCompatible/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../promisekit/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 66 + .../swift4/rxswift/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 68 + .../unwrapRequired/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 + .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../with-interfaces/README.md | 18 +- .../npm/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../builds/es6-target/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/api/PetApi.ts | 42 +- .../typescript-jquery/default/api/StoreApi.ts | 24 +- .../typescript-jquery/default/api/UserApi.ts | 72 +- .../typescript-jquery/default/git_push.sh | 2 +- .../default/model/ApiResponse.ts | 10 +- .../default/model/Category.ts | 10 +- .../typescript-jquery/default/model/Order.ts | 10 +- .../typescript-jquery/default/model/Pet.ts | 10 +- .../typescript-jquery/default/model/Tag.ts | 10 +- .../typescript-jquery/default/model/User.ts | 10 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/README.md | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/api.ts | 22 +- .../petstore/typescript-node/npm/package.json | 7 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../test/swift4/default/TestClient.podspec | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 65 + .../TestClient/Classes/OpenAPIs/APIs.swift | 61 + .../Classes/OpenAPIs/APIs/Swift4TestAPI.swift | 49 + .../OpenAPIs/AlamofireImplementations.swift | 413 ++++ .../Classes/OpenAPIs/CodableHelper.swift | 67 + .../Classes/OpenAPIs/Configuration.swift | 15 + .../Classes/OpenAPIs/Extensions.swift | 173 ++ .../OpenAPIs/JSONEncodableEncoding.swift | 54 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 43 + .../TestClient/Classes/OpenAPIs/Models.swift | 36 + .../OpenAPIs/Models/AllPrimitives.swift | 76 + .../Classes/OpenAPIs/Models/BaseCard.swift | 23 + .../Classes/OpenAPIs/Models/ErrorInfo.swift | 27 + .../OpenAPIs/Models/GetAllModelsResult.swift | 27 + .../OpenAPIs/Models/ModelDoubleArray.swift | 12 + .../OpenAPIs/Models/ModelErrorInfoArray.swift | 12 + .../OpenAPIs/Models/ModelStringArray.swift | 12 + .../Classes/OpenAPIs/Models/PersonCard.swift | 27 + .../Classes/OpenAPIs/Models/PlaceCard.swift | 27 + .../Classes/OpenAPIs/Models/SampleBase.swift | 25 + .../OpenAPIs/Models/SampleSubClass.swift | 29 + .../Classes/OpenAPIs/Models/StringEnum.swift | 15 + .../OpenAPIs/Models/VariableNameTest.swift | 36 + .../apache2/.openapi-generator/VERSION | 2 +- samples/config/petstore/apache2/PetApi.conf | 10 +- samples/config/petstore/apache2/StoreApi.conf | 6 +- samples/config/petstore/apache2/UserApi.conf | 12 +- .../cwiki/.openapi-generator/VERSION | 2 +- .../dynamic-html/.openapi-generator/VERSION | 2 +- samples/html.md/.openapi-generator/VERSION | 2 +- samples/html/.openapi-generator/VERSION | 2 +- samples/html2/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- .../aspnetcore/.openapi-generator/VERSION | 2 +- .../wwwroot/openapi-original.json | 2 + .../cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-restbed/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restbed/api/PetApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/PetApi.h | 2 +- .../petstore/cpp-restbed/api/StoreApi.cpp | 2 +- .../petstore/cpp-restbed/api/StoreApi.h | 2 +- .../petstore/cpp-restbed/api/UserApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/UserApi.h | 2 +- .../cpp-restbed/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restbed/model/ApiResponse.h | 2 +- .../petstore/cpp-restbed/model/Category.cpp | 2 +- .../petstore/cpp-restbed/model/Category.h | 2 +- .../petstore/cpp-restbed/model/Order.cpp | 2 +- .../server/petstore/cpp-restbed/model/Order.h | 2 +- .../server/petstore/cpp-restbed/model/Pet.cpp | 2 +- .../server/petstore/cpp-restbed/model/Pet.h | 2 +- .../server/petstore/cpp-restbed/model/Tag.cpp | 2 +- .../server/petstore/cpp-restbed/model/Tag.h | 2 +- .../petstore/cpp-restbed/model/User.cpp | 2 +- .../server/petstore/cpp-restbed/model/User.h | 2 +- .../erlang-server/.openapi-generator/VERSION | 2 +- .../petstore/erlang-server/priv/openapi.json | 2 + .../petstore/finch/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 ++++--- .../openapi_server/util.py | 2 +- .../flaskConnexion/.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 ++++--- .../flaskConnexion/openapi_server/util.py | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-inflector/.openapi-generator/VERSION | 2 +- .../controllers/PetController.java | 6 + .../src/main/openapi/openapi.yaml | 42 + .../java-msf4j/.openapi-generator-ignore | 23 + .../java-msf4j/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/FakeApi.java | 40 +- .../org/openapitools/api/FakeApiService.java | 4 +- .../gen/java/org/openapitools/api/PetApi.java | 27 +- .../org/openapitools/api/PetApiService.java | 4 + .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/model/AnimalFarm.java | 50 + .../org/openapitools/model/EnumArrays.java | 2 +- .../java/org/openapitools/model/MapTest.java | 2 +- .../api/impl/FakeApiServiceImpl.java | 4 +- .../api/impl/PetApiServiceImpl.java | 8 + .../java-pkmst/.openapi-generator-ignore | 23 + .../java-pkmst/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-pkmst/Readme.md | 16 +- samples/server/petstore/java-pkmst/pom.xml | 106 +- ...g.java => OpenAPIDocumentationConfig.java} | 2 +- .../com/prokarma/pkmst/controller/PetApi.java | 8 +- .../pkmst/controller/PetApiController.java | 41 +- .../prokarma/pkmst/controller/StoreApi.java | 6 +- .../pkmst/controller/StoreApiController.java | 22 +- .../prokarma/pkmst/controller/UserApi.java | 4 +- .../pkmst/controller/UserApiController.java | 10 + .../src/main/resources/application-dev.yml | 2 +- .../src/main/resources/application-local.yml | 2 +- .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../app/apimodels/EnumArrays.java | 2 +- .../app/apimodels/MapTest.java | 2 +- .../app/controllers/PetApiController.java | 21 + .../app/controllers/PetApiControllerImp.java | 6 + .../PetApiControllerImpInterface.java | 2 + .../conf/routes | 1 + .../public/openapi.json | 60 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 + .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework/public/openapi.json | 2 + .../async/.openapi-generator/VERSION | 2 +- .../async/src/main/resources/openapi.json | 2 + .../java-vertx/rx/.openapi-generator/VERSION | 2 +- .../rx/src/main/resources/openapi.json | 2 + .../api/impl/PetApiServiceImpl.java | 10 + .../openapitools/api/AnotherFakeApiTest.java | 10 +- .../org/openapitools/api/FakeApiTest.java | 16 +- .../api/FakeClassnameTags123ApiTest.java | 10 +- .../java/org/openapitools/api/PetApiTest.java | 28 +- .../org/openapitools/api/StoreApiTest.java | 10 +- .../org/openapitools/api/UserApiTest.java | 10 +- .../.openapi-generator/VERSION | 2 +- .../gen/java/org/openapitools/api/PetApi.java | 17 +- .../src/main/openapi/openapi.yaml | 42 + .../ktor/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/README.md | 2 +- .../nancyfx-async/.openapi-generator/VERSION | 2 +- .../nancyfx-async/Org.OpenAPITools.sln | 25 + .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ++ .../src/Org.OpenAPITools/Models/Category.cs | 165 ++ .../src/Org.OpenAPITools/Models/Order.cs | 247 +++ .../src/Org.OpenAPITools/Models/Pet.cs | 254 +++ .../src/Org.OpenAPITools/Models/Tag.cs | 165 ++ .../src/Org.OpenAPITools/Models/User.cs | 285 +++ .../src/Org.OpenAPITools/Modules/PetModule.cs | 247 +++ .../Org.OpenAPITools/Modules/StoreModule.cs | 129 ++ .../Org.OpenAPITools/Modules/UserModule.cs | 234 +++ .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 + .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 + .../Utils/LocalDateConverter.cs | 55 + .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 +++++ .../src/Org.OpenAPITools/packages.config | 7 + .../nancyfx/.openapi-generator/VERSION | 2 +- .../petstore/nancyfx/Org.OpenAPITools.sln | 25 + .../Org.OpenAPITools/Models/ApiResponse.cs | 185 ++ .../src/Org.OpenAPITools/Models/Category.cs | 165 ++ .../src/Org.OpenAPITools/Models/Order.cs | 247 +++ .../src/Org.OpenAPITools/Models/Pet.cs | 254 +++ .../src/Org.OpenAPITools/Models/Tag.cs | 165 ++ .../src/Org.OpenAPITools/Models/User.cs | 285 +++ .../src/Org.OpenAPITools/Modules/PetModule.cs | 246 +++ .../Org.OpenAPITools/Modules/StoreModule.cs | 128 ++ .../Org.OpenAPITools/Modules/UserModule.cs | 233 +++ .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 + .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 + .../Utils/LocalDateConverter.cs | 55 + .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 +++++ .../src/Org.OpenAPITools/packages.config | 7 + .../.openapi-generator/VERSION | 2 +- .../api/openapi.yaml | 616 +++--- .../nodejs/.openapi-generator/VERSION | 2 +- .../server/petstore/nodejs/api/openapi.yaml | 616 +++--- .../php-silex/.openapi-generator/VERSION | 2 +- .../rails5/.openapi-generator/VERSION | 2 +- .../rust-server/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-lagom-server/README.md | 8 +- .../petstore/scala-lagom-server/build.sbt | 2 +- .../scala/io/swagger/client/api/PetApi.scala | 10 +- .../io/swagger/client/api/StoreApi.scala | 10 +- .../scala/io/swagger/client/api/UserApi.scala | 12 +- .../io/swagger/client/model/ApiResponse.scala | 12 +- .../io/swagger/client/model/Category.scala | 10 +- .../scala/io/swagger/client/model/Order.scala | 10 +- .../scala/io/swagger/client/model/Pet.scala | 10 +- .../scala/io/swagger/client/model/Tag.scala | 10 +- .../scala/io/swagger/client/model/User.scala | 10 +- .../scalatra/.openapi-generator/VERSION | 2 +- .../sinatra/.openapi-generator/VERSION | 2 +- samples/server/petstore/sinatra/openapi.yaml | 576 +++--- .../undertow/.openapi-generator/VERSION | 2 +- .../src/main/resources/config/openapi.json | 2 + 553 files changed, 16321 insertions(+), 3204 deletions(-) create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.gitignore create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/README.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart create mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml create mode 100644 samples/client/petstore/eiffel/.openapi-generator-ignore create mode 100644 samples/client/petstore/elixir/.openapi-generator-ignore create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift create mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift create mode 100644 samples/server/petstore/java-msf4j/.openapi-generator-ignore create mode 100644 samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java create mode 100644 samples/server/petstore/java-pkmst/.openapi-generator-ignore rename samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/{SwaggerDocumentationConfig.java => OpenAPIDocumentationConfig.java} (98%) create mode 100644 samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs create mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config create mode 100644 samples/server/petstore/nancyfx/Org.OpenAPITools.sln create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs create mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/.openapi-generator/VERSION b/samples/client/petstore/ada/.openapi-generator/VERSION index 855ff9501eb8..82602aa4190d 100644 --- a/samples/client/petstore/ada/.openapi-generator/VERSION +++ b/samples/client/petstore/ada/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index 43fef8ce345d..4b144dfb1ad5 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; package body Samples.Petstore.Clients is @@ -13,15 +13,14 @@ package body Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type) is + Pet_Type : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -34,8 +33,7 @@ package body Samples.Petstore.Clients is Api_Key : in Swagger.Nullable_UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/pet/{petId}"); URI.Set_Path_Param ("petId", Swagger.To_String (Pet_Id)); @@ -46,7 +44,7 @@ package body Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.Nullable_UString_Vectors.Vector; + Status : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -64,7 +62,7 @@ package body Samples.Petstore.Clients is -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.Nullable_UString_Vectors.Vector; + Tags : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -99,15 +97,14 @@ package body Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type) is + Pet_Type : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.PUT, URI, Req); @@ -122,8 +119,7 @@ package body Samples.Petstore.Clients is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM)); Req.Stream.Write_Entity ("name", Name); Req.Stream.Write_Entity ("status", Status); @@ -162,8 +158,7 @@ package body Samples.Petstore.Clients is Order_Id : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/store/order/{orderId}"); URI.Set_Path_Param ("orderId", Order_Id); @@ -174,7 +169,7 @@ package body Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Nullable_Integer_Map) is + Result : out Swagger.Integer_Map) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin @@ -206,7 +201,7 @@ package body Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Order_Type; + Order_Type : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; @@ -215,7 +210,7 @@ package body Samples.Petstore.Clients is Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", Order_Type); URI.Set_Path ("/store/order"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); @@ -226,14 +221,13 @@ package body Samples.Petstore.Clients is -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type) is + User_Type : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); URI.Set_Path ("/user"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -242,14 +236,13 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User); URI.Set_Path ("/user/createWithArray"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -258,14 +251,13 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User); URI.Set_Path ("/user/createWithList"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -278,8 +270,7 @@ package body Samples.Petstore.Clients is Username : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); @@ -327,8 +318,7 @@ package body Samples.Petstore.Clients is (Client : in out Client_Type) is URI : Swagger.Clients.URI_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + URI.Set_Path ("/user/logout"); Client.Call (Swagger.Clients.GET, URI); @@ -339,14 +329,13 @@ package body Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - P_Body : in Samples.Petstore.Models.User_Type) is + User_Type : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, - Swagger.Clients.APPLICATION_JSON)); + Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); + Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index 590245fe2a38..3a3b6554b584 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Samples.Petstore.Models; with Swagger.Clients; @@ -16,7 +16,7 @@ package Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type); + Pet_Type : in Samples.Petstore.Models.Pet_Type); -- Deletes a pet procedure Delete_Pet @@ -28,14 +28,14 @@ package Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.Nullable_UString_Vectors.Vector; + Status : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Finds Pets by tags -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.Nullable_UString_Vectors.Vector; + Tags : in Swagger.UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Find pet by ID @@ -48,7 +48,7 @@ package Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Pet_Type); + Pet_Type : in Samples.Petstore.Models.Pet_Type); -- Updates a pet in the store with form data procedure Update_Pet_With_Form @@ -75,7 +75,7 @@ package Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Nullable_Integer_Map); + Result : out Swagger.Integer_Map); -- Find purchase order by ID -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -87,24 +87,24 @@ package Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.Order_Type; + Order_Type : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type); -- Create user -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type); + User_Type : in Samples.Petstore.Models.User_Type); -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); + User : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); + User : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Delete user -- This can only be done by the logged in user. @@ -134,6 +134,6 @@ package Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - P_Body : in Samples.Petstore.Models.User_Type); + User_Type : in Samples.Petstore.Models.User_Type); end Samples.Petstore.Clients; diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.adb b/samples/client/petstore/ada/src/model/samples-petstore-models.adb index 9b310388c9dc..ca10031271a4 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.adb +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.adb @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. package body Samples.Petstore.Models is diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.ads b/samples/client/petstore/ada/src/model/samples-petstore-models.ads index 625071b3ebf5..b5241050f734 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.ads +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.ads @@ -1,11 +1,11 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- Contact: apiteam@swagger.io +-- -- --- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. --- https://github.com/swagger-api/swagger-codegen.git +-- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. +-- https://openapi-generator.tech -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; @@ -118,7 +118,7 @@ package Samples.Petstore.Models is Id : Swagger.Nullable_Long; Category : Samples.Petstore.Models.Category_Type; Name : Swagger.UString; - Photo_Urls : Swagger.Nullable_UString_Vectors.Vector; + Photo_Urls : Swagger.UString_Vectors.Vector; Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector; Status : Swagger.Nullable_UString; end record; diff --git a/samples/client/petstore/ada/src/samples-petstore.ads b/samples/client/petstore/ada/src/samples-petstore.ads index 181946604706..3565c1a3f432 100644 --- a/samples/client/petstore/ada/src/samples-petstore.ads +++ b/samples/client/petstore/ada/src/samples-petstore.ads @@ -1,9 +1,9 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with swagger-codegen. You can modify it to implement +-- This file was generated with openapi-generator. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .swagger-codegen-ignore file: +-- to the .openapi-generator-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/ada/src/samples.ads b/samples/client/petstore/ada/src/samples.ads index ff6bb421800d..1915df406b0a 100644 --- a/samples/client/petstore/ada/src/samples.ads +++ b/samples/client/petstore/ada/src/samples.ads @@ -1,9 +1,9 @@ --- Swagger Petstore --- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. +-- OpenAPI Petstore +-- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with swagger-codegen. You can modify it to implement +-- This file was generated with openapi-generator. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .swagger-codegen-ignore file: +-- to the .openapi-generator-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md index adadfaab9b72..0ec2f2870d97 100644 --- a/samples/client/petstore/android/httpclient/docs/PetApi.md +++ b/samples/client/petstore/android/httpclient/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "null"; // String | Updated name of the pet -String status = "null"; // String | Updated status of the pet +String name = null; // String | Updated name of the pet +String status = null; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "null"; // String | Additional data to pass to server -File file = new File("null"); // File | file to upload +String additionalMetadata = null; // String | Additional data to pass to server +File file = null; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/android/volley/.openapi-generator/VERSION b/samples/client/petstore/android/volley/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/android/volley/.openapi-generator/VERSION +++ b/samples/client/petstore/android/volley/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md index adadfaab9b72..0ec2f2870d97 100644 --- a/samples/client/petstore/android/volley/docs/PetApi.md +++ b/samples/client/petstore/android/volley/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = "null"; // String | Updated name of the pet -String status = "null"; // String | Updated status of the pet +String name = null; // String | Updated name of the pet +String status = null; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = "null"; // String | Additional data to pass to server -File file = new File("null"); // File | file to upload +String additionalMetadata = null; // String | Additional data to pass to server +File file = null; // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index a543b69de1be..20abbf5d57ce 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -117,6 +117,7 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index 3141c8ccd878..f5b919cb6b73 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -315,7 +315,8 @@ case $state in "getPetById[Find pet by ID]" \ "updatePet[Update an existing pet]" \ "updatePetWithForm[Updates a pet in the store with form data]" \ - "uploadFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ + "uploadFile[uploads an image]" \ + "uploadFileWithRequiredFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ "getInventory[Returns pet inventories by status]" \ "getOrderById[Find purchase order by ID]" \ "placeOrder[Place an order for a pet]" "createUser[Create user]" \ @@ -466,6 +467,13 @@ case $state in ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; + uploadFileWithRequiredFile) + local -a _op_arguments + _op_arguments=( + "petId=:[PATH] ID of pet to update" + ) + _describe -t actions 'operations' _op_arguments -S '' && ret=0 + ;; deleteOrder) local -a _op_arguments _op_arguments=( diff --git a/samples/client/petstore/bash/docs/FakeApi.md b/samples/client/petstore/bash/docs/FakeApi.md index 458397e67277..bb3ef255e69e 100644 --- a/samples/client/petstore/bash/docs/FakeApi.md +++ b/samples/client/petstore/bash/docs/FakeApi.md @@ -282,7 +282,7 @@ Name | Type | Description | Notes **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional] **enumQueryDouble** | **float** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | **array[string]** | Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**array[string]**](string.md) | Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/bash/docs/PetApi.md b/samples/client/petstore/bash/docs/PetApi.md index d9728a14ac7f..394b31609f8e 100644 --- a/samples/client/petstore/bash/docs/PetApi.md +++ b/samples/client/petstore/bash/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image ## **addPet** @@ -265,3 +266,35 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## **uploadFileWithRequiredFile** + +uploads an image + +### Example +```bash +petstore-cli uploadFileWithRequiredFile petId=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | ID of pet to update | + **file** | **binary** | file to upload | [default to null] + **additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index b74ebf8b2040..9cb196a2df1b 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -142,6 +142,9 @@ operation_parameters_minimum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_minimum_occurrences["uploadFile:::petId"]=1 operation_parameters_minimum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["uploadFile:::file"]=0 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::petId"]=1 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::file"]=1 +operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["deleteOrder:::order_id"]=1 operation_parameters_minimum_occurrences["getOrderById:::order_id"]=1 operation_parameters_minimum_occurrences["placeOrder:::Order"]=1 @@ -209,6 +212,9 @@ operation_parameters_maximum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_maximum_occurrences["uploadFile:::petId"]=0 operation_parameters_maximum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["uploadFile:::file"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::petId"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::file"]=0 +operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["deleteOrder:::order_id"]=0 operation_parameters_maximum_occurrences["getOrderById:::order_id"]=0 operation_parameters_maximum_occurrences["placeOrder:::Order"]=0 @@ -273,6 +279,9 @@ operation_parameters_collection_type["updatePetWithForm:::status"]="" operation_parameters_collection_type["uploadFile:::petId"]="" operation_parameters_collection_type["uploadFile:::additionalMetadata"]="" operation_parameters_collection_type["uploadFile:::file"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::petId"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::file"]="" +operation_parameters_collection_type["uploadFileWithRequiredFile:::additionalMetadata"]="" operation_parameters_collection_type["deleteOrder:::order_id"]="" operation_parameters_collection_type["getOrderById:::order_id"]="" operation_parameters_collection_type["placeOrder:::Order"]="" @@ -725,6 +734,7 @@ read -r -d '' ops < -#include "OAICategory.h" -#include "OAITag.h" +#include "OAIOAICategory.h" +#include "OAIOAITag.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h index 497e4ad01132..6587df873f55 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h @@ -15,9 +15,9 @@ #include "OAIHttpRequest.h" -#include "OAIApiResponse.h" +#include "OAIOAIApiResponse.h" #include "OAIHttpRequest.h" -#include "OAIPet.h" +#include "OAIOAIPet.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h index 7f08be814d64..f05dacfb65de 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h @@ -15,7 +15,7 @@ #include "OAIHttpRequest.h" -#include "OAIOrder.h" +#include "OAIOAIOrder.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h index 137b964bde90..7449b2a9a037 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h @@ -15,7 +15,7 @@ #include "OAIHttpRequest.h" -#include "OAIUser.h" +#include "OAIOAIUser.h" #include #include diff --git a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/ApiClient.cpp index 448f377926ee..88f040adf684 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiClient.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/ApiClient.h index 355a119f395e..3c352661539f 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/ApiClient.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp index 2d5d39513ec9..3f953d78d05f 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h index c39b29fc61f1..ba8dd3850684 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/ApiException.cpp index bb41df86f97c..e39f83f2c802 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiException.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/ApiException.h index 6073db8d1ec2..60f6e9c8b36c 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/ApiException.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/HttpContent.cpp index 8922e724304d..4589104af115 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/HttpContent.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/HttpContent.h index 71b055aaadcc..f2db9d04dedd 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/HttpContent.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/IHttpBody.h index 88ce14a536da..822d16bb1aba 100644 --- a/samples/client/petstore/cpp-restsdk/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/IHttpBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/JsonBody.cpp index e3fbd7b340bd..fbc8b8138181 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/JsonBody.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/JsonBody.h index 5ec9da11d709..d44384dfb02b 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/JsonBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/ModelBase.cpp index d13dc7ac9806..92de3ce620e2 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/ModelBase.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/ModelBase.h index 6b9818617bcb..2ea95cd79cf1 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/ModelBase.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp index fb9b11dfee1b..d4a29f65a08e 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/MultipartFormData.h index 166ada330cae..293b8f62a491 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -12,7 +12,7 @@ /* * MultipartFormData.h * - * This class represents a container for building a application/x-multipart-formdata requests. + * This class represents a container for building application/x-multipart-formdata requests. */ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/Object.cpp index 326ada285e9b..1eee384f1bf6 100644 --- a/samples/client/petstore/cpp-restsdk/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/Object.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/Object.h index ec9505e194b8..c94ce994009e 100644 --- a/samples/client/petstore/cpp-restsdk/Object.h +++ b/samples/client/petstore/cpp-restsdk/Object.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp index 69b595fc629a..27d03a537a34 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h index 01cc1f218bc5..b2bf01999d3b 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp index 188730555804..a23b28e8bd12 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h index 303345a8d7c2..0e9b43ec71a5 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp index 9c319adf0230..3f7a303fc4a9 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h index 2b198b383a88..27cff8aaba8c 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp index 1d8ebbac8b7a..0af7d2b86672 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h index 0514fcd38c9c..01b0ea8cd481 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/model/Category.cpp index 60f92843df05..5a6e351cb0cf 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Category.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/model/Category.h index f77cf6c508bd..794770a08865 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/model/Category.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/model/Order.cpp index f23fd13926c0..54f66812cc8b 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Order.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/model/Order.h index 43893a44fa40..85bb14ac3dea 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/model/Order.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/model/Pet.cpp index 3c477013b10a..653b40a9736c 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Pet.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/model/Pet.h index d83922397660..e1aad1c71020 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/model/Pet.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/model/Tag.cpp index 584a4b24cf56..9871c81241bf 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Tag.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/model/Tag.h index 663fe05cfcc8..0f5cfa3acb08 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/model/Tag.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/model/User.cpp index a06e9f5aa4bb..7966daa7f0a4 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/model/User.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/model/User.h index 0e5f4dc08447..0dffafc8406e 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.h +++ b/samples/client/petstore/cpp-restsdk/model/User.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION b/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-tizen/doc/Doxyfile b/samples/client/petstore/cpp-tizen/doc/Doxyfile index bbb92191a0a5..9a0ba8f71860 100644 --- a/samples/client/petstore/cpp-tizen/doc/Doxyfile +++ b/samples/client/petstore/cpp-tizen/doc/Doxyfile @@ -46,7 +46,7 @@ PROJECT_NUMBER = 1.0.0 PROJECT_BRIEF = "An SDK for creating client applications for OpenAPI Petstore on Tizen Platform (http://tizen.org/)" -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# With the PROJECT_LOGO tag one can specify a logo or icon that is included in # the documentation. The maximum height of the logo should not exceed 55 pixels # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index e510bba3f599..48ec5e0f7c18 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -72,7 +72,8 @@ OpenAPI spec version: 1.0.0 - + @@ -84,8 +85,5 @@ OpenAPI spec version: 1.0.0 Org.OpenAPITools - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 9bfb712fd455..041d0037c79d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + ///

+ /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs index c6db8f4b909f..060b2eb90495 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -907,5 +932,87 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs index c7aa7e2f6554..f020476ca4b0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -907,5 +932,87 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md index 2676c56acc9e..3d6b5f551836 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs index f34cfb4d6a36..3b7f149ff3f8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index 2676c56acc9e..3d6b5f551836 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs index f34cfb4d6a36..3b7f149ff3f8 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index 441abc408817..a5ae4a502c79 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index 2a4fb6094ae0..14acd669304c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md index 244ece53a318..1ad695d7c8d3 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -524,3 +525,69 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + +uploads an image + +### Example +```csharp +using System; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public void main() + { + // Configure OAuth2 access token for authorization: petstore_auth + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(); + var petId = 789; // long? | ID of pet to update + var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long?**| ID of pet to update | + **file** | **System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs index 9bfb712fd455..041d0037c79d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,6 +202,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -382,6 +407,31 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1700,5 +1750,170 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); + return localVarResponse.Data; + + } + + /// + /// uploads an image + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) + { + // verify the required parameter 'petId' is set + if (petId == null) + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'file' is set + if (file == null) + throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); + + var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter + if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + } + } } diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options b/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options new file mode 100644 index 000000000000..518eb901a6ff --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore b/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore new file mode 100644 index 000000000000..7c2804416498 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore @@ -0,0 +1,27 @@ +# See https://www.dartlang.org/tools/private-files.html + +# Files and directories created by pub +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION new file mode 100644 index 000000000000..82602aa4190d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/README.md b/samples/client/petstore/dart/flutter_petstore/swagger/README.md new file mode 100644 index 000000000000..5f3fe0547842 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/README.md @@ -0,0 +1,121 @@ +# openapi +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 1.20.0 or later OR Flutter 0.0.20 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +``` +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + version: 'any' +``` + +### Local +To use the package in your local drive, please include the following in pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(pet); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [ApiResponse](docs//ApiResponse.md) + - [Category](docs//Category.md) + - [Order](docs//Order.md) + - [Pet](docs//Pet.md) + - [Tag](docs//Tag.md) + - [User](docs//User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md new file mode 100644 index 000000000000..92422f0f446e --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] [default to null] +**type** | **String** | | [optional] [default to null] +**message** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md new file mode 100644 index 000000000000..cc0d1633b59c --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md new file mode 100644 index 000000000000..310ce6c65be3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**petId** | **int** | | [optional] [default to null] +**quantity** | **int** | | [optional] [default to null] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] +**status** | **String** | Order Status | [optional] [default to null] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md new file mode 100644 index 000000000000..191e1fc66a95 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**photoUrls** | **List<String>** | | [default to []] +**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to []] +**status** | **String** | pet status in the store | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md new file mode 100644 index 000000000000..6fa9abf67ae1 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md @@ -0,0 +1,379 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + +# **addPet** +> addPet(pet) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(pet); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | Pet id to delete +var apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petId, apiKey); +} catch (e) { + print("Exception when calling PetApi->deletePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var status = []; // List | Status values that need to be considered for filter + +try { + var result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByStatus: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> List findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var tags = []; // List | Tags to filter by + +try { + var result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByTags: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to return + +try { + var result = api_instance.getPetById(petId); + print(result); +} catch (e) { + print("Exception when calling PetApi->getPetById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(pet) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var pet = new Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(pet); +} catch (e) { + print("Exception when calling PetApi->updatePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet that needs to be updated +var name = name_example; // String | Updated name of the pet +var status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petId, name, status); +} catch (e) { + print("Exception when calling PetApi->updatePetWithForm: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] [default to null] + **status** | **String**| Updated status of the pet | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = new PetApi(); +var petId = 789; // int | ID of pet to update +var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +var file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + var result = api_instance.uploadFile(petId, additionalMetadata, file); + print(result); +} catch (e) { + print("Exception when calling PetApi->uploadFile: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + **file** | **MultipartFile**| file to upload | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md new file mode 100644 index 000000000000..cc0c2ac2d35e --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print("Exception when calling StoreApi->deleteOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; + +var api_instance = new StoreApi(); + +try { + var result = api_instance.getInventory(); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getInventory: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var orderId = 789; // int | ID of pet that needs to be fetched + +try { + var result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getOrderById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new StoreApi(); +var order = new Order(); // Order | order placed for purchasing the pet + +try { + var result = api_instance.placeOrder(order); + print(result); +} catch (e) { + print("Exception when calling StoreApi->placeOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md new file mode 100644 index 000000000000..ded7b32ac3d7 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md new file mode 100644 index 000000000000..3761b70cf0b7 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**username** | **String** | | [optional] [default to null] +**firstName** | **String** | | [optional] [default to null] +**lastName** | **String** | | [optional] [default to null] +**email** | **String** | | [optional] [default to null] +**password** | **String** | | [optional] [default to null] +**phone** | **String** | | [optional] [default to null] +**userStatus** | **int** | User Status | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md new file mode 100644 index 000000000000..0dec271be5c6 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = new User(); // User | Created user object + +try { + api_instance.createUser(user); +} catch (e) { + print("Exception when calling UserApi->createUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(user); +} catch (e) { + print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](List.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var user = [new List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(user); +} catch (e) { + print("Exception when calling UserApi->createUsersWithListInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](List.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print("Exception when calling UserApi->deleteUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + var result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print("Exception when calling UserApi->getUserByName: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | The user name for login +var password = password_example; // String | The password for login in clear text + +try { + var result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print("Exception when calling UserApi->loginUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print("Exception when calling UserApi->logoutUser: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = new UserApi(); +var username = username_example; // String | name that need to be deleted +var user = new User(); // User | Updated user object + +try { + api_instance.updateUser(username, user); +} catch (e) { + print("Exception when calling UserApi->updateUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh b/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh new file mode 100644 index 000000000000..8442b80bb445 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart new file mode 100644 index 000000000000..9a64a5342b4a --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart @@ -0,0 +1,27 @@ +library openapi.api; + +import 'dart:async'; +import 'dart:convert'; +import 'package:http/http.dart'; + +part 'api_client.dart'; +part 'api_helper.dart'; +part 'api_exception.dart'; +part 'auth/authentication.dart'; +part 'auth/api_key_auth.dart'; +part 'auth/oauth.dart'; +part 'auth/http_basic_auth.dart'; + +part 'api/pet_api.dart'; +part 'api/store_api.dart'; +part 'api/user_api.dart'; + +part 'model/api_response.dart'; +part 'model/category.dart'; +part 'model/order.dart'; +part 'model/pet.dart'; +part 'model/tag.dart'; +part 'model/user.dart'; + + +ApiClient defaultApiClient = new ApiClient(); diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart new file mode 100644 index 000000000000..4134e018386d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart @@ -0,0 +1,432 @@ +part of openapi.api; + + + +class PetApi { + final ApiClient apiClient; + + PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Add a new pet to the store + /// + /// + Future addPet(Pet pet) async { + Object postBody = pet; + + // verify required params are set + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); + } + + // create path and map variables + String path = "/pet".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/json","application/xml"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Deletes a pet + /// + /// + Future deletePet(int petId, { String apiKey }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + headerParams["api_key"] = apiKey; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + Future> findPetsByStatus(List status) async { + Object postBody = null; + + // verify required params are set + if(status == null) { + throw new ApiException(400, "Missing required param: status"); + } + + // create path and map variables + String path = "/pet/findByStatus".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("csv", "status", status)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); + } else { + return null; + } + } + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + Future> findPetsByTags(List tags) async { + Object postBody = null; + + // verify required params are set + if(tags == null) { + throw new ApiException(400, "Missing required param: tags"); + } + + // create path and map variables + String path = "/pet/findByTags".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("csv", "tags", tags)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); + } else { + return null; + } + } + /// Find pet by ID + /// + /// Returns a single pet + Future getPetById(int petId) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["api_key"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Pet') as Pet; + } else { + return null; + } + } + /// Update an existing pet + /// + /// + Future updatePet(Pet pet) async { + Object postBody = pet; + + // verify required params are set + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); + } + + // create path and map variables + String path = "/pet".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/json","application/xml"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Updates a pet in the store with form data + /// + /// + Future updatePetWithForm(int petId, { String name, String status }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["application/x-www-form-urlencoded"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if (name != null) { + hasFields = true; + mp.fields['name'] = parameterToString(name); + } + if (status != null) { + hasFields = true; + mp.fields['status'] = parameterToString(status); + } + if(hasFields) + postBody = mp; + } + else { + if (name != null) + formParams['name'] = parameterToString(name); + if (status != null) + formParams['status'] = parameterToString(status); + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// uploads an image + /// + /// + Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { + Object postBody = null; + + // verify required params are set + if(petId == null) { + throw new ApiException(400, "Missing required param: petId"); + } + + // create path and map variables + String path = "/pet/{petId}/uploadImage".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = ["multipart/form-data"]; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["petstore_auth"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if (additionalMetadata != null) { + hasFields = true; + mp.fields['additionalMetadata'] = parameterToString(additionalMetadata); + } + if (file != null) { + hasFields = true; + mp.fields['file'] = file.field; + mp.files.add(file); + } + if(hasFields) + postBody = mp; + } + else { + if (additionalMetadata != null) + formParams['additionalMetadata'] = parameterToString(additionalMetadata); + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'ApiResponse') as ApiResponse; + } else { + return null; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart new file mode 100644 index 000000000000..f2a48f2d4dae --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart @@ -0,0 +1,207 @@ +part of openapi.api; + + + +class StoreApi { + final ApiClient apiClient; + + StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + Future deleteOrder(String orderId) async { + Object postBody = null; + + // verify required params are set + if(orderId == null) { + throw new ApiException(400, "Missing required param: orderId"); + } + + // create path and map variables + String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future> getInventory() async { + Object postBody = null; + + // verify required params are set + + // create path and map variables + String path = "/store/inventory".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = ["api_key"]; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return new Map.from(apiClient.deserialize(response.body, 'Map')); + ; + } else { + return null; + } + } + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Future getOrderById(int orderId) async { + Object postBody = null; + + // verify required params are set + if(orderId == null) { + throw new ApiException(400, "Missing required param: orderId"); + } + + // create path and map variables + String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Order') as Order; + } else { + return null; + } + } + /// Place an order for a pet + /// + /// + Future placeOrder(Order order) async { + Object postBody = order; + + // verify required params are set + if(order == null) { + throw new ApiException(400, "Missing required param: order"); + } + + // create path and map variables + String path = "/store/order".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'Order') as Order; + } else { + return null; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart new file mode 100644 index 000000000000..cf8ef6bf8002 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart @@ -0,0 +1,409 @@ +part of openapi.api; + + + +class UserApi { + final ApiClient apiClient; + + UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; + + /// Create user + /// + /// This can only be done by the logged in user. + Future createUser(User user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithArrayInput(List user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/createWithArray".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Creates list of users with given input array + /// + /// + Future createUsersWithListInput(List user) async { + Object postBody = user; + + // verify required params are set + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/createWithList".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Delete user + /// + /// This can only be done by the logged in user. + Future deleteUser(String username) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Get user by user name + /// + /// + Future getUserByName(String username) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'User') as User; + } else { + return null; + } + } + /// Logs user into the system + /// + /// + Future loginUser(String username, String password) async { + Object postBody = null; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + if(password == null) { + throw new ApiException(400, "Missing required param: password"); + } + + // create path and map variables + String path = "/user/login".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + queryParams.addAll(_convertParametersForCollectionFormat("", "username", username)); + queryParams.addAll(_convertParametersForCollectionFormat("", "password", password)); + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + return apiClient.deserialize(response.body, 'String') as String; + } else { + return null; + } + } + /// Logs out current logged in user session + /// + /// + Future logoutUser() async { + Object postBody = null; + + // verify required params are set + + // create path and map variables + String path = "/user/logout".replaceAll("{format}","json"); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } + /// Updated user + /// + /// This can only be done by the logged in user. + Future updateUser(String username, User user) async { + Object postBody = user; + + // verify required params are set + if(username == null) { + throw new ApiException(400, "Missing required param: username"); + } + if(user == null) { + throw new ApiException(400, "Missing required param: user"); + } + + // create path and map variables + String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); + + // query params + List queryParams = []; + Map headerParams = {}; + Map formParams = {}; + + List contentTypes = []; + + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + List authNames = []; + + if(contentType.startsWith("multipart/form-data")) { + bool hasFields = false; + MultipartRequest mp = new MultipartRequest(null, null); + if(hasFields) + postBody = mp; + } + else { + } + + var response = await apiClient.invokeAPI(path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentType, + authNames); + + if(response.statusCode >= 400) { + throw new ApiException(response.statusCode, response.body); + } else if(response.body != null) { + } else { + return; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart new file mode 100644 index 000000000000..db4116dd96dc --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart @@ -0,0 +1,160 @@ +part of openapi.api; + +class QueryParam { + String name; + String value; + + QueryParam(this.name, this.value); +} + +class ApiClient { + + String basePath; + var client = new Client(); + + Map _defaultHeaderMap = {}; + Map _authentications = {}; + + final _RegList = new RegExp(r'^List<(.*)>$'); + final _RegMap = new RegExp(r'^Map$'); + + ApiClient({this.basePath: "http://petstore.swagger.io/v2"}) { + // Setup authentications (key: authentication name, value: authentication). + _authentications['api_key'] = new ApiKeyAuth("header", "api_key"); + _authentications['petstore_auth'] = new OAuth(); + } + + void addDefaultHeader(String key, String value) { + _defaultHeaderMap[key] = value; + } + + dynamic _deserialize(dynamic value, String targetType) { + try { + switch (targetType) { + case 'String': + return '$value'; + case 'int': + return value is int ? value : int.parse('$value'); + case 'bool': + return value is bool ? value : '$value'.toLowerCase() == 'true'; + case 'double': + return value is double ? value : double.parse('$value'); + case 'ApiResponse': + return new ApiResponse.fromJson(value); + case 'Category': + return new Category.fromJson(value); + case 'Order': + return new Order.fromJson(value); + case 'Pet': + return new Pet.fromJson(value); + case 'Tag': + return new Tag.fromJson(value); + case 'User': + return new User.fromJson(value); + default: + { + Match match; + if (value is List && + (match = _RegList.firstMatch(targetType)) != null) { + var newTargetType = match[1]; + return value.map((v) => _deserialize(v, newTargetType)).toList(); + } else if (value is Map && + (match = _RegMap.firstMatch(targetType)) != null) { + var newTargetType = match[1]; + return new Map.fromIterables(value.keys, + value.values.map((v) => _deserialize(v, newTargetType))); + } + } + } + } catch (e, stack) { + throw new ApiException.withInner(500, 'Exception during deserialization.', e, stack); + } + throw new ApiException(500, 'Could not find a suitable class for deserialization'); + } + + dynamic deserialize(String json, String targetType) { + // Remove all spaces. Necessary for reg expressions as well. + targetType = targetType.replaceAll(' ', ''); + + if (targetType == 'String') return json; + + var decodedJson = JSON.decode(json); + return _deserialize(decodedJson, targetType); + } + + String serialize(Object obj) { + String serialized = ''; + if (obj == null) { + serialized = ''; + } else { + serialized = JSON.encode(obj); + } + return serialized; + } + + // We don't use a Map for queryParams. + // If collectionFormat is 'multi' a key might appear multiple times. + Future invokeAPI(String path, + String method, + Iterable queryParams, + Object body, + Map headerParams, + Map formParams, + String contentType, + List authNames) async { + + _updateParamsForAuth(authNames, queryParams, headerParams); + + var ps = queryParams.where((p) => p.value != null).map((p) => '${p.name}=${p.value}'); + String queryString = ps.isNotEmpty ? + '?' + ps.join('&') : + ''; + + String url = basePath + path + queryString; + + headerParams.addAll(_defaultHeaderMap); + headerParams['Content-Type'] = contentType; + + if(body is MultipartRequest) { + var request = new MultipartRequest(method, Uri.parse(url)); + request.fields.addAll(body.fields); + request.files.addAll(body.files); + request.headers.addAll(body.headers); + request.headers.addAll(headerParams); + var response = await client.send(request); + return Response.fromStream(response); + } else { + var msgBody = contentType == "application/x-www-form-urlencoded" ? formParams : serialize(body); + switch(method) { + case "POST": + return client.post(url, headers: headerParams, body: msgBody); + case "PUT": + return client.put(url, headers: headerParams, body: msgBody); + case "DELETE": + return client.delete(url, headers: headerParams); + case "PATCH": + return client.patch(url, headers: headerParams, body: msgBody); + default: + return client.get(url, headers: headerParams); + } + } + } + + /// Update query and header parameters based on authentication settings. + /// @param authNames The authentications to apply + void _updateParamsForAuth(List authNames, List queryParams, Map headerParams) { + authNames.forEach((authName) { + Authentication auth = _authentications[authName]; + if (auth == null) throw new ArgumentError("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + }); + } + + void setAccessToken(String accessToken) { + _authentications.forEach((key, auth) { + if (auth is OAuth) { + auth.setAccessToken(accessToken); + } + }); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart new file mode 100644 index 000000000000..f188fd125a4d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart @@ -0,0 +1,23 @@ +part of openapi.api; + +class ApiException implements Exception { + int code = 0; + String message = null; + Exception innerException = null; + StackTrace stackTrace = null; + + ApiException(this.code, this.message); + + ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + + String toString() { + if (message == null) return "ApiException"; + + if (innerException == null) { + return "ApiException $code: $message"; + } + + return "ApiException $code: $message (Inner exception: ${innerException})\n\n" + + stackTrace.toString(); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart new file mode 100644 index 000000000000..79af4521d5b3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart @@ -0,0 +1,44 @@ +part of openapi.api; + +const _delimiters = const {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; + +// port from Java version +Iterable _convertParametersForCollectionFormat( + String collectionFormat, String name, dynamic value) { + var params = []; + + // preconditions + if (name == null || name.isEmpty || value == null) return params; + + if (value is! List) { + params.add(new QueryParam(name, parameterToString(value))); + return params; + } + + List values = value as List; + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty) + ? "csv" + : collectionFormat; // default: csv + + if (collectionFormat == "multi") { + return values.map((v) => new QueryParam(name, parameterToString(v))); + } + + String delimiter = _delimiters[collectionFormat] ?? ","; + + params.add(new QueryParam(name, values.map((v) => parameterToString(v)).join(delimiter))); + return params; +} + +/// Format the given parameter object into string. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } else if (value is DateTime) { + return value.toUtc().toIso8601String(); + } else { + return value.toString(); + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart new file mode 100644 index 000000000000..f9617f7ae4da --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart @@ -0,0 +1,27 @@ +part of openapi.api; + +class ApiKeyAuth implements Authentication { + + final String location; + final String paramName; + String apiKey; + String apiKeyPrefix; + + ApiKeyAuth(this.location, this.paramName); + + @override + void applyToParams(List queryParams, Map headerParams) { + String value; + if (apiKeyPrefix != null) { + value = '$apiKeyPrefix $apiKey'; + } else { + value = apiKey; + } + + if (location == 'query' && value != null) { + queryParams.add(new QueryParam(paramName, value)); + } else if (location == 'header' && value != null) { + headerParams[paramName] = value; + } + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart new file mode 100644 index 000000000000..abd5e2fe68a3 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart @@ -0,0 +1,7 @@ +part of openapi.api; + +abstract class Authentication { + + /// Apply authentication settings to header and query params. + void applyToParams(List queryParams, Map headerParams); +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart new file mode 100644 index 000000000000..4e77ddcf6e68 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart @@ -0,0 +1,14 @@ +part of openapi.api; + +class HttpBasicAuth implements Authentication { + + String username; + String password; + + @override + void applyToParams(List queryParams, Map headerParams) { + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams["Authorization"] = "Basic " + BASE64.encode(UTF8.encode(str)); + } + +} \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart new file mode 100644 index 000000000000..13bfd799743b --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart @@ -0,0 +1,19 @@ +part of openapi.api; + +class OAuth implements Authentication { + String accessToken; + + OAuth({this.accessToken}) { + } + + @override + void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams["Authorization"] = "Bearer " + accessToken; + } + } + + void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } +} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart new file mode 100644 index 000000000000..a39d9500b29d --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart @@ -0,0 +1,44 @@ +part of openapi.api; + +class ApiResponse { + + int code = null; + + String type = null; + + String message = null; + ApiResponse(); + + @override + String toString() { + return 'ApiResponse[code=$code, type=$type, message=$message, ]'; + } + + ApiResponse.fromJson(Map json) { + if (json == null) return; + code = json['code']; + type = json['type']; + message = json['message']; + } + + Map toJson() { + return { + 'code': code, + 'type': type, + 'message': message + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new ApiResponse.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new ApiResponse.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart new file mode 100644 index 000000000000..b9b2481dd295 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart @@ -0,0 +1,40 @@ +part of openapi.api; + +class Category { + + int id = null; + + String name = null; + Category(); + + @override + String toString() { + return 'Category[id=$id, name=$name, ]'; + } + + Category.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + return { + 'id': id, + 'name': name + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Category.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Category.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart new file mode 100644 index 000000000000..4e264a183ef9 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart @@ -0,0 +1,57 @@ +part of openapi.api; + +class Order { + + int id = null; + + int petId = null; + + int quantity = null; + + DateTime shipDate = null; + /* Order Status */ + String status = null; + //enum statusEnum { placed, approved, delivered, };{ + + bool complete = false; + Order(); + + @override + String toString() { + return 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete, ]'; + } + + Order.fromJson(Map json) { + if (json == null) return; + id = json['id']; + petId = json['petId']; + quantity = json['quantity']; + shipDate = json['shipDate'] == null ? null : DateTime.parse(json['shipDate']); + status = json['status']; + complete = json['complete']; + } + + Map toJson() { + return { + 'id': id, + 'petId': petId, + 'quantity': quantity, + 'shipDate': shipDate == null ? '' : shipDate.toUtc().toIso8601String(), + 'status': status, + 'complete': complete + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Order.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Order.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart new file mode 100644 index 000000000000..4d2f77a1a5ae --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart @@ -0,0 +1,57 @@ +part of openapi.api; + +class Pet { + + int id = null; + + Category category = null; + + String name = null; + + List photoUrls = []; + + List tags = []; + /* pet status in the store */ + String status = null; + //enum statusEnum { available, pending, sold, };{ + Pet(); + + @override + String toString() { + return 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status, ]'; + } + + Pet.fromJson(Map json) { + if (json == null) return; + id = json['id']; + category = new Category.fromJson(json['category']); + name = json['name']; + photoUrls = (json['photoUrls'] as List).map((item) => item as String).toList(); + tags = Tag.listFromJson(json['tags']); + status = json['status']; + } + + Map toJson() { + return { + 'id': id, + 'category': category, + 'name': name, + 'photoUrls': photoUrls, + 'tags': tags, + 'status': status + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Pet.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Pet.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart new file mode 100644 index 000000000000..315a326adb72 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart @@ -0,0 +1,40 @@ +part of openapi.api; + +class Tag { + + int id = null; + + String name = null; + Tag(); + + @override + String toString() { + return 'Tag[id=$id, name=$name, ]'; + } + + Tag.fromJson(Map json) { + if (json == null) return; + id = json['id']; + name = json['name']; + } + + Map toJson() { + return { + 'id': id, + 'name': name + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new Tag.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new Tag.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart new file mode 100644 index 000000000000..0e4cc2104c76 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart @@ -0,0 +1,64 @@ +part of openapi.api; + +class User { + + int id = null; + + String username = null; + + String firstName = null; + + String lastName = null; + + String email = null; + + String password = null; + + String phone = null; + /* User Status */ + int userStatus = null; + User(); + + @override + String toString() { + return 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus, ]'; + } + + User.fromJson(Map json) { + if (json == null) return; + id = json['id']; + username = json['username']; + firstName = json['firstName']; + lastName = json['lastName']; + email = json['email']; + password = json['password']; + phone = json['phone']; + userStatus = json['userStatus']; + } + + Map toJson() { + return { + 'id': id, + 'username': username, + 'firstName': firstName, + 'lastName': lastName, + 'email': email, + 'password': password, + 'phone': phone, + 'userStatus': userStatus + }; + } + + static List listFromJson(List json) { + return json == null ? new List() : json.map((value) => new User.fromJson(value)).toList(); + } + + static Map mapFromJson(Map> json) { + var map = new Map(); + if (json != null && json.length > 0) { + json.forEach((String key, Map value) => map[key] = new User.fromJson(value)); + } + return map; + } +} + diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml b/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml new file mode 100644 index 000000000000..d54efb46a2e4 --- /dev/null +++ b/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml @@ -0,0 +1,5 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +dependencies: + http: '>=0.11.1 <0.12.0' diff --git a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/.openapi-generator-ignore b/samples/client/petstore/eiffel/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/eiffel/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/eiffel/.openapi-generator/VERSION b/samples/client/petstore/eiffel/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/eiffel/.openapi-generator/VERSION +++ b/samples/client/petstore/eiffel/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/README.md b/samples/client/petstore/eiffel/README.md index bb363368532d..25bb0357e138 100644 --- a/samples/client/petstore/eiffel/README.md +++ b/samples/client/petstore/eiffel/README.md @@ -41,6 +41,7 @@ Class | Method | HTTP request | Description *PET_API* | [**update_pet**](docs/PET_API.md#update_pet) | **Put** /pet | Update an existing pet *PET_API* | [**update_pet_with_form**](docs/PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data *PET_API* | [**upload_file**](docs/PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image +*PET_API* | [**upload_file_with_required_file**](docs/PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *STORE_API* | [**delete_order**](docs/STORE_API.md#delete_order) | **Delete** /store/order/{order_id} | Delete purchase order by ID *STORE_API* | [**inventory**](docs/STORE_API.md#inventory) | **Get** /store/inventory | Returns pet inventories by status *STORE_API* | [**order_by_id**](docs/STORE_API.md#order_by_id) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/eiffel/api_client.ecf b/samples/client/petstore/eiffel/api_client.ecf index 6f0ef48e4822..14e48f478216 100644 --- a/samples/client/petstore/eiffel/api_client.ecf +++ b/samples/client/petstore/eiffel/api_client.ecf @@ -1,5 +1,5 @@ - + diff --git a/samples/client/petstore/eiffel/docs/FAKE_API.md b/samples/client/petstore/eiffel/docs/FAKE_API.md index 94888d077727..948a89a92484 100644 --- a/samples/client/petstore/eiffel/docs/FAKE_API.md +++ b/samples/client/petstore/eiffel/docs/FAKE_API.md @@ -257,7 +257,7 @@ Name | Type | Description | Notes **enum_query_string** | **STRING_32**| Query parameter enum test (string) | [optional] [default to -efg] **enum_query_integer** | **INTEGER_32**| Query parameter enum test (double) | [optional] **enum_query_double** | **REAL_64**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | **LIST [STRING_32]**| Form parameter enum test (string array) | [optional] [default to $] + **enum_form_string_array** | [**LIST [STRING_32]**](STRING_32.md)| Form parameter enum test (string array) | [optional] [default to $] **enum_form_string** | **STRING_32**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/eiffel/docs/PET_API.md b/samples/client/petstore/eiffel/docs/PET_API.md index 2bd3122ea68b..0cd65def72d8 100644 --- a/samples/client/petstore/eiffel/docs/PET_API.md +++ b/samples/client/petstore/eiffel/docs/PET_API.md @@ -12,6 +12,7 @@ Feature | HTTP request | Description [**update_pet**](PET_API.md#update_pet) | **Put** /pet | Update an existing pet [**update_pet_with_form**](PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -249,3 +250,33 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> upload_file_with_required_file (pet_id: INTEGER_64 ; file: FILE ; additional_metadata: detachable STRING_32 ): detachable API_RESPONSE + + +uploads an image + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **INTEGER_64**| ID of pet to update | + **file** | **FILE**| file to upload | [default to null] + **additional_metadata** | **STRING_32**| Additional data to pass to server | [optional] [default to null] + +### Return type + +[**API_RESPONSE**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/eiffel/src/api/fake_api.e b/samples/client/petstore/eiffel/src/api/fake_api.e index 6e7a054c2bdc..f266f7d55592 100644 --- a/samples/client/petstore/eiffel/src/api/fake_api.e +++ b/samples/client/petstore/eiffel/src/api/fake_api.e @@ -339,7 +339,7 @@ feature -- API Access end end - test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: LIST [STRING_32]; enum_form_string: STRING_32) + test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: detachable LIST [STRING_32]; enum_form_string: STRING_32) -- To test enum parameters -- To test enum parameters -- diff --git a/samples/client/petstore/eiffel/src/api/pet_api.e b/samples/client/petstore/eiffel/src/api/pet_api.e index 17a482737ed5..e6fbb1273a8a 100644 --- a/samples/client/petstore/eiffel/src/api/pet_api.e +++ b/samples/client/petstore/eiffel/src/api/pet_api.e @@ -315,5 +315,51 @@ feature -- API Access end end + upload_file_with_required_file (pet_id: INTEGER_64; file: FILE; additional_metadata: STRING_32): detachable API_RESPONSE + -- uploads an image + -- + -- + -- argument: pet_id ID of pet to update (required) + -- + -- argument: file file to upload (required) + -- + -- argument: additional_metadata Additional data to pass to server (optional, default to null) + -- + -- + -- Result API_RESPONSE + require + local + l_path: STRING + l_request: API_CLIENT_REQUEST + l_response: API_CLIENT_RESPONSE + do + reset_error + create l_request + + l_path := "/pet/{petId}/uploadImageWithRequiredFile" + l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) + + if attached additional_metadata as l_additional_metadata then + l_request.add_form(l_additional_metadata,"additionalMetadata"); + end + if attached file as l_file then + l_request.add_form(l_file,"file"); + end + + if attached {STRING} api_client.select_header_accept (<<"application/json">>) as l_accept then + l_request.add_header(l_accept,"Accept"); + end + l_request.add_header(api_client.select_header_content_type (<<"multipart/form-data">>),"Content-Type") + l_request.set_auth_names (<<"petstore_auth">>) + l_response := api_client.call_api (l_path, "Post", l_request, Void, agent deserializer) + if l_response.has_error then + last_error := l_response.error + elseif attached { API_RESPONSE } l_response.data ({ API_RESPONSE }) as l_data then + Result := l_data + else + create last_error.make ("Unknown error: Status response [ " + l_response.status.out + "]") + end + end + end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e index 993decf6a2c2..a7bcedfd3509 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e @@ -20,7 +20,7 @@ expanded class feature -- Access from_json (a_val:STRING; a_type: TYPE [detachable ANY] ): detachable ANY - -- Deserialize a a json representation `a_val' to an object + -- Deserialize a json representation `a_val' to an object -- of type `a_type' local conv_from: JSON_BASIC_REFLECTOR_DESERIALIZER diff --git a/samples/client/petstore/eiffel/test/api_test.ecf b/samples/client/petstore/eiffel/test/api_test.ecf index ddb5082cabec..de98876e262f 100644 --- a/samples/client/petstore/eiffel/test/api_test.ecf +++ b/samples/client/petstore/eiffel/test/api_test.ecf @@ -1,5 +1,5 @@ - + diff --git a/samples/client/petstore/elixir/.openapi-generator-ignore b/samples/client/petstore/elixir/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/elixir/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/config/config.exs b/samples/client/petstore/elixir/config/config.exs index 7ce1553ff17a..72508194de35 100644 --- a/samples/client/petstore/elixir/config/config.exs +++ b/samples/client/petstore/elixir/config/config.exs @@ -10,11 +10,11 @@ use Mix.Config # You can configure for your application as: # -# config :swagger_petstore, key: :value +# config :open_api_petstore, key: :value # # And access this configuration in your application as: # -# Application.get_env(:swagger_petstore, :key) +# Application.get_env(:open_api_petstore, :key) # # Or configure a 3rd-party app: # diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index 92281bc7f3c1..31050082ad16 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -271,7 +271,7 @@ defmodule OpenapiPetstore.Api.Fake do ## Parameters - connection (OpenapiPetstore.Connection): Connection to server - - request_body (String.t): request body + - request_body (%{optional(String.t) => String.t}): request body - opts (KeywordList): [optional] Optional parameters ## Returns diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex index ba926165d6db..e89a145e7939 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex @@ -220,4 +220,34 @@ defmodule OpenapiPetstore.Api.Pet do |> (&Connection.request(connection, &1)).() |> decode(%OpenapiPetstore.Model.ApiResponse{}) end + + @doc """ + uploads an image + + ## Parameters + + - connection (OpenapiPetstore.Connection): Connection to server + - pet_id (integer()): ID of pet to update + - file (String.t): file to upload + - opts (KeywordList): [optional] Optional parameters + - :additional_metadata (String.t): Additional data to pass to server + ## Returns + + {:ok, %OpenapiPetstore.Model.ApiResponse{}} on success + {:error, info} on failure + """ + @spec upload_file_with_required_file(Tesla.Env.client, integer(), String.t, keyword()) :: {:ok, OpenapiPetstore.Model.ApiResponse.t} | {:error, Tesla.Env.t} + def upload_file_with_required_file(connection, pet_id, file, opts \\ []) do + optional_params = %{ + :"additionalMetadata" => :form + } + %{} + |> method(:post) + |> url("/pet/#{pet_id}/uploadImageWithRequiredFile") + |> add_param(:file, :"file", file) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> decode(%OpenapiPetstore.Model.ApiResponse{}) + end end diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex index a26f07618129..834cc003d108 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex @@ -15,7 +15,7 @@ defmodule OpenapiPetstore.Connection do plug Tesla.Middleware.EncodeJson @doc """ - Configure an client connection using Basic authentication. + Configure a client connection using Basic authentication. ## Parameters diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-client/.openapi-generator/VERSION b/samples/client/petstore/erlang-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/erlang-client/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/.openapi-generator/VERSION b/samples/client/petstore/flash/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/flash/.openapi-generator/VERSION +++ b/samples/client/petstore/flash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/flash/build.xml b/samples/client/petstore/flash/flash/build.xml index da3c67f83443..dedf7e030081 100644 --- a/samples/client/petstore/flash/flash/build.xml +++ b/samples/client/petstore/flash/flash/build.xml @@ -15,7 +15,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -189,4 +189,4 @@ - \ No newline at end of file + diff --git a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as index 964dbc26d692..abb0fe121fb2 100644 --- a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as +++ b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as @@ -11,7 +11,7 @@ import flash.events.Event; public class ApiClientEvent extends Event{ /** - * Event type to indicate a unsuccessful invocation + * Event type to indicate an unsuccessful invocation */ public static const FAILURE_EVENT:String = "unsuccesfulInvocation"; @@ -33,4 +33,4 @@ public class ApiClientEvent extends Event{ super(type, bubbles, cancelable); } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index dfb07bd7fdf6..e6f811087550 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -50,6 +50,7 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index c5c2dfaffa71..670b9e7adecc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -282,6 +282,46 @@ paths: summary: uploads an image tags: - pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 37db3a5b3535..f44bbc804da4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -696,3 +696,106 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt return localVarReturnValue, localVarHttpResponse, nil } + +/* +PetApiService uploads an image + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param petId ID of pet to update + * @param file file to upload + * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: + * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server +@return ApiResponse +*/ + +type UploadFileWithRequiredFileOpts struct { + AdditionalMetadata optional.String +} + +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ApiResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImageWithRequiredFile" + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { + localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + } + localVarFile := file + if localVarFile != nil { + fbs, _ := ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ApiResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index 9a78c747da00..402f31e72910 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **AddPet** @@ -257,3 +258,40 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional) +uploads an image + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **petId** | **int64**| ID of pet to update | + **file** | ***os.File*****os.File**| file to upload | + **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **additionalMetadata** | **optional.String**| Additional data to pass to server | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/README.md b/samples/client/petstore/haskell-http-client/README.md index 7e2167a91d90..df8a36316301 100644 --- a/samples/client/petstore/haskell-http-client/README.md +++ b/samples/client/petstore/haskell-http-client/README.md @@ -2,7 +2,7 @@ The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the OpenAPI Petstore API. -OpenApi Version: 3.0.0 +OpenApi Version: 3.0.1 ## Installation @@ -36,7 +36,7 @@ to obtain and use the openapi-generator cli tool lives at https://openapi-generator.tech -The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be +The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be ``` haskell-http-client diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs index 4e71ab9e7206..83e607b1ad72 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs index 3c3deada26b9..7335a85067e3 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs index d6187951efe7..0deb75364af9 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs index 6e27a5fe5b1b..fa21cfee9f26 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -64,10 +64,11 @@ import qualified Prelude as P -- Test serialization of outer boolean types -- fakeOuterBooleanSerialize - :: (Consumes FakeOuterBooleanSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize MimeJSON Bool accept -fakeOuterBooleanSerialize _ = + :: (Consumes FakeOuterBooleanSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept +fakeOuterBooleanSerialize _ _ = _mkRequest "POST" ["/fake/outer/boolean"] data FakeOuterBooleanSerialize @@ -75,9 +76,6 @@ data FakeOuterBooleanSerialize -- | /Body Param/ "body" - Input boolean as post body instance HasBodyParam FakeOuterBooleanSerialize BodyBool --- | @application/json@ -instance Consumes FakeOuterBooleanSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype @@ -89,10 +87,11 @@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype -- Test serialization of object with outer number type -- fakeOuterCompositeSerialize - :: (Consumes FakeOuterCompositeSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize MimeJSON OuterComposite accept -fakeOuterCompositeSerialize _ = + :: (Consumes FakeOuterCompositeSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept +fakeOuterCompositeSerialize _ _ = _mkRequest "POST" ["/fake/outer/composite"] data FakeOuterCompositeSerialize @@ -100,9 +99,6 @@ data FakeOuterCompositeSerialize -- | /Body Param/ "OuterComposite" - Input composite as post body instance HasBodyParam FakeOuterCompositeSerialize OuterComposite --- | @application/json@ -instance Consumes FakeOuterCompositeSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype @@ -114,10 +110,11 @@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype -- Test serialization of outer number types -- fakeOuterNumberSerialize - :: (Consumes FakeOuterNumberSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterNumberSerialize MimeJSON Double accept -fakeOuterNumberSerialize _ = + :: (Consumes FakeOuterNumberSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept +fakeOuterNumberSerialize _ _ = _mkRequest "POST" ["/fake/outer/number"] data FakeOuterNumberSerialize @@ -125,9 +122,6 @@ data FakeOuterNumberSerialize -- | /Body Param/ "body" - Input number as post body instance HasBodyParam FakeOuterNumberSerialize Body --- | @application/json@ -instance Consumes FakeOuterNumberSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype @@ -139,10 +133,11 @@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype -- Test serialization of outer string types -- fakeOuterStringSerialize - :: (Consumes FakeOuterStringSerialize MimeJSON) - => Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterStringSerialize MimeJSON Text accept -fakeOuterStringSerialize _ = + :: (Consumes FakeOuterStringSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept +fakeOuterStringSerialize _ _ = _mkRequest "POST" ["/fake/outer/string"] data FakeOuterStringSerialize @@ -150,13 +145,33 @@ data FakeOuterStringSerialize -- | /Body Param/ "body" - Input string as post body instance HasBodyParam FakeOuterStringSerialize BodyText --- | @application/json@ -instance Consumes FakeOuterStringSerialize MimeJSON - -- | @*/*@ instance MimeType mtype => Produces FakeOuterStringSerialize mtype +-- *** testBodyWithQueryParams + +-- | @PUT \/fake\/body-with-query-params@ +-- +testBodyWithQueryParams + :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) + => User -- ^ "user" + -> Query -- ^ "query" + -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent +testBodyWithQueryParams user (Query query) = + _mkRequest "PUT" ["/fake/body-with-query-params"] + `setBodyParam` user + `setQuery` toQuery ("query", Just query) + +data TestBodyWithQueryParams +instance HasBodyParam TestBodyWithQueryParams User + +-- | @application/json@ +instance Consumes TestBodyWithQueryParams MimeJSON + +instance Produces TestBodyWithQueryParams MimeNoContent + + -- *** testClientModel -- | @PATCH \/fake@ @@ -307,7 +322,7 @@ instance HasOptionalParam TestEnumParameters EnumHeaderString where -- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumQueryStringArray where applyOptionalParam req (EnumQueryStringArray xs) = - req `setQuery` toQueryColl MultiParamArray ("enum_query_string_array", Just xs) + req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) -- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumQueryString where diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs index e1776cbfd8b7..5719e3c4cd4b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs index 16797e4fdbf5..48c91af3aaa4 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -292,3 +292,35 @@ instance Consumes UploadFile MimeMultipartFormData -- | @application/json@ instance Produces UploadFile MimeJSON + +-- *** uploadFileWithRequiredFile + +-- | @POST \/pet\/{petId}\/uploadImageWithRequiredFile@ +-- +-- uploads an image +-- +-- AuthMethod: 'AuthOAuthPetstoreAuth' +-- +uploadFileWithRequiredFile + :: (Consumes UploadFileWithRequiredFile MimeMultipartFormData) + => File -- ^ "file" - file to upload + -> PetId -- ^ "petId" - ID of pet to update + -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON +uploadFileWithRequiredFile (File file) (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId,"/uploadImageWithRequiredFile"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) + `_addMultiFormPart` NH.partFileSource "file" file + +data UploadFileWithRequiredFile + +-- | /Optional Param/ "additionalMetadata" - Additional data to pass to server +instance HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata where + applyOptionalParam req (AdditionalMetadata xs) = + req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) + +-- | @multipart/form-data@ +instance Consumes UploadFileWithRequiredFile MimeMultipartFormData + +-- | @application/json@ +instance Produces UploadFileWithRequiredFile MimeJSON + diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs index 628da5181219..12bcd0bc94a7 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -128,11 +128,12 @@ instance Produces GetOrderById MimeJSON -- Place an order for a pet -- placeOrder - :: (Consumes PlaceOrder MimeJSON, MimeRender MimeJSON Order) - => Accept accept -- ^ request accept ('MimeType') + :: (Consumes PlaceOrder contentType, MimeRender contentType Order) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') -> Order -- ^ "order" - order placed for purchasing the pet - -> OpenAPIPetstoreRequest PlaceOrder MimeJSON Order accept -placeOrder _ order = + -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept +placeOrder _ _ order = _mkRequest "POST" ["/store/order"] `setBodyParam` order @@ -141,9 +142,6 @@ data PlaceOrder -- | /Body Param/ "Order" - order placed for purchasing the pet instance HasBodyParam PlaceOrder Order --- | @application/json@ -instance Consumes PlaceOrder MimeJSON - -- | @application/xml@ instance Produces PlaceOrder MimeXML -- | @application/json@ diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs index 76b4963a8f10..efc6ad66f315 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -66,10 +66,11 @@ import qualified Prelude as P -- This can only be done by the logged in user. -- createUser - :: (Consumes CreateUser MimeJSON, MimeRender MimeJSON User) - => User -- ^ "user" - Created user object - -> OpenAPIPetstoreRequest CreateUser MimeJSON NoContent MimeNoContent -createUser user = + :: (Consumes CreateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User -- ^ "user" - Created user object + -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent +createUser _ user = _mkRequest "POST" ["/user"] `setBodyParam` user @@ -78,9 +79,6 @@ data CreateUser -- | /Body Param/ "User" - Created user object instance HasBodyParam CreateUser User --- | @application/json@ -instance Consumes CreateUser MimeJSON - instance Produces CreateUser MimeNoContent @@ -91,10 +89,11 @@ instance Produces CreateUser MimeNoContent -- Creates list of users with given input array -- createUsersWithArrayInput - :: (Consumes CreateUsersWithArrayInput MimeJSON, MimeRender MimeJSON User2) - => User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithArrayInput MimeJSON NoContent MimeNoContent -createUsersWithArrayInput user = + :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType User2) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent +createUsersWithArrayInput _ user = _mkRequest "POST" ["/user/createWithArray"] `setBodyParam` user @@ -103,9 +102,6 @@ data CreateUsersWithArrayInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithArrayInput User2 --- | @application/json@ -instance Consumes CreateUsersWithArrayInput MimeJSON - instance Produces CreateUsersWithArrayInput MimeNoContent @@ -116,10 +112,11 @@ instance Produces CreateUsersWithArrayInput MimeNoContent -- Creates list of users with given input array -- createUsersWithListInput - :: (Consumes CreateUsersWithListInput MimeJSON, MimeRender MimeJSON User2) - => User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithListInput MimeJSON NoContent MimeNoContent -createUsersWithListInput user = + :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType User2) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent +createUsersWithListInput _ user = _mkRequest "POST" ["/user/createWithList"] `setBodyParam` user @@ -128,9 +125,6 @@ data CreateUsersWithListInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithListInput User2 --- | @application/json@ -instance Consumes CreateUsersWithListInput MimeJSON - instance Produces CreateUsersWithListInput MimeNoContent @@ -223,11 +217,12 @@ instance Produces LogoutUser MimeNoContent -- This can only be done by the logged in user. -- updateUser - :: (Consumes UpdateUser MimeJSON, MimeRender MimeJSON User) - => User -- ^ "user" - Updated user object + :: (Consumes UpdateUser contentType, MimeRender contentType User) + => ContentType contentType -- ^ request content-type ('MimeType') + -> User -- ^ "user" - Updated user object -> Username -- ^ "username" - name that need to be deleted - -> OpenAPIPetstoreRequest UpdateUser MimeJSON NoContent MimeNoContent -updateUser user (Username username) = + -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent +updateUser _ user (Username username) = _mkRequest "PUT" ["/user/",toPath username] `setBodyParam` user @@ -236,8 +231,5 @@ data UpdateUser -- | /Body Param/ "User" - Updated user object instance HasBodyParam UpdateUser User --- | @application/json@ -instance Consumes UpdateUser MimeJSON - instance Produces UpdateUser MimeNoContent diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs index d9203a5bd4f2..31cd12f7adaf 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs index 019f2ce6131c..6fbc9899d343 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs index 3241dbd85a5d..8e3d4ac772bc 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs index 33b2868d0fa6..0da4b6310f07 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 60bcf3a4b692..602a1b79a46b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -168,6 +168,9 @@ newtype PatternWithoutDelimiter = PatternWithoutDelimiter { unPatternWithoutDeli -- ** PetId newtype PetId = PetId { unPetId :: Integer } deriving (P.Eq, P.Show) +-- ** Query +newtype Query = Query { unQuery :: Text } deriving (P.Eq, P.Show) + -- ** RequestBody newtype RequestBody = RequestBody { unRequestBody :: (Map.Map String Text) } deriving (P.Eq, P.Show, A.ToJSON) diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index cef3d3da526b..149d051ad4d2 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.0 + OpenAPI Version: 3.0.1 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal index 456867d65121..a4c4bbb6e9f0 100644 --- a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal +++ b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal @@ -10,7 +10,7 @@ description: . . OpenAPI Petstore API version: 1.0.0 . - OpenAPI version: 3.0.0 + OpenAPI version: 3.0.1 . category: Web homepage: https://openapi-generator.tech diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index b3a6fbc50e50..670b9e7adecc 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1,161 +1,199 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \' license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io:80/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: addPet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + put: operationId: updatePet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string + default: available enum: - available - pending - sold - default: available + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -163,135 +201,158 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet + /pet/{petId}/uploadImage: + post: + operationId: uploadFile parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId + - description: ID of pet to update in: path - description: Pet id to delete + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: - 400: - description: Invalid pet value + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - /pet/{petId}/uploadImage: - post: + summary: uploads an image tags: - pet - summary: uploads an image - operationId: uploadFile + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -299,30 +360,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store /store/order/{order_id}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: order_id + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: order_id + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: order_id required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -330,146 +410,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: order_id - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation - /user/createWithArray: - post: + summary: Create user tags: - user - summary: Creates list of users with given input array + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - /user/createWithList: - post: + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation - /user/login: - get: + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: - description: date in UTC when toekn expires - style: simple - explode: false + description: date in UTC when token expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied - /user/logout: - get: + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + /user/logout: + get: operationId: logoutUser responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -477,179 +568,188 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - put: + summary: Get user by user name tags: - user - summary: Updated user + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found /fake_classname_test: patch: - tags: - - fake_classname_tags 123#$%^ - summary: To test class name in snake case description: To test class name in snake case operationId: testClassname requestBody: - $ref: '#/components/requestBodies/Client' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' + description: successful operation security: - api_key_query: [] + summary: To test class name in snake case + tags: + - fake_classname_tags 123#$%^ /fake: get: - tags: - - fake - summary: To test enum parameters description: To test enum parameters operationId: testEnumParameters parameters: - - name: enum_header_string_array + - description: Header parameter enum test (string array) + explode: false in: header - description: Header parameter enum test (string array) - required: false - style: simple - explode: true + name: enum_header_string_array schema: - type: array items: - type: string + default: $ enum: - '>' - $ - default: $ - - name: enum_header_string - in: header - description: Header parameter enum test (string) - required: false + type: string + type: array style: simple - explode: false + - description: Header parameter enum test (string) + in: header + name: enum_header_string schema: - type: string + default: -efg enum: - _abc - -efg - (xyz) - default: -efg - - name: enum_query_string_array + type: string + - description: Query parameter enum test (string array) + explode: false in: query - description: Query parameter enum test (string array) - required: false - style: form - explode: true + name: enum_query_string_array schema: - type: array items: - type: string + default: $ enum: - '>' - $ - default: $ - - name: enum_query_string - in: query - description: Query parameter enum test (string) - required: false + type: string + type: array style: form - explode: true + - description: Query parameter enum test (string) + in: query + name: enum_query_string schema: - type: string + default: -efg enum: - _abc - -efg - (xyz) - default: -efg - - name: enum_query_integer + type: string + - description: Query parameter enum test (double) in: query - description: Query parameter enum test (double) - required: false - style: form - explode: true + name: enum_query_integer schema: - type: integer - format: int32 enum: - 1 - -2 - - name: enum_query_double + format: int32 + type: integer + - description: Query parameter enum test (double) in: query - description: Query parameter enum test (double) - required: false - style: form - explode: true + name: enum_query_double schema: - type: number - format: double enum: - 1.1 - -1.2 + format: double + type: number requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_2' + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + items: + default: $ + enum: + - '>' + - $ + type: string + type: array + enum_form_string: + default: -efg + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + type: string responses: 400: + content: {} description: Invalid request 404: + content: {} description: Not found - post: + summary: To test enum parameters tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + patch: + description: To test "client" model + operationId: testClientModel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: successful operation + summary: To test "client" model + tags: + - fake + post: description: | Fake endpoint for testing various parameters 假端點 @@ -660,208 +760,288 @@ paths: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_3' + properties: + integer: + description: None + maximum: 100 + minimum: 10 + type: integer + int32: + description: None + format: int32 + maximum: 200 + minimum: 20 + type: integer + int64: + description: None + format: int64 + type: integer + number: + description: None + maximum: 543.2 + minimum: 32.1 + type: number + float: + description: None + format: float + maximum: 987.6 + type: number + double: + description: None + format: double + maximum: 123.4 + minimum: 67.8 + type: number + string: + description: None + pattern: /[a-z]/i + type: string + pattern_without_delimiter: + description: None + pattern: ^[A-Z].* + type: string + byte: + description: None + format: byte + type: string + binary: + description: None + format: binary + type: string + date: + description: None + format: date + type: string + dateTime: + description: None + format: date-time + type: string + password: + description: None + format: password + maxLength: 64 + minLength: 10 + type: string + callback: + description: None + type: string + required: + - byte + - double + - number + - pattern_without_delimiter + required: true responses: 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found security: - http_basic_test: [] - patch: + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake - summary: To test "client" model - description: To test "client" model - operationId: testClientModel - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - description: successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/Client' /fake/outer/number: post: - tags: - - fake description: Test serialization of outer number types operationId: fakeOuterNumberSerialize requestBody: - description: Input number as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + required: false responses: 200: - description: Output number content: '*/*': schema: $ref: '#/components/schemas/OuterNumber' - /fake/outer/string: - post: + description: Output number tags: - fake + /fake/outer/string: + post: description: Test serialization of outer string types operationId: fakeOuterStringSerialize requestBody: - description: Input string as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterString' + description: Input string as post body + required: false responses: 200: - description: Output string content: '*/*': schema: $ref: '#/components/schemas/OuterString' - /fake/outer/boolean: - post: + description: Output string tags: - fake + /fake/outer/boolean: + post: description: Test serialization of outer boolean types operationId: fakeOuterBooleanSerialize requestBody: - description: Input boolean as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + required: false responses: 200: - description: Output boolean content: '*/*': schema: $ref: '#/components/schemas/OuterBoolean' - /fake/outer/composite: - post: + description: Output boolean tags: - fake + /fake/outer/composite: + post: description: Test serialization of object with outer number type operationId: fakeOuterCompositeSerialize requestBody: - description: Input composite as post body content: - application/json: + '*/*': schema: $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + required: false responses: 200: - description: Output composite content: '*/*': schema: $ref: '#/components/schemas/OuterComposite' - /fake/jsonFormData: - get: + description: Output composite tags: - fake - summary: test json serialization of form data + /fake/jsonFormData: + get: operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body_4' + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + required: true responses: 200: + content: {} description: successful operation - /fake/inline-additionalProperties: - post: + summary: test json serialization of form data tags: - fake - summary: test inline additionalProperties + /fake/inline-additionalProperties: + post: operationId: testInlineAdditionalProperties requestBody: - description: request body content: application/json: schema: - type: object additionalProperties: type: string + type: object + description: request body required: true responses: 200: + content: {} description: successful operation + summary: test inline additionalProperties + tags: + - fake + /fake/body-with-query-params: + put: + operationId: testBodyWithQueryParams + parameters: + - in: query + name: query + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + responses: + 200: + content: {} + description: Success + tags: + - fake /another-fake/dummy: patch: - tags: - - $another-fake? - summary: To test special tags description: To test special tags operationId: test_special_tags requestBody: - $ref: '#/components/requestBodies/Client' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' + description: successful operation + summary: To test special tags + tags: + - $another-fake? components: schemas: - Order: - type: object - properties: - id: - type: integer - format: int64 - petId: - type: integer - format: int64 - quantity: - type: integer - format: int32 - shipDate: - type: string - format: date-time - status: - type: string - description: Order Status - enum: - - placed - - approved - - delivered - complete: - type: boolean - default: false - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - xml: - name: Order Category: - type: object + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - example: - name: name - id: 6 + type: object xml: name: Category User: - type: object + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer x-is-unique: true username: type: string @@ -876,420 +1056,267 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + type: object xml: name: User - Tag: - type: object + OuterNumber: + type: number + ArrayOfNumberOnly: properties: - id: - type: integer - format: int64 - name: - type: string - example: - name: name - id: 1 - xml: - name: Tag - Pet: - required: - - name - - photoUrls + ArrayNumber: + items: + type: number + type: array type: object + Capitalization: properties: - id: - type: integer - format: int64 - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: + smallCamel: type: string - example: doggie - photoUrls: - type: array - xml: - name: photoUrl - wrapped: true - items: - type: string - tags: - type: array - xml: - name: tag - wrapped: true - items: - $ref: '#/components/schemas/Tag' - status: + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet type: string - description: pet status in the store - enum: - - available - - pending - - sold - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - xml: - name: Pet - ApiResponse: type: object + MixedPropertiesAndAdditionalPropertiesClass: properties: - code: - type: integer - format: int32 - type: + uuid: + format: uuid type: string - message: + dateTime: + format: date-time type: string + map: + additionalProperties: + $ref: '#/components/schemas/Animal' + type: object + type: object + ApiResponse: example: code: 0 type: type message: message - Return: properties: - return: - type: integer + code: format: int32 - description: Model for testing reserved words - xml: - name: Return + type: integer + type: + type: string + message: + type: string + type: object Name: - required: - - name + description: Model for testing model name same as property name properties: name: - type: integer format: int32 - snake_case: type: integer + snake_case: format: int32 readOnly: true + type: integer property: type: string 123Number: - type: integer - format: int32 readOnly: true - description: Model for testing model name same as property name + type: integer + required: + - name + type: object xml: name: Name + EnumClass: + default: -efg + enum: + - _abc + - -efg + - (xyz) + type: string + List: + properties: + 123-list: + type: string + type: object + NumberOnly: + properties: + JustNumber: + type: number + type: object 200_response: + description: Model for testing model name starting with number properties: name: - type: integer format: int32 + type: integer class: type: string - description: Model for testing model name starting with number + type: object xml: name: Name - ClassModel: + Client: + example: + client: client properties: - _class: + client: type: string - description: Model for testing model with "_class" property + type: object Dog: allOf: - $ref: '#/components/schemas/Animal' - - type: object - properties: + - properties: breed: type: string - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - type: object - properties: - declawed: - type: boolean - Animal: - required: - - className - type: object + type: object + Enum_Test: properties: - className: + enum_string: + enum: + - UPPER + - lower + - "" type: string - color: + enum_string_required: + enum: + - UPPER + - lower + - "" type: string - default: red - discriminator: - propertyName: className - AnimalFarm: - type: array - items: - $ref: '#/components/schemas/Animal' - format_test: + enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer + enum_number: + enum: + - 1.1 + - -1.2 + format: double + type: number + outerEnum: + $ref: '#/components/schemas/OuterEnum' required: - - byte - - date - - number - - password + - enum_string_required type: object + Order: + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: - integer: - maximum: 100 - minimum: 10 + id: + format: int64 type: integer - format: int32 - int32: - maximum: 200 - minimum: 20 + petId: + format: int64 type: integer + quantity: format: int32 - int64: type: integer - format: int64 - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - maximum: 987.6 - minimum: 54.3 - type: number - format: float - double: - maximum: 123.4 - minimum: 67.8 - type: number - format: double - string: - type: string - byte: - type: string - format: byte - binary: - type: string - format: binary - date: - type: string - format: date - dateTime: - type: string + shipDate: format: date-time - uuid: - type: string - format: uuid - password: - maxLength: 64 - minLength: 10 - type: string - format: password - EnumClass: - type: string - enum: - - _abc - - -efg - - (xyz) - default: -efg - Enum_Test: - required: - - enum_string_required - type: object - properties: - enum_string: type: string + status: + description: Order Status enum: - - UPPER - - lower - - "" - enum_string_required: + - placed + - approved + - delivered type: string - enum: - - UPPER - - lower - - "" - enum_integer: - type: integer - format: int32 - enum: - - 1 - - -1 - enum_number: - type: number - format: double - enum: - - 1.1 - - -1.2 - outerEnum: - $ref: '#/components/schemas/OuterEnum' - AdditionalPropertiesClass: + complete: + default: false + type: boolean type: object + xml: + name: Order + AdditionalPropertiesClass: properties: map_property: - type: object additionalProperties: type: string - map_of_map_property: type: object + map_of_map_property: additionalProperties: - type: object additionalProperties: type: string - MixedPropertiesAndAdditionalPropertiesClass: - type: object - properties: - uuid: - type: string - format: uuid - dateTime: - type: string - format: date-time - map: + type: object type: object - additionalProperties: - $ref: '#/components/schemas/Animal' - List: type: object + $special[model.name]: properties: - 123-list: - type: string - Client: + $special[property.name]: + format: int64 + type: integer type: object + xml: + name: $special[model.name] + Return: + description: Model for testing reserved words properties: - client: - type: string - example: - client: client - ReadOnlyFirst: + return: + format: int32 + type: integer type: object + xml: + name: Return + ReadOnlyFirst: properties: bar: - type: string readOnly: true - baz: - type: string - hasOnlyReadOnly: - type: object - properties: - bar: type: string - readOnly: true - foo: + baz: type: string - readOnly: true - Capitalization: type: object + ArrayOfArrayOfNumberOnly: properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - type: string - description: | - Name of the pet - MapTest: + ArrayArrayNumber: + items: + items: + type: number + type: array + type: array type: object - properties: - map_map_of_string: - type: object - additionalProperties: - type: object - additionalProperties: - type: string - map_of_enum_string: - type: object - additionalProperties: - type: string - enum: - - UPPER - - lower + OuterEnum: + enum: + - placed + - approved + - delivered + type: string ArrayTest: - type: object properties: array_of_string: - type: array items: type: string - array_array_of_integer: type: array + array_array_of_integer: items: - type: array items: - type: integer format: int64 - array_array_of_model: + type: integer + type: array type: array + array_array_of_model: items: - type: array items: $ref: '#/components/schemas/ReadOnlyFirst' - NumberOnly: - type: object - properties: - JustNumber: - type: number - ArrayOfNumberOnly: - type: object - properties: - ArrayNumber: - type: array - items: - type: number - ArrayOfArrayOfNumberOnly: - type: object - properties: - ArrayArrayNumber: - type: array - items: type: array - items: - type: number - EnumArrays: - type: object - properties: - just_symbol: - type: string - enum: - - '>=' - - $ - array_enum: type: array - items: - type: string - enum: - - fish - - crab - OuterEnum: - type: string - enum: - - placed - - approved - - delivered - OuterComposite: type: object + OuterComposite: + example: {} properties: my_number: $ref: '#/components/schemas/OuterNumber' @@ -1297,186 +1324,222 @@ components: $ref: '#/components/schemas/OuterString' my_boolean: $ref: '#/components/schemas/OuterBoolean' - example: {} - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - _special_model.name_: - properties: - $special[property.name]: - type: integer - format: int64 - xml: - name: $special[model.name] - body: - type: object - properties: - name: - type: string - description: Updated name of the pet - status: - type: string - description: Updated status of the pet - body_1: - type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - body_2: - type: object - properties: - enum_form_string_array: - type: array - description: Form parameter enum test (string array) - items: - type: string - enum: - - '>' - - $ - default: $ - enum_form_string: - type: string - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - default: -efg - body_3: - required: - - byte - - double - - number - - pattern_without_delimiter type: object + format_test: properties: integer: - maximum: 100 - minimum: 10 + maximum: 1E+2 + minimum: 1E+1 type: integer - description: None - format: int32 int32: - maximum: 200 - minimum: 20 - type: integer - description: None format: int32 - int64: + maximum: 2E+2 + minimum: 2E+1 type: integer - description: None + int64: format: int64 + type: integer number: maximum: 543.2 minimum: 32.1 type: number - description: None float: + format: float maximum: 987.6 + minimum: 54.3 type: number - description: None - format: float double: + format: double maximum: 123.4 minimum: 67.8 type: number - description: None - format: double string: + pattern: /[a-z]/i type: string - description: None - pattern_without_delimiter: - type: string - description: None byte: - type: string - description: None format: byte - binary: + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ type: string - description: None + binary: format: binary - date: type: string - description: None + date: format: date - dateTime: type: string - description: None + dateTime: format: date-time + type: string + uuid: + format: uuid + type: string password: + format: password maxLength: 64 minLength: 10 type: string - description: None - format: password - callback: - type: string - description: None - body_4: required: - - param - - param2 + - byte + - date + - number + - password type: object + EnumArrays: properties: - param: + just_symbol: + enum: + - '>=' + - $ type: string - description: field1 - param2: + array_enum: + items: + enum: + - fish + - crab + type: string + type: array + type: object + OuterString: + type: string + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: type: string - description: field2 - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Client: - description: client model - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - required: true + type: object + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + Animal: + discriminator: + propertyName: className + properties: + className: + type: string + color: + default: red + type: string + required: + - className + type: object + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - properties: + declawed: + type: boolean + type: object + MapTest: + properties: + map_map_of_string: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + map_of_enum_string: + additionalProperties: + enum: + - UPPER + - lower + type: string + type: object + type: object + Tag: + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: Tag + AnimalFarm: + items: + $ref: '#/components/schemas/Animal' + type: array Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: Pet + hasOnlyReadOnly: + properties: + bar: + readOnly: true + type: string + foo: + readOnly: true + type: string + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 + http_basic_test: + scheme: basic + type: http api_key: - type: apiKey - name: api_key in: header - api_key_query: + name: api_key type: apiKey - name: api_key_query + api_key_query: in: query - http_basic_test: - type: http - scheme: basic + name: api_key_query + type: apiKey diff --git a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index 9503c4fd15ae..268532598b00 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -110,6 +110,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-es6/docs/PetApi.md b/samples/client/petstore/javascript-es6/docs/PetApi.md index 324ecfbe867a..6cd6020a0a66 100644 --- a/samples/client/petstore/javascript-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-es6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -398,3 +399,54 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; + +// Configure OAuth2 access token for authorization: petstore_auth +let petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new OpenApiPetstore.PetApi(); +let petId = 789; // Number | ID of pet to update +let file = "/path/to/file"; // File | file to upload +let opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-es6/src/api/PetApi.js b/samples/client/petstore/javascript-es6/src/api/PetApi.js index d6b39c8671b8..f9cf80ec5284 100644 --- a/samples/client/petstore/javascript-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-es6/src/api/PetApi.js @@ -408,5 +408,61 @@ export default class PetApi { ); } + /** + * Callback function to receive the result of the uploadFileWithRequiredFile operation. + * @callback module:api/PetApi~uploadFileWithRequiredFileCallback + * @param {String} error Error message, if any. + * @param {module:model/ApiResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:model/ApiResponse} + */ + uploadFileWithRequiredFile(petId, file, opts, callback) { + opts = opts || {}; + let postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + let pathParams = { + 'petId': petId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + let authNames = ['petstore_auth']; + let contentTypes = ['multipart/form-data']; + let accepts = ['application/json']; + let returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + } diff --git a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index fa41841dab26..bfdbe52f3749 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -108,6 +108,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md index 3a402233a9ec..eadf2039c51b 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -390,3 +391,53 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; + +// Configure OAuth2 access token for authorization: petstore_auth +let petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new OpenApiPetstore.PetApi(); +let petId = 789; // Number | ID of pet to update +let file = "/path/to/file"; // File | file to upload +let opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js index a8a8d91c9502..9da0f136bebe 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js @@ -456,4 +456,67 @@ export default class PetApi { } + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response + */ + uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) { + opts = opts || {}; + let postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + let pathParams = { + 'petId': petId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + let authNames = ['petstore_auth']; + let contentTypes = ['multipart/form-data']; + let accepts = ['application/json']; + let returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} + */ + uploadFileWithRequiredFile(petId, file, opts) { + return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + } diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index a78275aee673..8cb5a9b477f5 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md index 28469bc95a1c..7d9cfc0134f1 100644 --- a/samples/client/petstore/javascript-promise/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -382,3 +383,52 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +var OpenApiPetstore = require('open_api_petstore'); +var defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure OAuth2 access token for authorization: petstore_auth +var petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OpenApiPetstore.PetApi(); +var petId = 789; // Number | ID of pet to update +var file = "/path/to/file"; // File | file to upload +var opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 435175dc8d6b..68a41803ca88 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 7821ec7a222e..2ddf6a4c78a7 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 8b07f17c78f9..31a2cc5697ab 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index 7293a03fe8eb..a94f1da8c72d 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index 68d7bd7e1022..aa3fb392389c 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * @@ -488,6 +488,71 @@ return response_and_data.data; }); } + + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response + */ + this.uploadFileWithRequiredFileWithHttpInfo = function(petId, file, opts) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + var pathParams = { + 'petId': petId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + var authNames = ['petstore_auth']; + var contentTypes = ['multipart/form-data']; + var accepts = ['application/json']; + var returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} + */ + this.uploadFileWithRequiredFile = function(petId, file, opts) { + return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } }; return exports; diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index c4b2f93bbc0d..7da89a389c8a 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index 4942cbc464b3..5d998ec12f1a 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index 25685095fb2f..501429c714a7 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 08572d900840..2d54186ad863 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 29376d771bfc..716623465cc5 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js index e1a4797eec19..55f624ee6765 100644 --- a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index 5c112418181d..c215c0e5a7a4 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index 024c26469df3..256e93e7e35b 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index ca79a7c2a6d0..03b6ca2ed5ac 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index 01b97a1b5809..b23ae3922b25 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index 05934fb253ce..07d953ad09f8 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index 10b787fed4eb..bd1c37fddf04 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index c289c6b8e5bd..6e3eb81b825b 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 6edd8fbadd04..6356546b5718 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index e563bcf7ea59..45aef43867e0 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index c308f3dc9f11..151eab76c00d 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index 07d52b119db0..7eac55a5a61a 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index d4a9f39f5661..89fce871cd52 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index 4dfc6753323a..caecbeb1fec0 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index 6c5986d48985..b9461c3de345 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 484fd0c99910..4995eb62ae73 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index ab3c2e34e343..7a67414e7d3a 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index adf82a358c28..c677dd92d383 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 62c7a2f59e32..8da729262d6a 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index 84131169fb13..0b974172bdb7 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index 87484d2ee234..15f47bf8cfc4 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index 8c851c4cec54..74e73f93bbc4 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index 389ad08e8c5c..db55400362f2 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index bfd5f3714bef..49d91d874db3 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index b4fc48476dee..769e2752c2d8 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index 9e1f532b44d0..62fd6c0cf1a5 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index 55997490b789..08b9d2269e67 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index 1b0ae1104cc6..e9b320969575 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index 22464bbe7a25..b6df224a024c 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index 9e4f88b0872e..898ac6ba5e0a 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index 06d4e6e7ad0a..6ea6b2b8017b 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index 9d9637737d0c..d21f8d30584e 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -135,6 +135,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md index fbcca8372ccc..3273a109e81a 100644 --- a/samples/client/petstore/javascript/docs/PetApi.md +++ b/samples/client/petstore/javascript/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -398,3 +399,54 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petId, file, opts) + +uploads an image + +### Example +```javascript +var OpenApiPetstore = require('open_api_petstore'); +var defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure OAuth2 access token for authorization: petstore_auth +var petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OpenApiPetstore.PetApi(); +var petId = 789; // Number | ID of pet to update +var file = "/path/to/file"; // File | file to upload +var opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.uploadFileWithRequiredFile(petId, file, opts, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **file** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index f43711962b0a..f0238f93f166 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index 73b690b0d56d..c4bc23dc811a 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 71cb70f8be7c..9da453623b29 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index 469890d60bbb..12e2115255d4 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index 840cb2fa67e9..74837e68cb04 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * @@ -441,6 +441,64 @@ authNames, contentTypes, accepts, returnType, callback ); } + + /** + * Callback function to receive the result of the uploadFileWithRequiredFile operation. + * @callback module:api/PetApi~uploadFileWithRequiredFileCallback + * @param {String} error Error message, if any. + * @param {module:model/ApiResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * uploads an image + * @param {Number} petId ID of pet to update + * @param {File} file file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:model/ApiResponse} + */ + this.uploadFileWithRequiredFile = function(petId, file, opts, callback) { + opts = opts || {}; + var postBody = null; + + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); + } + + + var pathParams = { + 'petId': petId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'file': file + }; + + var authNames = ['petstore_auth']; + var contentTypes = ['multipart/form-data']; + var accepts = ['application/json']; + var returnType = ApiResponse; + + return this.apiClient.callApi( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } }; return exports; diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index ba2c675ec771..2037d0ab0fab 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index d3e3b8513c55..4b19a6dfb7f1 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index 25685095fb2f..501429c714a7 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 08572d900840..2d54186ad863 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 29376d771bfc..716623465cc5 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js index e1a4797eec19..55f624ee6765 100644 --- a/samples/client/petstore/javascript/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index 5c112418181d..c215c0e5a7a4 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index 024c26469df3..256e93e7e35b 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index ca79a7c2a6d0..03b6ca2ed5ac 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index 01b97a1b5809..b23ae3922b25 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index 05934fb253ce..07d953ad09f8 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index 10b787fed4eb..bd1c37fddf04 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index c289c6b8e5bd..6e3eb81b825b 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 6edd8fbadd04..6356546b5718 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index e563bcf7ea59..45aef43867e0 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index c308f3dc9f11..151eab76c00d 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index 07d52b119db0..7eac55a5a61a 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index d4a9f39f5661..89fce871cd52 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index 4dfc6753323a..caecbeb1fec0 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index 6c5986d48985..b9461c3de345 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 484fd0c99910..4995eb62ae73 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index ab3c2e34e343..7a67414e7d3a 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index adf82a358c28..c677dd92d383 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 62c7a2f59e32..8da729262d6a 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index 84131169fb13..0b974172bdb7 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index 87484d2ee234..15f47bf8cfc4 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index 8c851c4cec54..74e73f93bbc4 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index 389ad08e8c5c..db55400362f2 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index bfd5f3714bef..49d91d874db3 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index b4fc48476dee..769e2752c2d8 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index 9e1f532b44d0..62fd6c0cf1a5 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index 55997490b789..08b9d2269e67 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index 1b0ae1104cc6..e9b320969575 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index 22464bbe7a25..b6df224a024c 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index 9e4f88b0872e..898ac6ba5e0a 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index 06d4e6e7ad0a..6ea6b2b8017b 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.2-SNAPSHOT + * OpenAPI Generator version: 3.0.3-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 3aa2ec3d55c3..98733af6be9c 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -31,7 +31,6 @@ public class Order { @ApiModelProperty(value = "") private Date shipDate = null; - @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java index c7e7cda691e2..e477f2bac509 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java @@ -37,7 +37,6 @@ public class Pet { @ApiModelProperty(value = "") private List tags = null; - @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index e57006827b99..36fecb1dd44c 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h index 24d89beeb61e..48a9763a971e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove a apiKey for an identifier, just set the apiKey to nil. + * To remove an apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h index e51705deb256..aeac8955cc1e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index e57006827b99..36fecb1dd44c 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h index 24d89beeb61e..48a9763a971e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove a apiKey for an identifier, just set the apiKey to nil. + * To remove an apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h index e51705deb256..aeac8955cc1e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 7b381e92c825..8180f2514f7d 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -363,6 +363,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 57f579884246..9956e4adabbd 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -412,7 +412,7 @@ Name | Type | Description | Notes **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **double**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | **ARRAY[string]**| Form parameter enum test (string array) | [optional] [default to '$'] + **enum_form_string_array** | [**ARRAY[string]**](string.md)| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] ### Return type diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 5ad3f6f41fa1..f0edd9e6fad1 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -409,3 +410,54 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata) + +uploads an image + +### Example +```perl +use Data::Dumper; +use WWW::OpenAPIClient::PetApi; +my $api_instance = WWW::OpenAPIClient::PetApi->new( + + # Configure OAuth2 access token for authorization: petstore_auth + access_token => 'YOUR_ACCESS_TOKEN', +); + +my $pet_id = 789; # int | ID of pet to update +my $file = "/path/to/file"; # string | file to upload +my $additional_metadata = "additional_metadata_example"; # string | Additional data to pass to server + +eval { + my $result = $api_instance->upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling PetApi->upload_file_with_required_file: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **string****string**| file to upload | + **additional_metadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 4bbf6bc58cec..645181bfda67 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -616,4 +616,99 @@ sub upload_file { return $_response_object; } +# +# upload_file_with_required_file +# +# uploads an image +# +# @param int $pet_id ID of pet to update (required) +# @param string $file file to upload (required) +# @param string $additional_metadata Additional data to pass to server (optional) +{ + my $params = { + 'pet_id' => { + data_type => 'int', + description => 'ID of pet to update', + required => '1', + }, + 'file' => { + data_type => 'string', + description => 'file to upload', + required => '1', + }, + 'additional_metadata' => { + data_type => 'string', + description => 'Additional data to pass to server', + required => '0', + }, + }; + __PACKAGE__->method_documentation->{ 'upload_file_with_required_file' } = { + summary => 'uploads an image', + params => $params, + returns => 'ApiResponse', + }; +} +# @return ApiResponse +# +sub upload_file_with_required_file { + my ($self, %args) = @_; + + # verify the required parameter 'pet_id' is set + unless (exists $args{'pet_id'}) { + croak("Missing the required parameter 'pet_id' when calling upload_file_with_required_file"); + } + + # verify the required parameter 'file' is set + unless (exists $args{'file'}) { + croak("Missing the required parameter 'file' when calling upload_file_with_required_file"); + } + + # parse inputs + my $_resource_path = '/pet/{petId}/uploadImageWithRequiredFile'; + + my $_method = 'POST'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); + + # path params + if ( exists $args{'pet_id'}) { + my $_base_variable = "{" . "petId" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # form params + if ( exists $args{'additional_metadata'} ) { + $form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'}); + } + + # form params + if ( exists $args{'file'} ) { + $form_params->{'file'} = [] unless defined $form_params->{'file'}; + push @{$form_params->{'file'}}, $args{'file'}; + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(petstore_auth )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('ApiResponse', $response); + return $_response_object; +} + 1; diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index cff6604b98b2..c548ce4e2898 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index a98c0247a0ce..65e37617061a 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -547,7 +547,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index b88da343a42c..c50d3da406ba 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 748cf407ea45..2454a3e61515 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -428,3 +429,57 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_file_with_required_file** +> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + +uploads an image + +### Example +```python +from __future__ import print_function +import time +import petstore_api +from petstore_api.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: petstore_auth +configuration = petstore_api.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) +pet_id = 56 # int | ID of pet to update +file = '/path/to/file' # file | file to upload +additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) + +try: + # uploads an image + api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) + pprint(api_response) +except ApiException as e: + print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet_id** | **int**| ID of pet to update | + **file** | **file**| file to upload | + **additional_metadata** | **str**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 5b62a0b12a5c..51acaabb45df 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -803,3 +803,112 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + else: + (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 + return data + + def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 + """uploads an image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) + >>> result = thread.get() + + :param async bool + :param int pet_id: ID of pet to update (required) + :param file file: file to upload (required) + :param str additional_metadata: Additional data to pass to server + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_file_with_required_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'pet_id' is set + if ('pet_id' not in params or + params['pet_id'] is None): + raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'pet_id' in params: + path_params['petId'] = params['pet_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'additional_metadata' in params: + form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['petstore_auth'] # noqa: E501 + + return self.api_client.call_api( + '/pet/{petId}/uploadImageWithRequiredFile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 432ab964f37a..b5396239330c 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/rust/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scalaz/.openapi-generator/VERSION b/samples/client/petstore/scalaz/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/scalaz/.openapi-generator/VERSION +++ b/samples/client/petstore/scalaz/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/default/.openapi-generator/VERSION b/samples/client/petstore/swift/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/default/.openapi-generator/VERSION b/samples/client/petstore/swift3/default/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 6cab307e02b1..835e55920c37 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -497,4 +497,70 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: Promise + */ + open class func uploadFileWithRequiredFile( petId: Int64, file: URL, additionalMetadata: String? = nil) -> Promise { + let deferred = Promise.pending() + uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in + if let error = error { + deferred.reject(error) + } else { + deferred.fulfill(data!) + } + } + return deferred.promise + } + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d7cd99d687a2..ad53a5e668f4 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -513,4 +513,72 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: Observable + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil) -> Observable { + return Observable.create { observer -> Disposable in + uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in + if let error = error { + observer.on(.error(error)) + } else { + observer.on(.next(data!)) + } + observer.on(.completed) + } + return Disposables.create() + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c525e66cce58..0a4b6a97a796 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,4 +355,51 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + uploads an image + - POST /pet/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter file: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(petId)" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String:Any?] = [ + "additionalMetadata": additionalMetadata, + "file": file + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + } diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md index 8c00e0668339..596c10f39374 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1 +## @ ### Building @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1 --save +npm install @ --save ``` _without publishing (not recommended):_ @@ -37,7 +37,7 @@ npm link In your project: ``` -npm link @swagger/angular2-typescript-petstore +npm link ``` __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. @@ -52,7 +52,7 @@ In your Angular project: ``` // without configuring providers -import { ApiModule } from '@swagger/angular2-typescript-petstore'; +import { ApiModule } from ''; import { HttpModule } from '@angular/http'; @@ -70,7 +70,7 @@ export class AppModule {} ``` // configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@swagger/angular2-typescript-petstore'; +import { ApiModule, Configuration, ConfigurationParameters } from ''; export function apiConfigFactory (): Configuration => { const params: ConfigurationParameters = { @@ -89,7 +89,7 @@ export class AppModule {} ``` ``` -import { DefaultApi } from '@swagger/angular2-typescript-petstore'; +import { DefaultApi } from ''; export class AppComponent { constructor(private apiGateway: DefaultApi) { } @@ -126,7 +126,7 @@ export class AppModule { If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, @@ -135,7 +135,7 @@ bootstrap(AppComponent, [ or ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; @NgModule({ imports: [], @@ -159,7 +159,7 @@ export const environment = { In the src/app/app.module.ts: ``` -import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { BASE_PATH } from ''; import { environment } from '../environments/environment'; @NgModule({ diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md index 5e33f07adc5b..5467261eaafe 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md index 5e33f07adc5b..5467261eaafe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 855ff9501eb8..82602aa4190d 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts index 68203071fd8c..8e16438c5e2d 100644 --- a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class PetApi { /** * * @summary Add a new pet to the store - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - public addPet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public addPet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling addPet.'); } @@ -71,8 +71,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -94,7 +92,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(pet); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -143,8 +141,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -389,16 +385,16 @@ export class PetApi { /** * * @summary Update an existing pet - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store */ - public updatePet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updatePet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); + // verify required parameter 'pet' is not null or undefined + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling updatePet.'); } @@ -411,8 +407,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required @@ -434,7 +428,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(pet); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -492,8 +486,6 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; // authentication (petstore_auth) required diff --git a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts index 1a7b91c282ec..ed50edd97ab4 100644 --- a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -69,8 +69,6 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -218,16 +216,16 @@ export class StoreApi { /** * * @summary Place an order for a pet - * @param body order placed for purchasing the pet + * @param order order placed for purchasing the pet */ - public placeOrder(body: models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { + public placeOrder(order: models.models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { let localVarPath = this.basePath + '/store/order'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); + // verify required parameter 'order' is not null or undefined + if (order === null || order === undefined) { + throw new Error('Required parameter order was null or undefined when calling placeOrder.'); } @@ -252,7 +250,7 @@ export class StoreApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(order); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts index 3e8308dac354..044bd54c9c71 100644 --- a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class UserApi { /** * This can only be done by the logged in user. * @summary Create user - * @param body Created user object + * @param user Created user object */ - public createUser(body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUser(user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createUser.'); } @@ -69,8 +69,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -83,7 +81,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(user); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -109,16 +107,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param body List of user object + * @param modelsUser List of user object */ - public createUsersWithArrayInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithArrayInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithArray'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); + // verify required parameter 'modelsUser' is not null or undefined + if (modelsUser === null || modelsUser === undefined) { + throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithArrayInput.'); } @@ -129,8 +127,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -143,7 +139,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(modelsUser); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -169,16 +165,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param body List of user object + * @param modelsUser List of user object */ - public createUsersWithListInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithListInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithList'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); + // verify required parameter 'modelsUser' is not null or undefined + if (modelsUser === null || modelsUser === undefined) { + throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithListInput.'); } @@ -189,8 +185,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -203,7 +197,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(modelsUser); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -249,8 +243,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -286,7 +278,7 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.User; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); @@ -426,8 +418,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -464,9 +454,9 @@ export class UserApi { * This can only be done by the logged in user. * @summary Updated user * @param username name that need to be deleted - * @param body Updated user object + * @param user Updated user object */ - public updateUser(username: string, body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updateUser(username: string, user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -476,9 +466,9 @@ export class UserApi { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); + // verify required parameter 'user' is not null or undefined + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling updateUser.'); } @@ -489,8 +479,6 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', - 'application/json' ]; @@ -503,7 +491,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(body); + requestOptions.data = JSON.stringify(user); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/git_push.sh b/samples/client/petstore/typescript-jquery/default/git_push.sh index ae01b182ae9e..8442b80bb445 100644 --- a/samples/client/petstore/typescript-jquery/default/git_push.sh +++ b/samples/client/petstore/typescript-jquery/default/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts index f86e84f93a3a..f55509ae2ba7 100644 --- a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts +++ b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Category.ts b/samples/client/petstore/typescript-jquery/default/model/Category.ts index 254c3003c89a..7def6ebb648f 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Category.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Category.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Order.ts b/samples/client/petstore/typescript-jquery/default/model/Order.ts index 2b6c7aeebd66..122efb30a437 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Order.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Pet.ts b/samples/client/petstore/typescript-jquery/default/model/Pet.ts index b878cadb9058..92925560af98 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Pet.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Pet.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Tag.ts b/samples/client/petstore/typescript-jquery/default/model/Tag.ts index 8cbdc4fa145e..9ab112007cea 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Tag.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Tag.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/User.ts b/samples/client/petstore/typescript-jquery/default/model/User.ts index fbf75dfe28e3..8e1f9d817b32 100644 --- a/samples/client/petstore/typescript-jquery/default/model/User.ts +++ b/samples/client/petstore/typescript-jquery/default/model/User.ts @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/README.md b/samples/client/petstore/typescript-jquery/npm/README.md index 6b1105e1d49c..7a4d336b17cd 100644 --- a/samples/client/petstore/typescript-jquery/npm/README.md +++ b/samples/client/petstore/typescript-jquery/npm/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build an compile the typescript sources to javascript use: +To build and compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 13b8db92be6f..a6e6c97eb340 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -56,7 +56,12 @@ class ObjectSerializer { return expectedType; // the type does not have a discriminator. use it. } else { if (data[discriminatorProperty]) { - return data[discriminatorProperty]; // use the type given in the discriminator + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } } else { return expectedType; // discriminator was not present (or an empty string) } @@ -87,6 +92,9 @@ class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } + + // Get the actual type of this object + type = this.findCorrectType(data, type); // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); @@ -144,7 +152,7 @@ export class ApiResponse { 'type'?: string; 'message'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -175,7 +183,7 @@ export class Category { 'id'?: number; 'name'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -208,7 +216,7 @@ export class Order { 'status'?: Order.StatusEnum; 'complete'?: boolean; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -268,7 +276,7 @@ export class Pet { */ 'status'?: Pet.StatusEnum; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -321,7 +329,7 @@ export class Tag { 'id'?: number; 'name'?: string; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -356,7 +364,7 @@ export class User { */ 'userStatus'?: number; - static discriminator = undefined; + static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index 2005298bd9bb..48691faac6da 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -16,13 +16,12 @@ "bluebird": "^3.5.0", "request": "^2.81.0", "@types/bluebird": "*", - "@types/request": "*", - "rewire": "^3.0.2" + "@types/request": "*" }, "devDependencies": { "typescript": "^2.4.2" }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" + "publishConfig":{ + "registry":"https://skimdb.npmjs.com/registry" } } diff --git a/samples/client/test/swift4/default/.openapi-generator/VERSION b/samples/client/test/swift4/default/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/client/test/swift4/default/.openapi-generator/VERSION +++ b/samples/client/test/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient.podspec b/samples/client/test/swift4/default/TestClient.podspec index 1c434b30306c..83aee4c5d052 100644 --- a/samples/client/test/swift4/default/TestClient.podspec +++ b/samples/client/test/swift4/default/TestClient.podspec @@ -4,10 +4,10 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' s.version = '0.0.1' - s.source = { :git => 'git@github.com:swagger-api/swagger-mustache.git', :tag => 'v1.0.0' } + s.source = { :git => 'git@github.com:openapitools/openapi-generator.git', :tag => 'v1.0.0' } s.authors = '' s.license = 'Proprietary' - s.homepage = 'https://github.com/swagger-api/swagger-codegen' + s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'TestClient' s.source_files = 'TestClient/Classes/**/*.swift' s.dependency 'Alamofire', '~> 4.5.0' diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 000000000000..3c7b53f81496 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,65 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + + public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? Array { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 000000000000..6835520c9904 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,61 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class TestClientAPI { + open static var basePath = "http://api.example.com/basePath" + open static var credential: URLCredential? + open static var customHeaders: [String:String] = [:] + open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String:String] + public let parameters: [String:Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((Progress) -> ())? + + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(TestClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders:[String:String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = TestClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift new file mode 100644 index 000000000000..537b874f2621 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift @@ -0,0 +1,49 @@ +// +// Swift4TestAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + + + +open class Swift4TestAPI { + /** + Get all of the models + + - parameter clientId: (query) id that represent the Api client + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getAllModels(clientId: String, completion: @escaping ((_ data: GetAllModelsResult?,_ error: Error?) -> Void)) { + getAllModelsWithRequestBuilder(clientId: clientId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + Get all of the models + - GET /allModels + - This endpoint tests get a dictionary which contains examples of all of the models. + - parameter clientId: (query) id that represent the Api client + - returns: RequestBuilder + */ + open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { + let path = "/allModels" + let URLString = TestClientAPI.basePath + path + let parameters: [String:Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "client_id": clientId + ]) + + let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift new file mode 100644 index 000000000000..280b4e53389d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -0,0 +1,413 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +// Store manager to retain its reference +private var managerStore: [String: Alamofire.SessionManager] = [:] + +open class AlamofireRequestBuilder: RequestBuilder { + required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + open func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + let managerId:String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } + else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, completion) + case .failure(let encodingError): + completion(nil, ErrorResponse.error(415, nil, encodingError)) + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + _ = managerStore.removeValue(forKey: managerId) + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is URL.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion( + Response( + response: dataResponse.response!, + body: (filePath as! T) + ), + nil + ) + + } catch let requestParserError as DownloadException { + completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) + } catch let error { + completion(nil, ErrorResponse.error(400, dataResponse.data, error)) + } + return + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + } + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename : String? = nil + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with:"") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url : URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +fileprivate enum DownloadException : Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum AlamofireDecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + _ = managerStore.removeValue(forKey: managerId) + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(completionHandler: { (stringResponse) in + cleanupRequest() + + if stringResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) + ) + return + } + + completion( + Response( + response: stringResponse.response!, + body: ((stringResponse.result.value ?? "") as! T) + ), + nil + ) + }) + case is Void.Type: + validatedRequest.responseData(completionHandler: { (voidResponse) in + cleanupRequest() + + if voidResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) + ) + return + } + + completion( + Response( + response: voidResponse.response!, + body: nil), + nil + ) + }) + case is Data.Type: + validatedRequest.responseData(completionHandler: { (dataResponse) in + cleanupRequest() + + if dataResponse.result.isFailure { + completion( + nil, + ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) + ) + return + } + + completion( + Response( + response: dataResponse.response!, + body: (dataResponse.data as! T) + ), + nil + ) + }) + default: + validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) + return + } + + guard let httpResponse = dataResponse.response else { + completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) + return + } + + var responseObj: Response? = nil + + let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) + if decodeResult.error == nil { + responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) + } + + completion(responseObj, decodeResult.error) + }) + } + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 000000000000..2d50e463ae11 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,67 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias EncodeResult = (data: Data?, error: Error?) + +open class CodableHelper { + + open static var dateformatter: DateFormatter? + + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { + var returnedDecodable: T? = nil + var returnedError: Error? = nil + + let decoder = JSONDecoder() + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" + decoder.dateDecodingStrategy = .formatted(formatter) + } + + do { + returnedDecodable = try decoder.decode(type, from: data) + } catch { + returnedError = error + } + + return (returnedDecodable, returnedError) + } + + open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable { + var returnedData: Data? + var returnedError: Error? = nil + + let encoder = JSONEncoder() + if prettyPrint { + encoder.outputFormatting = .prettyPrinted + } + encoder.dataEncodingStrategy = .base64 + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" + encoder.dateEncodingStrategy = .formatted(formatter) + + do { + returnedData = try encoder.encode(value) + } catch { + returnedError = error + } + + return (returnedData, returnedError) + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 000000000000..f8180752b67b --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,15 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 000000000000..abe218b4e7ac --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +private let dateFormatter: DateFormatter = { + let fmt = DateFormatter() + fmt.dateFormat = Configuration.dateFormat + fmt.locale = Locale(identifier: "en_US_POSIX") + return fmt +}() + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return dateFormatter.string(from: self) as Any + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift new file mode 100644 index 000000000000..ca05906d4206 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift @@ -0,0 +1,54 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +public struct JSONDataEncoding: ParameterEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + var urlRequest = try urlRequest.asURLRequest() + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> Parameters? { + var returnedParams: Parameters? = nil + if let jsonData = jsonData, !jsonData.isEmpty { + var params = Parameters() + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 000000000000..70449515842d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,43 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { + var params: Parameters? = nil + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) + if encodeResult.error == nil { + params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { + var params: Parameters? = nil + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error) + return nil + } + } + + return params + } + +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 000000000000..42f8186ae4af --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,36 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse : Error { + case error(Int, Data?, Error) +} + +open class Response { + open let statusCode: Int + open let header: [String: String] + open let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String:String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift new file mode 100644 index 000000000000..3ce27fcd98f5 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift @@ -0,0 +1,76 @@ +// +// AllPrimitives.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Object which contains lots of different primitive Swagger types */ + +public struct AllPrimitives: Codable { + + public enum MyInlineStringEnum: String, Codable { + case inlinestringenumvalue1 = "inlineStringEnumValue1" + case inlinestringenumvalue2 = "inlineStringEnumValue2" + case inlinestringenumvalue3 = "inlineStringEnumValue3" + } + public var myInteger: Int? + public var myIntegerArray: [Int]? + public var myLong: Int64? + public var myLongArray: [Int64]? + public var myFloat: Float? + public var myFloatArray: [Float]? + public var myDouble: Double? + public var myDoubleArray: [Double]? + public var myString: String? + public var myStringArray: [String]? + public var myBytes: Data? + public var myBytesArray: [Data]? + public var myBoolean: Bool? + public var myBooleanArray: [Bool]? + public var myDate: Date? + public var myDateArray: [Date]? + public var myDateTime: Date? + public var myDateTimeArray: [Date]? + public var myFile: URL? + public var myFileArray: [URL]? + public var myUUID: UUID? + public var myUUIDArray: [UUID]? + public var myStringEnum: StringEnum? + public var myStringEnumArray: [StringEnum]? + public var myInlineStringEnum: MyInlineStringEnum? + + public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { + self.myInteger = myInteger + self.myIntegerArray = myIntegerArray + self.myLong = myLong + self.myLongArray = myLongArray + self.myFloat = myFloat + self.myFloatArray = myFloatArray + self.myDouble = myDouble + self.myDoubleArray = myDoubleArray + self.myString = myString + self.myStringArray = myStringArray + self.myBytes = myBytes + self.myBytesArray = myBytesArray + self.myBoolean = myBoolean + self.myBooleanArray = myBooleanArray + self.myDate = myDate + self.myDateArray = myDateArray + self.myDateTime = myDateTime + self.myDateTimeArray = myDateTimeArray + self.myFile = myFile + self.myFileArray = myFileArray + self.myUUID = myUUID + self.myUUIDArray = myUUIDArray + self.myStringEnum = myStringEnum + self.myStringEnumArray = myStringEnumArray + self.myInlineStringEnum = myInlineStringEnum + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift new file mode 100644 index 000000000000..7e4bb2c0cd5a --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift @@ -0,0 +1,23 @@ +// +// BaseCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a base card object which uses a 'cardType' discriminator. */ + +public struct BaseCard: Codable { + + public var cardType: String + + public init(cardType: String) { + self.cardType = cardType + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift new file mode 100644 index 000000000000..ae5327eda329 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift @@ -0,0 +1,27 @@ +// +// ErrorInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Example Error object */ + +public struct ErrorInfo: Codable { + + public var code: Int? + public var message: String? + public var details: [String]? + + public init(code: Int?, message: String?, details: [String]?) { + self.code = code + self.message = message + self.details = details + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift new file mode 100644 index 000000000000..286c5a7a35be --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift @@ -0,0 +1,27 @@ +// +// GetAllModelsResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** Response object containing AllPrimitives object */ + +public struct GetAllModelsResult: Codable { + + public var myPrimitiveArray: [AllPrimitives]? + public var myPrimitive: AllPrimitives? + public var myVariableNameTest: VariableNameTest? + + public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { + self.myPrimitiveArray = myPrimitiveArray + self.myPrimitive = myPrimitive + self.myVariableNameTest = myVariableNameTest + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift new file mode 100644 index 000000000000..e6e986dce61d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift @@ -0,0 +1,12 @@ +// +// ModelDoubleArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of doubles. */ +public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift new file mode 100644 index 000000000000..6656e6abe8c8 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift @@ -0,0 +1,12 @@ +// +// ModelErrorInfoArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of ErrorInfo objects. */ +public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift new file mode 100644 index 000000000000..7f0e0cbd1357 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift @@ -0,0 +1,12 @@ +// +// ModelStringArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This defines an array of strings. */ +public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift new file mode 100644 index 000000000000..9ce70e0b95e6 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift @@ -0,0 +1,27 @@ +// +// PersonCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PersonCard: Codable { + + public var cardType: String + public var firstName: String? + public var lastName: String? + + public init(cardType: String, firstName: String?, lastName: String?) { + self.cardType = cardType + self.firstName = firstName + self.lastName = lastName + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift new file mode 100644 index 000000000000..905b80ae5241 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift @@ -0,0 +1,27 @@ +// +// PlaceCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a card object for a Person derived from BaseCard. */ + +public struct PlaceCard: Codable { + + public var cardType: String + public var placeName: String? + public var placeAddress: String? + + public init(cardType: String, placeName: String?, placeAddress: String?) { + self.cardType = cardType + self.placeName = placeName + self.placeAddress = placeAddress + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift new file mode 100644 index 000000000000..77f8897cdf3f --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift @@ -0,0 +1,25 @@ +// +// SampleBase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a base class object from which other classes will derive. */ + +public struct SampleBase: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift new file mode 100644 index 000000000000..d53cd948fe76 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift @@ -0,0 +1,29 @@ +// +// SampleSubClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This is a subclass defived from the SampleBase class. */ + +public struct SampleSubClass: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + self.subClassStringProp = subClassStringProp + self.subClassIntegerProp = subClassIntegerProp + } + + +} + diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift new file mode 100644 index 000000000000..d4cce19e6d6d --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift @@ -0,0 +1,15 @@ +// +// StringEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +public enum StringEnum: String, Codable { + case stringenumvalue1 = "stringEnumValue1" + case stringenumvalue2 = "stringEnumValue2" + case stringenumvalue3 = "stringEnumValue3" +} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift new file mode 100644 index 000000000000..1248e645c609 --- /dev/null +++ b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift @@ -0,0 +1,36 @@ +// +// VariableNameTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + + +/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ + +public struct VariableNameTest: Codable { + + /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ + public var exampleName: String? + /** This property name is a reserved word in most languages, including Swift 4. */ + public var _for: String? + /** This model object property name should be unchanged from the JSON property name. */ + public var normalName: String? + + public init(exampleName: String?, _for: String?, normalName: String?) { + self.exampleName = exampleName + self._for = _for + self.normalName = normalName + } + + public enum CodingKeys: String, CodingKey { + case exampleName = "example_name" + case _for = "for" + case normalName + } + + +} + diff --git a/samples/config/petstore/apache2/.openapi-generator/VERSION b/samples/config/petstore/apache2/.openapi-generator/VERSION index 7fea99011a6f..82602aa4190d 100644 --- a/samples/config/petstore/apache2/.openapi-generator/VERSION +++ b/samples/config/petstore/apache2/.openapi-generator/VERSION @@ -1 +1 @@ -2.2.3-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/apache2/PetApi.conf b/samples/config/petstore/apache2/PetApi.conf index c92843e2610f..2d28dcdaa61b 100644 --- a/samples/config/petstore/apache2/PetApi.conf +++ b/samples/config/petstore/apache2/PetApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -16,7 +16,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -34,7 +34,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -48,7 +48,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -62,7 +62,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/StoreApi.conf b/samples/config/petstore/apache2/StoreApi.conf index f0fb742f55ac..b223a8816ba6 100644 --- a/samples/config/petstore/apache2/StoreApi.conf +++ b/samples/config/petstore/apache2/StoreApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -14,7 +14,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/UserApi.conf b/samples/config/petstore/apache2/UserApi.conf index b01bb509728a..699b2b72c16c 100644 --- a/samples/config/petstore/apache2/UserApi.conf +++ b/samples/config/petstore/apache2/UserApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -11,7 +11,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -37,7 +37,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -56,7 +56,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -69,7 +69,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/documentation/cwiki/.openapi-generator/VERSION b/samples/documentation/cwiki/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/documentation/cwiki/.openapi-generator/VERSION +++ b/samples/documentation/cwiki/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/dynamic-html/.openapi-generator/VERSION b/samples/dynamic-html/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/dynamic-html/.openapi-generator/VERSION +++ b/samples/dynamic-html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html.md/.openapi-generator/VERSION b/samples/html.md/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html.md/.openapi-generator/VERSION +++ b/samples/html.md/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html/.openapi-generator/VERSION b/samples/html/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html/.openapi-generator/VERSION +++ b/samples/html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/.openapi-generator/VERSION b/samples/html2/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/html2/.openapi-generator/VERSION +++ b/samples/html2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index dd8dcf14fea7..37e85ee61853 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -116,7 +116,7 @@ UTF-8 - 3.0.0-SNAPSHOT + 3.0.3-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 34eb757240dd..82d674b55753 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -104,6 +104,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -157,6 +158,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/api/PetApi.cpp index af068a3422fa..b0fab3b042d6 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/PetApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.h b/samples/server/petstore/cpp-restbed/api/PetApi.h index 83607a10bcb3..20aee014fe98 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/api/PetApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp index 97f38c052072..3448b2800571 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.h b/samples/server/petstore/cpp-restbed/api/StoreApi.h index 0f0f34d91445..309dae22fb4c 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/api/UserApi.cpp index 158e5e8472b8..30825e5f5ab3 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/UserApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.h b/samples/server/petstore/cpp-restbed/api/UserApi.h index 9c638e11c5e7..2bcd51778518 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/api/UserApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp index 0ad763742285..dc816c8ca28b 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/model/ApiResponse.h index 704fade4a1c3..3032ad6d3445 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.cpp b/samples/server/petstore/cpp-restbed/model/Category.cpp index 4156dc195fc6..39e77a10fd80 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/model/Category.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.h b/samples/server/petstore/cpp-restbed/model/Category.h index cd514f3d33dc..e67a3cf8fe3f 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.h +++ b/samples/server/petstore/cpp-restbed/model/Category.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.cpp b/samples/server/petstore/cpp-restbed/model/Order.cpp index a82a0bb34665..1b30130bad8b 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/model/Order.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.h b/samples/server/petstore/cpp-restbed/model/Order.h index e66688973006..463aa5fa3bf7 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.h +++ b/samples/server/petstore/cpp-restbed/model/Order.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.cpp b/samples/server/petstore/cpp-restbed/model/Pet.cpp index 5fbecd6bc915..ba0a73c08b17 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/model/Pet.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.h b/samples/server/petstore/cpp-restbed/model/Pet.h index 96e9fba3c73b..e97a8ae269f6 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/model/Pet.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.cpp b/samples/server/petstore/cpp-restbed/model/Tag.cpp index ccefa0e8c757..42e4618af2c8 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/model/Tag.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.h b/samples/server/petstore/cpp-restbed/model/Tag.h index 29b9a90e79e3..ca0615a97374 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/model/Tag.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.cpp b/samples/server/petstore/cpp-restbed/model/User.cpp index 637e5826c0bc..9079c0392a07 100644 --- a/samples/server/petstore/cpp-restbed/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/model/User.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.h b/samples/server/petstore/cpp-restbed/model/User.h index 054b31c534e3..d66f50f94c8f 100644 --- a/samples/server/petstore/cpp-restbed/model/User.h +++ b/samples/server/petstore/cpp-restbed/model/User.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index 34eb757240dd..82d674b55753 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -104,6 +104,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -157,6 +158,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/finch/.openapi-generator/VERSION b/samples/server/petstore/finch/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/finch/.openapi-generator/VERSION +++ b/samples/server/petstore/finch/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml index cc02c545f9a5..dca523e5557c 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml @@ -1,163 +1,202 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: add_pet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + put: operationId: update_pet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: add_pet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by status + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - tags: - - pet - summary: Finds Pets by tags + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - get: + delete: + operationId: delete_pet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-openapi-router-controller: openapi_server.controllers.pet_controller + get: description: Returns a single pet operationId: get_pet_by_id parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -165,140 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: operationId: update_pet_with_form parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: delete_pet - parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - style: simple - explode: false - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: upload_file parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] + summary: Returns pet inventories by status + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: - tags: - - store - summary: Place an order for a pet operationId: place_order requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -306,31 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -338,153 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - x-openapi-router-controller: openapi_server.controllers.store_controller - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation + summary: Create user + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: - tags: - - user - summary: Logs user into the system operationId: login_user parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires - style: simple - explode: false schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: - tags: - - user - summary: Logs out current logged in user session operationId: logout_user responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-openapi-router-controller: openapi_server.controllers.user_controller + get: operationId: get_user_by_name parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -492,120 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - put: + summary: Get user by user name tags: - user - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + put: description: This can only be done by the logged in user. operationId: update_user parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -619,155 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message - body: - type: object properties: - name: + code: + format: int32 + type: integer + type: type: string - description: Updated name of the pet - status: + message: type: string - description: Updated status of the pet - body_1: + title: An uploaded response type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py index 4321570d5a0e..c7340cd00059 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml index cc02c545f9a5..dca523e5557c 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml @@ -1,163 +1,202 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: + post: + operationId: add_pet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + responses: + 405: + content: {} + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store tags: - pet - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + put: operationId: update_pet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Update an existing pet tags: - pet - summary: Add a new pet to the store - operationId: add_pet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: - tags: - - pet - summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - style: form - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by status + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - tags: - - pet - summary: Finds Pets by tags + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - style: form - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: + content: {} description: Invalid tag value - deprecated: true security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - get: + delete: + operationId: delete_pet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-openapi-router-controller: openapi_server.controllers.pet_controller + get: description: Returns a single pet operationId: get_pet_by_id parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -165,140 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] - x-openapi-router-controller: openapi_server.controllers.pet_controller - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: operationId: update_pet_with_form parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string responses: 405: + content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: openapi_server.controllers.pet_controller - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: delete_pet - parameters: - - name: api_key - in: header - required: false - style: simple - explode: false - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - style: simple - explode: false - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: upload_file parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true - style: simple - explode: false schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] + summary: Returns pet inventories by status + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: - tags: - - store - summary: Place an order for a pet operationId: place_order requestBody: - description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -306,31 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid Order + summary: Place an order for a pet + tags: + - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true - style: simple - explode: false schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -338,153 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found - x-openapi-router-controller: openapi_server.controllers.store_controller - delete: + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: - description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: + content: {} description: successful operation + summary: Create user + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: - tags: - - user - summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation + summary: Creates list of users with given input array + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: - tags: - - user - summary: Logs user into the system operationId: login_user parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true - style: form - explode: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true - style: form - explode: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires - style: simple - explode: false schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: + content: {} description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: - tags: - - user - summary: Logs out current logged in user session operationId: logout_user responses: default: + content: {} description: successful operation + summary: Logs out current logged in user session + tags: + - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-openapi-router-controller: openapi_server.controllers.user_controller + get: operationId: get_user_by_name parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true - style: simple - explode: false schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -492,120 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - put: + summary: Get user by user name tags: - user - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + put: description: This can only be done by the logged in user. operationId: update_user parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true - style: simple - explode: false schema: type: string requestBody: - description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found - x-openapi-router-controller: openapi_server.controllers.user_controller - delete: + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - 400: - description: Invalid username supplied - 404: - description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -619,155 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object - properties: - code: - type: integer - format: int32 - type: - type: string - message: - type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message - body: - type: object properties: - name: + code: + format: int32 + type: integer + type: type: string - description: Updated name of the pet - status: + message: type: string - description: Updated status of the pet - body_1: + title: An uploaded response type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/flaskConnexion/openapi_server/util.py b/samples/server/petstore/flaskConnexion/openapi_server/util.py index 4321570d5a0e..c7340cd00059 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return a original value. + """Return an original value. :return: object. """ diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/.openapi-generator/VERSION b/samples/server/petstore/java-inflector/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/java-inflector/.openapi-generator/VERSION +++ b/samples/server/petstore/java-inflector/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java index cd276a634870..99fd61b22a4d 100644 --- a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java +++ b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java @@ -70,5 +70,11 @@ public ResponseContext uploadFile(RequestContext request , Long petId, String ad } */ + /* + public ResponseContext uploadFileWithRequiredFile(RequestContext request , Long petId, FormDataContentDisposition fileDetail, String additionalMetadata) { + return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" ); + } + */ + } diff --git a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml index 819110c3f904..76803fad02eb 100644 --- a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml @@ -294,6 +294,48 @@ paths: - pet x-contentType: multipart/form-data x-accepts: application/json + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-contentType: multipart/form-data + x-accepts: application/json /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/java-msf4j/.openapi-generator-ignore b/samples/server/petstore/java-msf4j/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-msf4j/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index fd1699a7c5f9..8fa7248e2317 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -43,10 +43,10 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean booleanPostBody + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body ) throws NotFoundException { - return delegate.fakeOuterBooleanSerialize(booleanPostBody); + return delegate.fakeOuterBooleanSerialize(body); } @POST @Path("/outer/composite") @@ -120,22 +120,22 @@ public Response testClientModel(@ApiParam(value = "client model" ,required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number -,@ApiParam(value = "None", required=true) @FormParam("double") Double _double -,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter -,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte -,@ApiParam(value = "None", allowableValues="range=[10, 100]") @FormParam("integer") Integer integer -,@ApiParam(value = "None", allowableValues="range=[20, 200]") @FormParam("int32") Integer int32 -,@ApiParam(value = "None") @FormParam("int64") Long int64 -,@ApiParam(value = "None") @FormParam("float") Float _float -,@ApiParam(value = "None") @FormParam("string") String string + public Response testEndpointParameters(@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("number") BigDecimal number +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("double") Double _double +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("pattern_without_delimiter") String patternWithoutDelimiter +,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("byte") byte[] _byte +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("integer") Integer integer +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int32") Integer int32 +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int64") Long int64 +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("float") Float _float +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("string") String string , @FormDataParam("binary") InputStream binaryInputStream, @FormDataParam("binary") FileInfo binaryDetail -,@ApiParam(value = "None") @FormParam("date") Date date -,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime -,@ApiParam(value = "None") @FormParam("password") String password -,@ApiParam(value = "None") @FormParam("callback") String paramCallback +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("date") Date date +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("dateTime") Date dateTime +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("password") String password +,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("callback") String paramCallback ) throws NotFoundException { return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binaryInputStream, binaryDetail,date,dateTime,password,paramCallback); @@ -155,8 +155,8 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble -,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List enumFormStringArray -,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)") @FormParam("enum_form_string") String enumFormString +,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray +,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString); @@ -168,7 +168,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) String requestBody + public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Map requestBody ) throws NotFoundException { return delegate.testInlineAdditionalProperties(requestBody); @@ -180,8 +180,8 @@ public Response testInlineAdditionalProperties(@ApiParam(value = "request body" @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param -,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 + public Response testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param") String param +,@ApiParam(value = "field2", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param2") String param2 ) throws NotFoundException { return delegate.testJsonFormData(param,param2); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java index 7ace08f487d9..ec6c30bb4c19 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java @@ -24,7 +24,7 @@ public abstract class FakeApiService { - public abstract Response fakeOuterBooleanSerialize(Boolean booleanPostBody + public abstract Response fakeOuterBooleanSerialize(Boolean body ) throws NotFoundException; public abstract Response fakeOuterCompositeSerialize(OuterComposite outerComposite ) throws NotFoundException; @@ -61,7 +61,7 @@ public abstract Response testEnumParameters(List enumHeaderStringArray ,List enumFormStringArray ,String enumFormString ) throws NotFoundException; - public abstract Response testInlineAdditionalProperties(String requestBody + public abstract Response testInlineAdditionalProperties(Map requestBody ) throws NotFoundException; public abstract Response testJsonFormData(String param ,String param2 diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java index dbce159ab076..2920fe12f984 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java @@ -157,8 +157,8 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name -,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status +,@ApiParam(value = "Updated name of the pet", defaultValue="null") @DefaultValue("null") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet", defaultValue="null") @DefaultValue("null") @FormParam("status") String status ) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status); @@ -176,7 +176,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FileInfo fileDetail @@ -184,4 +184,25 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail); } + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FileInfo fileDetail +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +) + throws NotFoundException { + return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata); + } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java index d7fbedc2a337..cfd59b16b0db 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java @@ -40,5 +40,9 @@ public abstract Response updatePetWithForm(Long petId public abstract Response uploadFile(Long petId ,String additionalMetadata ,InputStream fileInputStream, FileInfo fileDetail + ) throws NotFoundException; + public abstract Response uploadFileWithRequiredFile(Long petId + ,InputStream fileInputStream, FileInfo fileDetail + ,String additionalMetadata ) throws NotFoundException; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java index c657b4ee3766..0a093d51ba92 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java @@ -69,7 +69,7 @@ public Response getInventory() @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]") @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId ) throws NotFoundException { return delegate.getOrderById(orderId); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java new file mode 100644 index 000000000000..fd690d2791c0 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java @@ -0,0 +1,50 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Animal; + +/** + * AnimalFarm + */ + +public class AnimalFarm extends ArrayList { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnimalFarm {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java index ad415532b6ca..9c68cb335233 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java @@ -78,7 +78,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java index f57655fee856..e04f098c7c07 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java @@ -48,7 +48,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index f2efccf5d1da..3f251ec15a5a 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -25,7 +25,7 @@ public class FakeApiServiceImpl extends FakeApiService { @Override - public Response fakeOuterBooleanSerialize(Boolean booleanPostBody + public Response fakeOuterBooleanSerialize(Boolean body ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -94,7 +94,7 @@ public Response testEnumParameters(List enumHeaderStringArray return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testInlineAdditionalProperties(String requestBody + public Response testInlineAdditionalProperties(Map requestBody ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index c7e28596d1d7..4945268b9db4 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -69,6 +69,14 @@ public Response updatePetWithForm(Long petId public Response uploadFile(Long petId , String additionalMetadata , InputStream fileInputStream, FileInfo fileDetail + ) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response uploadFileWithRequiredFile(Long petId +, InputStream fileInputStream, FileInfo fileDetail +, String additionalMetadata ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-pkmst/.openapi-generator-ignore b/samples/server/petstore/java-pkmst/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/java-pkmst/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION +++ b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/Readme.md b/samples/server/petstore/java-pkmst/Readme.md index ebef7835e7c7..9867e11590b6 100644 --- a/samples/server/petstore/java-pkmst/Readme.md +++ b/samples/server/petstore/java-pkmst/Readme.md @@ -17,20 +17,20 @@ g)Allow you to integrate with tracing server (Example Zipkin) h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk) i)Allow you to configure Oauth2 security based authorization for your microservice - Additonal Features + Additional Features j)generate sample cucumber file and dependency to drive your Behaviour driven development. - k)generate gatling based perfromance test , which can be excuted via build pipeline like jenkins etc. + k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc. Working: -Using swagger specification you can convert any definition to spring boot microservice. +Using OpenAPI specification you can convert any definition to spring boot microservice. It has the integration with the below services: eureka registry, zipkin , spring boot admin, circuit breaker. By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and related configuration for eureka, zipkin, spring boot admin one has two options: -1) When generating from UI one has to provide vendor extensions inside the swagger specification as below: +1) When generating from UI one has to provide vendor extensions inside the OpenAPI specification as below: swagger: "2.0" info: description: "This is a sample Product Catalogue Server.\ @@ -43,11 +43,11 @@ info: springBootAdminUri: "http://localhost:8000" pkmstInterceptor: "true" -PLease note the vendor extensions are inside the info tag of the swagger specification. All the tags are case sensitive. Once given all the related configuration and the dependency +PLease note the vendor extensions are inside the info tag of the OpenAPI specification. All the tags are case sensitive. Once given all the related configuration and the dependency will be enabled. 2) When generating from the maven plugin one has to provide configuration inside pom as below: -inside the swagger codegen maven plugin under the configuration section +inside the openapi generator maven plugin under the configuration section product-openapi.yaml @@ -136,7 +136,7 @@ HttpLogging filter is provided for logging in the request and response. Can be f Spring security is also provided to secure the resources. Please modify according to your needs. First run: -Import the project in to the eclipse. Run the app as an spring boot application.The project will run on http://localhost:8008 +Import the project in to the eclipse. Run the app as a spring boot application.The project will run on http://localhost:8008 Swagger ui available on: http://localhost:8008/swagger-ui.html If all the configurations have been enabled(depending on the port) below are some of the URls to access: @@ -152,4 +152,4 @@ Pkmst examples https://github.com/ProKarma-Inc/pkmst-getting-started-examples Pkmst Extensions -https://github.com/ProKarma-Inc/pkmst-extention \ No newline at end of file +https://github.com/ProKarma-Inc/pkmst-extention diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml index 5ca43f8a6f06..8a62b880bf6c 100644 --- a/samples/server/petstore/java-pkmst/pom.xml +++ b/samples/server/petstore/java-pkmst/pom.xml @@ -52,10 +52,10 @@ false - - jitpack.io - https://jitpack.io - + + jitpack.io + https://jitpack.io + @@ -83,35 +83,35 @@ + org.springframework.cloud + spring-cloud-starter-sleuth + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> org.springframework.boot spring-boot-starter-actuator - org.springframework.boot - spring-boot-starter-jetty + org.springframework.boot + spring-boot-starter-jetty + org.springframework.cloud + spring-cloud-netflix-hystrix-stream + + + org.springframework.cloud + spring-cloud-starter-bus-amqp + --> org.springframework.cloud spring-cloud-starter-hystrix-dashboard @@ -229,11 +229,11 @@ org.springframework spring-test - - org.threeten - threetenbp - 1.3.6 - + + org.threeten + threetenbp + 1.3.6 + @@ -263,7 +263,7 @@ **/*CucumberTest*.java + an example --> **/cucumber/*.java @@ -275,28 +275,28 @@ ${scala-maven-plugin.version} - + org.springframework.boot spring-boot-maven-plugin @@ -350,9 +350,9 @@ 2.19.1 - org.apache.maven.plugins - maven-pmd-plugin - + org.apache.maven.plugins + maven-pmd-plugin + diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java similarity index 98% rename from samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java rename to samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java index 67599c9bb45c..dac5a9cdd15f 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java @@ -20,7 +20,7 @@ */ @EnableSwagger2 @Configuration -public class SwaggerDocumentationConfig { +public class OpenAPIDocumentationConfig { public static final String DEFAULT_INCLUDE_PATTERN = "/pkmst/.*"; @Bean diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java index ae6b11d018f8..18b41246f8cc 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -128,7 +128,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @@ -143,6 +143,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java index 28752172722b..efd55c865beb 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java @@ -50,18 +50,48 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",requi public ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List tags, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); + } + return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } @@ -72,18 +102,23 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t } public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name, - @ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, + @ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! return new ResponseEntity(HttpStatus.OK); } public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, @ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", ModelApiResponse.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index be3ff14ebf64..4214fd18ff1b 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -58,7 +58,7 @@ public interface StoreApi { @RequestMapping(value = "/store/order/{orderId}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java index 6c5faee23f2e..16af6cd0225a 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java @@ -44,15 +44,35 @@ public ResponseEntity> getInventory(@RequestHeader(value = return new ResponseEntity>(HttpStatus.OK); } - public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, + public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order order, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java index f81441045ebb..81230453e81c 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). - * https://github.com/swagger-api/swagger-codegen + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * https://openapi-generator.tech * Do not edit the class manually. */ package com.prokarma.pkmst.controller; diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java index 8ba2847e32e1..3dc6cf94c8fc 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java @@ -60,6 +60,16 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true ) @PathVariable("username") String username, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! + + if (accept != null && accept.contains("application/json")) { + return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); + } + + + if (accept != null && accept.contains("application/xml")) { + return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml index fecadb4b3ab2..13ef356233ca 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: -1 + port: 8080 # Spring Actuator management: diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml index c314f6e7a300..57e184773b0d 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: -1 + port: 8080 # Spring Actuator management: diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index a82c9ee422d7..5f2c63d116d3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -77,7 +77,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 7cd05af295f7..b84a9bee2bc1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -47,7 +47,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java index 8dff19402378..4b5720896eec 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java @@ -177,4 +177,25 @@ public Result uploadFile(Long petId) throws Exception { JsonNode result = mapper.valueToTree(obj); return ok(result); } + + @ApiAction + public Result uploadFileWithRequiredFile(Long petId) throws Exception { + String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String additionalMetadata; + if (valueadditionalMetadata != null) { + additionalMetadata = valueadditionalMetadata; + } else { + additionalMetadata = "null"; + } + Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file"); + if ((file == null || ((File) file.getFile()).length() == 0)) { + throw new IllegalArgumentException("'file' file cannot be empty"); + } + ModelApiResponse obj = imp.uploadFileWithRequiredFile(petId, file, additionalMetadata); + if (configuration.getBoolean("useOutputBeanValidation")) { + OpenAPIUtils.validate(obj); + } + JsonNode result = mapper.valueToTree(obj); + return ok(result); + } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java index 2cd201c4bc35..85e0c60ef6cf 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java @@ -56,4 +56,10 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.M return new ModelApiResponse(); } + @Override + public ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception { + //Do your magic!!! + return new ModelApiResponse(); + } + } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java index 961632675800..1a87f77ac02c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java @@ -29,4 +29,6 @@ public interface PetApiControllerImpInterface { ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; + ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception; + } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes index de7b52199cbe..b7943a8a33d8 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes +++ b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes @@ -32,6 +32,7 @@ GET /v2/pet/:petId controllers.PetApiController.getPetBy PUT /v2/pet controllers.PetApiController.updatePet() POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long) POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) +POST /v2/pet/:petId/uploadImageWithRequiredFile controllers.PetApiController.uploadFileWithRequiredFile(petId: Long) #Functions for Store API DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 1fb6f6037ebc..7398708288f1 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -379,6 +381,61 @@ "x-accepts" : "application/json" } }, + "/pet/{petId}/uploadImageWithRequiredFile" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "operationId" : "uploadFileWithRequiredFile", + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int64" + } + } ], + "requestBody" : { + "content" : { + "multipart/form-data" : { + "schema" : { + "required" : [ "file" ], + "properties" : { + "additionalMetadata" : { + "type" : "string", + "description" : "Additional data to pass to server" + }, + "file" : { + "type" : "string", + "description" : "file to upload", + "format" : "binary" + } + } + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "description" : "successful operation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponse" + } + } + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, "/store/inventory" : { "get" : { "tags" : [ "store" ], @@ -833,6 +890,8 @@ "name" : "enum_header_string_array", "in" : "header", "description" : "Header parameter enum test (string array)", + "style" : "simple", + "explode" : false, "schema" : { "type" : "array", "items" : { @@ -854,6 +913,7 @@ "name" : "enum_query_string_array", "in" : "query", "description" : "Query parameter enum test (string array)", + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json index eeb13a4729fb..01ebde2297ed 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json @@ -112,6 +112,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -168,6 +169,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json index eeb13a4729fb..01ebde2297ed 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json @@ -112,6 +112,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -168,6 +169,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 5b48303cc587..ca3e7093ff1e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -111,5 +111,15 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attac return null; } + /** + * uploads an image + * + */ + public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment fileDetail, String additionalMetadata) { + // TODO: Implement... + + return null; + } + } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java index 79ec92b357f1..210ea87532bd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index 56a239eebf86..e3e9186319e8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,7 +54,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * @@ -84,8 +84,8 @@ public void setup() { */ @Test public void fakeOuterBooleanSerializeTest() { - Boolean booleanPostBody = null; - //Boolean response = api.fakeOuterBooleanSerialize(booleanPostBody); + Boolean body = null; + //Boolean response = api.fakeOuterBooleanSerialize(body); //assertNotNull(response); // TODO: test validations @@ -231,7 +231,7 @@ public void testEnumParametersTest() { */ @Test public void testInlineAdditionalPropertiesTest() { - String requestBody = null; + Map requestBody = null; //api.testInlineAdditionalProperties(requestBody); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java index c798a9e7b716..63a8e61733a0 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java index 8dd432fed9c4..8b0f3f9560f3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,7 +49,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * @@ -212,4 +212,22 @@ public void uploadFileTest() { } + /** + * uploads an image + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() { + Long petId = null; + org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; + String additionalMetadata = null; + //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, file, additionalMetadata); + //assertNotNull(response); + // TODO: test validations + + + } + } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java index eebc070db508..c2d3a5783686 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java index 27e54fe390a5..147227059eac 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java @@ -1,12 +1,12 @@ /** - * Swagger Petstore + * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,7 @@ /** - * Swagger Petstore + * OpenAPI Petstore * *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * diff --git a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index 8a3df9670023..3aff71de768d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -118,9 +118,24 @@ public interface PetApi { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) + }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, @FormParam(value = "file") Attachment fileDetail); + + @POST + @Path("/{petId}/uploadImageWithRequiredFile") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @ApiOperation(value = "uploads an image", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, + @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index 43eafcddd2da..caf1f17b0e27 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -298,6 +298,48 @@ paths: - pet x-tags: - tag: pet + /pet/{petId}/uploadImageWithRequiredFile: + post: + operationId: uploadFileWithRequiredFile + parameters: + - description: ID of pet to update + in: path + name: petId + required: true + schema: + format: int64 + type: integer + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + required: + - file + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-tags: + - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index a2d2c5e11ab8..feea3adec9d5 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 3.0.2-SNAPSHOT. +Generated by OpenAPI Generator 3.0.3-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln new file mode 100644 index 000000000000..757078a1383c --- /dev/null +++ b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 000000000000..db083b73bdc7 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + ///

+ /// Describes the result of uploading an image resource + /// + public sealed class ApiResponse: IEquatable + { + /// + /// Code + /// + public int? Code { get; private set; } + + /// + /// Type + /// + public string Type { get; private set; } + + /// + /// Message + /// + public string Message { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use ApiResponse.Builder() for instance creation instead. + /// + [Obsolete] + public ApiResponse() + { + } + + private ApiResponse(int? Code, string Type, string Message) + { + + this.Code = Code; + + this.Type = Type; + + this.Message = Message; + + } + + /// + /// Returns builder of ApiResponse. + /// + /// ApiResponseBuilder + public static ApiResponseBuilder Builder() + { + return new ApiResponseBuilder(); + } + + /// + /// Returns ApiResponseBuilder with properties set. + /// Use it to change properties. + /// + /// ApiResponseBuilder + public ApiResponseBuilder With() + { + return Builder() + .Code(Code) + .Type(Type) + .Message(Message); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(ApiResponse other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are equals, false otherwise + public static bool operator == (ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are not equals, false otherwise + public static bool operator != (ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + /// + /// Builder of ApiResponse. + /// + public sealed class ApiResponseBuilder + { + private int? _Code; + private string _Type; + private string _Message; + + internal ApiResponseBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for ApiResponse.Code property. + /// + /// Code + public ApiResponseBuilder Code(int? value) + { + _Code = value; + return this; + } + + /// + /// Sets value for ApiResponse.Type property. + /// + /// Type + public ApiResponseBuilder Type(string value) + { + _Type = value; + return this; + } + + /// + /// Sets value for ApiResponse.Message property. + /// + /// Message + public ApiResponseBuilder Message(string value) + { + _Message = value; + return this; + } + + + /// + /// Builds instance of ApiResponse. + /// + /// ApiResponse + public ApiResponse Build() + { + Validate(); + return new ApiResponse( + Code: _Code, + Type: _Type, + Message: _Message + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 000000000000..1bfb30abb752 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A category for a pet + /// + public sealed class Category: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Category.Builder() for instance creation instead. + /// + [Obsolete] + public Category() + { + } + + private Category(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Category. + /// + /// CategoryBuilder + public static CategoryBuilder Builder() + { + return new CategoryBuilder(); + } + + /// + /// Returns CategoryBuilder with properties set. + /// Use it to change properties. + /// + /// CategoryBuilder + public CategoryBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Category other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are equals, false otherwise + public static bool operator == (Category left, Category right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are not equals, false otherwise + public static bool operator != (Category left, Category right) + { + return !Equals(left, right); + } + + /// + /// Builder of Category. + /// + public sealed class CategoryBuilder + { + private long? _Id; + private string _Name; + + internal CategoryBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Category.Id property. + /// + /// Id + public CategoryBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Category.Name property. + /// + /// Name + public CategoryBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Category. + /// + /// Category + public Category Build() + { + Validate(); + return new Category( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 000000000000..7bdec1016958 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,247 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// An order for a pets from the pet store + /// + public sealed class Order: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// PetId + /// + public long? PetId { get; private set; } + + /// + /// Quantity + /// + public int? Quantity { get; private set; } + + /// + /// ShipDate + /// + public ZonedDateTime? ShipDate { get; private set; } + + /// + /// Order Status + /// + public StatusEnum? Status { get; private set; } + + /// + /// Complete + /// + public bool? Complete { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Order.Builder() for instance creation instead. + /// + [Obsolete] + public Order() + { + } + + private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) + { + + this.Id = Id; + + this.PetId = PetId; + + this.Quantity = Quantity; + + this.ShipDate = ShipDate; + + this.Status = Status; + + this.Complete = Complete; + + } + + /// + /// Returns builder of Order. + /// + /// OrderBuilder + public static OrderBuilder Builder() + { + return new OrderBuilder(); + } + + /// + /// Returns OrderBuilder with properties set. + /// Use it to change properties. + /// + /// OrderBuilder + public OrderBuilder With() + { + return Builder() + .Id(Id) + .PetId(PetId) + .Quantity(Quantity) + .ShipDate(ShipDate) + .Status(Status) + .Complete(Complete); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Order other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are equals, false otherwise + public static bool operator == (Order left, Order right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are not equals, false otherwise + public static bool operator != (Order left, Order right) + { + return !Equals(left, right); + } + + /// + /// Builder of Order. + /// + public sealed class OrderBuilder + { + private long? _Id; + private long? _PetId; + private int? _Quantity; + private ZonedDateTime? _ShipDate; + private StatusEnum? _Status; + private bool? _Complete; + + internal OrderBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + _Complete = false; + } + + /// + /// Sets value for Order.Id property. + /// + /// Id + public OrderBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Order.PetId property. + /// + /// PetId + public OrderBuilder PetId(long? value) + { + _PetId = value; + return this; + } + + /// + /// Sets value for Order.Quantity property. + /// + /// Quantity + public OrderBuilder Quantity(int? value) + { + _Quantity = value; + return this; + } + + /// + /// Sets value for Order.ShipDate property. + /// + /// ShipDate + public OrderBuilder ShipDate(ZonedDateTime? value) + { + _ShipDate = value; + return this; + } + + /// + /// Sets value for Order.Status property. + /// + /// Order Status + public OrderBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + /// + /// Sets value for Order.Complete property. + /// + /// Complete + public OrderBuilder Complete(bool? value) + { + _Complete = value; + return this; + } + + + /// + /// Builds instance of Order. + /// + /// Order + public Order Build() + { + Validate(); + return new Order( + Id: _Id, + PetId: _PetId, + Quantity: _Quantity, + ShipDate: _ShipDate, + Status: _Status, + Complete: _Complete + ); + } + + private void Validate() + { + } + } + + + public enum StatusEnum { Placed, Approved, Delivered }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 000000000000..a3f02e090883 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A pet for sale in the pet store + /// + public sealed class Pet: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Category + /// + public Category Category { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + /// + /// PhotoUrls + /// + public List PhotoUrls { get; private set; } + + /// + /// Tags + /// + public List Tags { get; private set; } + + /// + /// pet status in the store + /// + public StatusEnum? Status { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Pet.Builder() for instance creation instead. + /// + [Obsolete] + public Pet() + { + } + + private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) + { + + this.Id = Id; + + this.Category = Category; + + this.Name = Name; + + this.PhotoUrls = PhotoUrls; + + this.Tags = Tags; + + this.Status = Status; + + } + + /// + /// Returns builder of Pet. + /// + /// PetBuilder + public static PetBuilder Builder() + { + return new PetBuilder(); + } + + /// + /// Returns PetBuilder with properties set. + /// Use it to change properties. + /// + /// PetBuilder + public PetBuilder With() + { + return Builder() + .Id(Id) + .Category(Category) + .Name(Name) + .PhotoUrls(PhotoUrls) + .Tags(Tags) + .Status(Status); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Pet other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are equals, false otherwise + public static bool operator == (Pet left, Pet right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are not equals, false otherwise + public static bool operator != (Pet left, Pet right) + { + return !Equals(left, right); + } + + /// + /// Builder of Pet. + /// + public sealed class PetBuilder + { + private long? _Id; + private Category _Category; + private string _Name; + private List _PhotoUrls; + private List _Tags; + private StatusEnum? _Status; + + internal PetBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Pet.Id property. + /// + /// Id + public PetBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Pet.Category property. + /// + /// Category + public PetBuilder Category(Category value) + { + _Category = value; + return this; + } + + /// + /// Sets value for Pet.Name property. + /// + /// Name + public PetBuilder Name(string value) + { + _Name = value; + return this; + } + + /// + /// Sets value for Pet.PhotoUrls property. + /// + /// PhotoUrls + public PetBuilder PhotoUrls(List value) + { + _PhotoUrls = value; + return this; + } + + /// + /// Sets value for Pet.Tags property. + /// + /// Tags + public PetBuilder Tags(List value) + { + _Tags = value; + return this; + } + + /// + /// Sets value for Pet.Status property. + /// + /// pet status in the store + public PetBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + + /// + /// Builds instance of Pet. + /// + /// Pet + public Pet Build() + { + Validate(); + return new Pet( + Id: _Id, + Category: _Category, + Name: _Name, + PhotoUrls: _PhotoUrls, + Tags: _Tags, + Status: _Status + ); + } + + private void Validate() + { + if (_Name == null) + { + throw new ArgumentException("Name is a required property for Pet and cannot be null"); + } + if (_PhotoUrls == null) + { + throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); + } + } + } + + + public enum StatusEnum { Available, Pending, Sold }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 000000000000..7ce321d25114 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A tag for a pet + /// + public sealed class Tag: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Tag.Builder() for instance creation instead. + /// + [Obsolete] + public Tag() + { + } + + private Tag(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Tag. + /// + /// TagBuilder + public static TagBuilder Builder() + { + return new TagBuilder(); + } + + /// + /// Returns TagBuilder with properties set. + /// Use it to change properties. + /// + /// TagBuilder + public TagBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Tag other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are equals, false otherwise + public static bool operator == (Tag left, Tag right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are not equals, false otherwise + public static bool operator != (Tag left, Tag right) + { + return !Equals(left, right); + } + + /// + /// Builder of Tag. + /// + public sealed class TagBuilder + { + private long? _Id; + private string _Name; + + internal TagBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Tag.Id property. + /// + /// Id + public TagBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Tag.Name property. + /// + /// Name + public TagBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Tag. + /// + /// Tag + public Tag Build() + { + Validate(); + return new Tag( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 000000000000..04d33ca07f77 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A User who is purchasing from the pet store + /// + public sealed class User: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Username + /// + public string Username { get; private set; } + + /// + /// FirstName + /// + public string FirstName { get; private set; } + + /// + /// LastName + /// + public string LastName { get; private set; } + + /// + /// Email + /// + public string Email { get; private set; } + + /// + /// Password + /// + public string Password { get; private set; } + + /// + /// Phone + /// + public string Phone { get; private set; } + + /// + /// User Status + /// + public int? UserStatus { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use User.Builder() for instance creation instead. + /// + [Obsolete] + public User() + { + } + + private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) + { + + this.Id = Id; + + this.Username = Username; + + this.FirstName = FirstName; + + this.LastName = LastName; + + this.Email = Email; + + this.Password = Password; + + this.Phone = Phone; + + this.UserStatus = UserStatus; + + } + + /// + /// Returns builder of User. + /// + /// UserBuilder + public static UserBuilder Builder() + { + return new UserBuilder(); + } + + /// + /// Returns UserBuilder with properties set. + /// Use it to change properties. + /// + /// UserBuilder + public UserBuilder With() + { + return Builder() + .Id(Id) + .Username(Username) + .FirstName(FirstName) + .LastName(LastName) + .Email(Email) + .Password(Password) + .Phone(Phone) + .UserStatus(UserStatus); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(User other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are equals, false otherwise + public static bool operator == (User left, User right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are not equals, false otherwise + public static bool operator != (User left, User right) + { + return !Equals(left, right); + } + + /// + /// Builder of User. + /// + public sealed class UserBuilder + { + private long? _Id; + private string _Username; + private string _FirstName; + private string _LastName; + private string _Email; + private string _Password; + private string _Phone; + private int? _UserStatus; + + internal UserBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for User.Id property. + /// + /// Id + public UserBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for User.Username property. + /// + /// Username + public UserBuilder Username(string value) + { + _Username = value; + return this; + } + + /// + /// Sets value for User.FirstName property. + /// + /// FirstName + public UserBuilder FirstName(string value) + { + _FirstName = value; + return this; + } + + /// + /// Sets value for User.LastName property. + /// + /// LastName + public UserBuilder LastName(string value) + { + _LastName = value; + return this; + } + + /// + /// Sets value for User.Email property. + /// + /// Email + public UserBuilder Email(string value) + { + _Email = value; + return this; + } + + /// + /// Sets value for User.Password property. + /// + /// Password + public UserBuilder Password(string value) + { + _Password = value; + return this; + } + + /// + /// Sets value for User.Phone property. + /// + /// Phone + public UserBuilder Phone(string value) + { + _Phone = value; + return this; + } + + /// + /// Sets value for User.UserStatus property. + /// + /// User Status + public UserBuilder UserStatus(int? value) + { + _UserStatus = value; + return this; + } + + + /// + /// Builds instance of User. + /// + /// User + public User Build() + { + Validate(); + return new User( + Id: _Id, + Username: _Username, + FirstName: _FirstName, + LastName: _LastName, + Email: _Email, + Password: _Password, + Phone: _Phone, + UserStatus: _UserStatus + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs new file mode 100644 index 000000000000..d978df59cb2e --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs @@ -0,0 +1,247 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + /// + /// Status values that need to be considered for filter + /// + public enum FindPetsByStatusStatusEnum + { + available = 1, + pending = 2, + sold = 3 + }; + + + /// + /// Module processing requests of Pet domain. + /// + public sealed class PetModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public PetModule(PetService service) : base("/v2") + { + Post["/pet", true] = async (parameters, ct) => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); + + await service.AddPet(Context, pet); + return new Response { ContentType = ""}; + }; + + Delete["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); + + await service.DeletePet(Context, petId, apiKey); + return new Response { ContentType = ""}; + }; + + Get["/pet/findByStatus", true] = async (parameters, ct) => + { + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); + Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); + + return await service.FindPetsByStatus(Context, status).ToArray(); + }; + + Get["/pet/findByTags", true] = async (parameters, ct) => + { + var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); + Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); + + return await service.FindPetsByTags(Context, tags).ToArray(); + }; + + Get["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); + + return await service.GetPetById(Context, petId); + }; + + Put["/pet", true] = async (parameters, ct) => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); + + await service.UpdatePet(Context, pet); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); + + await service.UpdatePetWithForm(Context, petId, name, status); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}/uploadImage", true] = async (parameters, ct) => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); + var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); + + return await service.UploadFile(Context, petId, additionalMetadata, file); + }; + } + } + + /// + /// Service handling Pet requests. + /// + public interface PetService + { + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + Task AddPet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// Pet id to delete + /// (optional) + /// + Task DeletePet(NancyContext context, long? petId, string apiKey); + + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Context of request + /// Status values that need to be considered for filter + /// List<Pet> + Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); + + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Context of request + /// Tags to filter by + /// List<Pet> + Task> FindPetsByTags(NancyContext context, List tags); + + /// + /// Returns a single pet + /// + /// Context of request + /// ID of pet to return + /// Pet + Task GetPetById(NancyContext context, long? petId); + + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + Task UpdatePet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) + /// + Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status); + + /// + /// + /// + /// Context of request + /// ID of pet to update + /// Additional data to pass to server (optional) + /// file to upload (optional) + /// ApiResponse + Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); + } + + /// + /// Abstraction of PetService. + /// + public abstract class AbstractPetService: PetService + { + public virtual Task AddPet(NancyContext context, Pet pet) + { + return AddPet(pet); + } + + public virtual Task DeletePet(NancyContext context, long? petId, string apiKey) + { + return DeletePet(petId, apiKey); + } + + public virtual Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) + { + return FindPetsByStatus(status); + } + + public virtual Task> FindPetsByTags(NancyContext context, List tags) + { + return FindPetsByTags(tags); + } + + public virtual Task GetPetById(NancyContext context, long? petId) + { + return GetPetById(petId); + } + + public virtual Task UpdatePet(NancyContext context, Pet pet) + { + return UpdatePet(pet); + } + + public virtual Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status) + { + return UpdatePetWithForm(petId, name, status); + } + + public virtual Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) + { + return UploadFile(petId, additionalMetadata, file); + } + + protected abstract Task AddPet(Pet pet); + + protected abstract Task DeletePet(long? petId, string apiKey); + + protected abstract Task> FindPetsByStatus(FindPetsByStatusStatusEnum? status); + + protected abstract Task> FindPetsByTags(List tags); + + protected abstract Task GetPetById(long? petId); + + protected abstract Task UpdatePet(Pet pet); + + protected abstract Task UpdatePetWithForm(long? petId, string name, string status); + + protected abstract Task UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs new file mode 100644 index 000000000000..47786fb496d4 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs @@ -0,0 +1,129 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of Store domain. + /// + public sealed class StoreModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public StoreModule(StoreService service) : base("/v2") + { + Delete["/store/order/{orderId}", true] = async (parameters, ct) => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); + + await service.DeleteOrder(Context, orderId); + return new Response { ContentType = ""}; + }; + + Get["/store/inventory", true] = async (parameters, ct) => + { + + return await service.GetInventory(Context); + }; + + Get["/store/order/{orderId}", true] = async (parameters, ct) => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); + + return await service.GetOrderById(Context, orderId); + }; + + Post["/store/order", true] = async (parameters, ct) => + { + var order = this.Bind(); + Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); + + return await service.PlaceOrder(Context, order); + }; + } + } + + /// + /// Service handling Store requests. + /// + public interface StoreService + { + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Context of request + /// ID of the order that needs to be deleted + /// + Task DeleteOrder(NancyContext context, string orderId); + + /// + /// Returns a map of status codes to quantities + /// + /// Context of request + /// Dictionary<string, int?> + Task> GetInventory(NancyContext context); + + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// + /// Context of request + /// ID of pet that needs to be fetched + /// Order + Task GetOrderById(NancyContext context, long? orderId); + + /// + /// + /// + /// Context of request + /// order placed for purchasing the pet + /// Order + Task PlaceOrder(NancyContext context, Order order); + } + + /// + /// Abstraction of StoreService. + /// + public abstract class AbstractStoreService: StoreService + { + public virtual Task DeleteOrder(NancyContext context, string orderId) + { + return DeleteOrder(orderId); + } + + public virtual Task> GetInventory(NancyContext context) + { + return GetInventory(); + } + + public virtual Task GetOrderById(NancyContext context, long? orderId) + { + return GetOrderById(orderId); + } + + public virtual Task PlaceOrder(NancyContext context, Order order) + { + return PlaceOrder(order); + } + + protected abstract Task DeleteOrder(string orderId); + + protected abstract Task> GetInventory(); + + protected abstract Task GetOrderById(long? orderId); + + protected abstract Task PlaceOrder(Order order); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs new file mode 100644 index 000000000000..38efbe0f7cc4 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs @@ -0,0 +1,234 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; +using System.Threading.Tasks; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of User domain. + /// + public sealed class UserModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public UserModule(UserService service) : base("/v2") + { + Post["/user", true] = async (parameters, ct) => + { + var user = this.Bind(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); + + await service.CreateUser(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithArray", true] = async (parameters, ct) => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); + + await service.CreateUsersWithArrayInput(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithList", true] = async (parameters, ct) => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); + + await service.CreateUsersWithListInput(Context, user); + return new Response { ContentType = ""}; + }; + + Delete["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); + + await service.DeleteUser(Context, username); + return new Response { ContentType = ""}; + }; + + Get["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); + + return await service.GetUserByName(Context, username); + }; + + Get["/user/login", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); + var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); + + Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); + + return await service.LoginUser(Context, username, password); + }; + + Get["/user/logout", true] = async (parameters, ct) => + { + + await service.LogoutUser(Context); + return new Response { ContentType = ""}; + }; + + Put["/user/{username}", true] = async (parameters, ct) => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + var user = this.Bind(); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); + + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); + + await service.UpdateUser(Context, username, user); + return new Response { ContentType = ""}; + }; + } + } + + /// + /// Service handling User requests. + /// + public interface UserService + { + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// Created user object + /// + Task CreateUser(NancyContext context, User user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + Task CreateUsersWithArrayInput(NancyContext context, List user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + Task CreateUsersWithListInput(NancyContext context, List user); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// The name that needs to be deleted + /// + Task DeleteUser(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The name that needs to be fetched. Use user1 for testing. + /// User + Task GetUserByName(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The user name for login + /// The password for login in clear text + /// string + Task LoginUser(NancyContext context, string username, string password); + + /// + /// + /// + /// Context of request + /// + Task LogoutUser(NancyContext context); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// name that need to be deleted + /// Updated user object + /// + Task UpdateUser(NancyContext context, string username, User user); + } + + /// + /// Abstraction of UserService. + /// + public abstract class AbstractUserService: UserService + { + public virtual Task CreateUser(NancyContext context, User user) + { + return CreateUser(user); + } + + public virtual Task CreateUsersWithArrayInput(NancyContext context, List user) + { + return CreateUsersWithArrayInput(user); + } + + public virtual Task CreateUsersWithListInput(NancyContext context, List user) + { + return CreateUsersWithListInput(user); + } + + public virtual Task DeleteUser(NancyContext context, string username) + { + return DeleteUser(username); + } + + public virtual Task GetUserByName(NancyContext context, string username) + { + return GetUserByName(username); + } + + public virtual Task LoginUser(NancyContext context, string username, string password) + { + return LoginUser(username, password); + } + + public virtual Task LogoutUser(NancyContext context) + { + return LogoutUser(); + } + + public virtual Task UpdateUser(NancyContext context, string username, User user) + { + return UpdateUser(username, user); + } + + protected abstract Task CreateUser(User user); + + protected abstract Task CreateUsersWithArrayInput(List user); + + protected abstract Task CreateUsersWithListInput(List user); + + protected abstract Task DeleteUser(string username); + + protected abstract Task GetUserByName(string username); + + protected abstract Task LoginUser(string username, string password); + + protected abstract Task LogoutUser(); + + protected abstract Task UpdateUser(string username, User user); + } + +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj new file mode 100644 index 000000000000..04b710b25cbd --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + {768B8DC6-54EE-4D40-9B20-7857E1D742A4} + Library + Properties + Org.OpenAPITools.v2 + Org.OpenAPITools + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Org.OpenAPITools.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\Org.OpenAPITools.XML + + + + ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + True + + + ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll + True + + + ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll + True + + + ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec new file mode 100644 index 000000000000..102c48def9d8 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -0,0 +1,13 @@ + + + + Org.OpenAPITools + Org.OpenAPITools + 1.0.0 + openapi-generator + openapi-generator + false + NancyFx Org.OpenAPITools API + http://www.apache.org/licenses/LICENSE-2.0.html + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs new file mode 100644 index 000000000000..9e7cfd8a8570 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs @@ -0,0 +1,55 @@ +using Nancy.Bootstrapper; +using Nancy.Json; +using NodaTime; +using NodaTime.Text; +using System; +using System.Collections.Generic; + +namespace Org.OpenAPITools.v2.Utils +{ + /// + /// (De)serializes a to a string using + /// the RFC3339 + /// full-date format. + /// + public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup + { + public override IEnumerable SupportedTypes + { + get + { + yield return typeof(LocalDate); + yield return typeof(LocalDate?); + } + } + + public void Initialize(IPipelines pipelines) + { + JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); + } + + + public override object Serialize(object obj, JavaScriptSerializer serializer) + { + if (obj is LocalDate) + { + LocalDate localDate = (LocalDate)obj; + return LocalDatePattern.IsoPattern.Format(localDate); + } + return null; + } + + public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) + { + if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) + { + try + { + return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); + } + catch { } + } + return null; + } + } +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs new file mode 100644 index 000000000000..9bc5408abfea --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Nancy; +using NodaTime; +using NodaTime.Text; +using Sharpility.Base; +using Sharpility.Extensions; +using Sharpility.Util; + +namespace Org.OpenAPITools.v2.Utils +{ + internal static class Parameters + { + private static readonly IDictionary> Parsers = CreateParsers(); + + internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + var valueType = typeof(TValue); + var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); + var isNullable = default(TValue) == null; + string value = RawValueOf(parameters, request, name, parameterType); + Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); + if (value == null && isNullable) + { + return default(TValue); + } + if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) + { + return EnumValueOf(name, value); + } + return ValueOf(parameters, name, value, valueType, request, parameterType); + } + + private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + try + { + switch (parameterType) + { + case ParameterType.Query: + string querValue = request.Query[name]; + return querValue; + case ParameterType.Path: + string pathValue = parameters[name]; + return pathValue; + case ParameterType.Header: + var headerValue = request.Headers[name]; + return headerValue != null ? string.Join(",", headerValue) : null; + } + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); + } + throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); + } + + private static TValue EnumValueOf(string name, string value) + { + var valueType = typeof(TValue); + var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); + Preconditions.IsNotNull(enumType, () => new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); + var values = Enum.GetValues(enumType); + foreach (var entry in values) + { + if (entry.ToString().EqualsIgnoreCases(value) + || ((int)entry).ToString().EqualsIgnoreCases(value)) + { + return (TValue)entry; + } + } + throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", + name, value, Strings.ToString(values))); + } + + private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) + { + var parser = Parsers.GetIfPresent(valueType); + if (parser != null) + { + return ParseValueUsing(name, value, valueType, parser); + } + if (parameterType == ParameterType.Path) + { + return DynamicValueOf(parameters, name); + } + if (parameterType == ParameterType.Query) + { + return DynamicValueOf(request.Query, name); + } + throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); + } + + private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) + { + var result = parser(Parameter.Of(name, value)); + try + { + return (TValue)result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + + "Received: '{2}', expected: '{3}'.", + name, value, result.GetType(), valueType)); + } + } + + private static TValue DynamicValueOf(dynamic parameters, string name) + { + string value = parameters[name]; + try + { + TValue result = parameters[name]; + return result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + + "Expected type: '{2}' is not supported", + name, value, typeof(TValue))); + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", + name, typeof(TValue)), e); + } + } + + private static IDictionary> CreateParsers() + { + var parsers = ImmutableDictionary.CreateBuilder>(); + parsers.Put(typeof(string), value => value.Value); + parsers.Put(typeof(bool), SafeParse(bool.Parse)); + parsers.Put(typeof(bool?), SafeParse(bool.Parse)); + parsers.Put(typeof(byte), SafeParse(byte.Parse)); + parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); + parsers.Put(typeof(short), SafeParse(short.Parse)); + parsers.Put(typeof(short?), SafeParse(short.Parse)); + parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); + parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); + parsers.Put(typeof(int), SafeParse(int.Parse)); + parsers.Put(typeof(int?), SafeParse(int.Parse)); + parsers.Put(typeof(uint), SafeParse(uint.Parse)); + parsers.Put(typeof(uint?), SafeParse(uint.Parse)); + parsers.Put(typeof(long), SafeParse(long.Parse)); + parsers.Put(typeof(long?), SafeParse(long.Parse)); + parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); + parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); + parsers.Put(typeof(float), SafeParse(float.Parse)); + parsers.Put(typeof(float?), SafeParse(float.Parse)); + parsers.Put(typeof(double), SafeParse(double.Parse)); + parsers.Put(typeof(double?), SafeParse(double.Parse)); + parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); + parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); + parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); + parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); + parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); + parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(List), ListParse(byte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); + parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(List), ListParse(sbyte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); + parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); + parsers.Put(typeof(List), ListParse(short.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); + parsers.Put(typeof(HashSet), SetParse(short.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(List), ListParse(ushort.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); + parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(List), ListParse(uint.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); + parsers.Put(typeof(HashSet), SetParse(uint.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(List), ListParse(ulong.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); + parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); + parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); + + return parsers.ToImmutableDictionary(); + } + + private static Func SafeParse(Func parse) + { + return parameter => + { + try + { + return parse(parameter.Value); + } + catch (OverflowException) + { + throw ParameterOutOfRange(parameter, typeof(T)); + } + catch (FormatException) + { + throw InvalidParameterFormat(parameter, typeof(T)); + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", + parameter.Name, parameter.Value, typeof(T)), e); + } + }; + } + + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + + private static Func ListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new List(); + } + return ParseCollection(parameter.Value, itemParser).ToList(); + }; + } + + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Lists.EmptyList(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); + }; + } + + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + + private static Func SetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new HashSet(); + } + return ParseCollection(parameter.Value, itemParser).ToSet(); + }; + } + + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableSetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Sets.EmptySet(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); + }; + } + + private static ZonedDateTime ParseZonedDateTime(string value) + { + var dateTime = DateTime.Parse(value); + return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); + } + + private static LocalDate ParseLocalDate(string value) + { + return LocalDatePattern.IsoPattern.Parse(value).Value; + } + + private static LocalTime ParseLocalTime(string value) + { + return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; + } + + private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + + private class Parameter + { + internal string Name { get; private set; } + internal string Value { get; private set; } + + private Parameter(string name, string value) + { + Name = name; + Value = value; + } + + internal static Parameter Of(string name, string value) + { + return new Parameter(name, value); + } + } + } + + internal enum ParameterType + { + Undefined, + Query, + Path, + Header + } +} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config new file mode 100644 index 000000000000..e3401566e5d2 --- /dev/null +++ b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/.openapi-generator/VERSION b/samples/server/petstore/nancyfx/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/nancyfx/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln new file mode 100644 index 000000000000..757078a1383c --- /dev/null +++ b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU +{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 000000000000..db083b73bdc7 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// Describes the result of uploading an image resource + /// + public sealed class ApiResponse: IEquatable + { + /// + /// Code + /// + public int? Code { get; private set; } + + /// + /// Type + /// + public string Type { get; private set; } + + /// + /// Message + /// + public string Message { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use ApiResponse.Builder() for instance creation instead. + /// + [Obsolete] + public ApiResponse() + { + } + + private ApiResponse(int? Code, string Type, string Message) + { + + this.Code = Code; + + this.Type = Type; + + this.Message = Message; + + } + + /// + /// Returns builder of ApiResponse. + /// + /// ApiResponseBuilder + public static ApiResponseBuilder Builder() + { + return new ApiResponseBuilder(); + } + + /// + /// Returns ApiResponseBuilder with properties set. + /// Use it to change properties. + /// + /// ApiResponseBuilder + public ApiResponseBuilder With() + { + return Builder() + .Code(Code) + .Type(Type) + .Message(Message); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(ApiResponse other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are equals, false otherwise + public static bool operator == (ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (ApiResponse. + /// + /// Compared (ApiResponse + /// Compared (ApiResponse + /// true if compared items are not equals, false otherwise + public static bool operator != (ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + /// + /// Builder of ApiResponse. + /// + public sealed class ApiResponseBuilder + { + private int? _Code; + private string _Type; + private string _Message; + + internal ApiResponseBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for ApiResponse.Code property. + /// + /// Code + public ApiResponseBuilder Code(int? value) + { + _Code = value; + return this; + } + + /// + /// Sets value for ApiResponse.Type property. + /// + /// Type + public ApiResponseBuilder Type(string value) + { + _Type = value; + return this; + } + + /// + /// Sets value for ApiResponse.Message property. + /// + /// Message + public ApiResponseBuilder Message(string value) + { + _Message = value; + return this; + } + + + /// + /// Builds instance of ApiResponse. + /// + /// ApiResponse + public ApiResponse Build() + { + Validate(); + return new ApiResponse( + Code: _Code, + Type: _Type, + Message: _Message + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 000000000000..1bfb30abb752 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A category for a pet + /// + public sealed class Category: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Category.Builder() for instance creation instead. + /// + [Obsolete] + public Category() + { + } + + private Category(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Category. + /// + /// CategoryBuilder + public static CategoryBuilder Builder() + { + return new CategoryBuilder(); + } + + /// + /// Returns CategoryBuilder with properties set. + /// Use it to change properties. + /// + /// CategoryBuilder + public CategoryBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Category other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are equals, false otherwise + public static bool operator == (Category left, Category right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Category. + /// + /// Compared (Category + /// Compared (Category + /// true if compared items are not equals, false otherwise + public static bool operator != (Category left, Category right) + { + return !Equals(left, right); + } + + /// + /// Builder of Category. + /// + public sealed class CategoryBuilder + { + private long? _Id; + private string _Name; + + internal CategoryBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Category.Id property. + /// + /// Id + public CategoryBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Category.Name property. + /// + /// Name + public CategoryBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Category. + /// + /// Category + public Category Build() + { + Validate(); + return new Category( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 000000000000..7bdec1016958 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,247 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// An order for a pets from the pet store + /// + public sealed class Order: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// PetId + /// + public long? PetId { get; private set; } + + /// + /// Quantity + /// + public int? Quantity { get; private set; } + + /// + /// ShipDate + /// + public ZonedDateTime? ShipDate { get; private set; } + + /// + /// Order Status + /// + public StatusEnum? Status { get; private set; } + + /// + /// Complete + /// + public bool? Complete { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Order.Builder() for instance creation instead. + /// + [Obsolete] + public Order() + { + } + + private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) + { + + this.Id = Id; + + this.PetId = PetId; + + this.Quantity = Quantity; + + this.ShipDate = ShipDate; + + this.Status = Status; + + this.Complete = Complete; + + } + + /// + /// Returns builder of Order. + /// + /// OrderBuilder + public static OrderBuilder Builder() + { + return new OrderBuilder(); + } + + /// + /// Returns OrderBuilder with properties set. + /// Use it to change properties. + /// + /// OrderBuilder + public OrderBuilder With() + { + return Builder() + .Id(Id) + .PetId(PetId) + .Quantity(Quantity) + .ShipDate(ShipDate) + .Status(Status) + .Complete(Complete); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Order other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are equals, false otherwise + public static bool operator == (Order left, Order right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Order. + /// + /// Compared (Order + /// Compared (Order + /// true if compared items are not equals, false otherwise + public static bool operator != (Order left, Order right) + { + return !Equals(left, right); + } + + /// + /// Builder of Order. + /// + public sealed class OrderBuilder + { + private long? _Id; + private long? _PetId; + private int? _Quantity; + private ZonedDateTime? _ShipDate; + private StatusEnum? _Status; + private bool? _Complete; + + internal OrderBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + _Complete = false; + } + + /// + /// Sets value for Order.Id property. + /// + /// Id + public OrderBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Order.PetId property. + /// + /// PetId + public OrderBuilder PetId(long? value) + { + _PetId = value; + return this; + } + + /// + /// Sets value for Order.Quantity property. + /// + /// Quantity + public OrderBuilder Quantity(int? value) + { + _Quantity = value; + return this; + } + + /// + /// Sets value for Order.ShipDate property. + /// + /// ShipDate + public OrderBuilder ShipDate(ZonedDateTime? value) + { + _ShipDate = value; + return this; + } + + /// + /// Sets value for Order.Status property. + /// + /// Order Status + public OrderBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + /// + /// Sets value for Order.Complete property. + /// + /// Complete + public OrderBuilder Complete(bool? value) + { + _Complete = value; + return this; + } + + + /// + /// Builds instance of Order. + /// + /// Order + public Order Build() + { + Validate(); + return new Order( + Id: _Id, + PetId: _PetId, + Quantity: _Quantity, + ShipDate: _ShipDate, + Status: _Status, + Complete: _Complete + ); + } + + private void Validate() + { + } + } + + + public enum StatusEnum { Placed, Approved, Delivered }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 000000000000..a3f02e090883 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A pet for sale in the pet store + /// + public sealed class Pet: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Category + /// + public Category Category { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + /// + /// PhotoUrls + /// + public List PhotoUrls { get; private set; } + + /// + /// Tags + /// + public List Tags { get; private set; } + + /// + /// pet status in the store + /// + public StatusEnum? Status { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Pet.Builder() for instance creation instead. + /// + [Obsolete] + public Pet() + { + } + + private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) + { + + this.Id = Id; + + this.Category = Category; + + this.Name = Name; + + this.PhotoUrls = PhotoUrls; + + this.Tags = Tags; + + this.Status = Status; + + } + + /// + /// Returns builder of Pet. + /// + /// PetBuilder + public static PetBuilder Builder() + { + return new PetBuilder(); + } + + /// + /// Returns PetBuilder with properties set. + /// Use it to change properties. + /// + /// PetBuilder + public PetBuilder With() + { + return Builder() + .Id(Id) + .Category(Category) + .Name(Name) + .PhotoUrls(PhotoUrls) + .Tags(Tags) + .Status(Status); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Pet other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are equals, false otherwise + public static bool operator == (Pet left, Pet right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Pet. + /// + /// Compared (Pet + /// Compared (Pet + /// true if compared items are not equals, false otherwise + public static bool operator != (Pet left, Pet right) + { + return !Equals(left, right); + } + + /// + /// Builder of Pet. + /// + public sealed class PetBuilder + { + private long? _Id; + private Category _Category; + private string _Name; + private List _PhotoUrls; + private List _Tags; + private StatusEnum? _Status; + + internal PetBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Pet.Id property. + /// + /// Id + public PetBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Pet.Category property. + /// + /// Category + public PetBuilder Category(Category value) + { + _Category = value; + return this; + } + + /// + /// Sets value for Pet.Name property. + /// + /// Name + public PetBuilder Name(string value) + { + _Name = value; + return this; + } + + /// + /// Sets value for Pet.PhotoUrls property. + /// + /// PhotoUrls + public PetBuilder PhotoUrls(List value) + { + _PhotoUrls = value; + return this; + } + + /// + /// Sets value for Pet.Tags property. + /// + /// Tags + public PetBuilder Tags(List value) + { + _Tags = value; + return this; + } + + /// + /// Sets value for Pet.Status property. + /// + /// pet status in the store + public PetBuilder Status(StatusEnum? value) + { + _Status = value; + return this; + } + + + /// + /// Builds instance of Pet. + /// + /// Pet + public Pet Build() + { + Validate(); + return new Pet( + Id: _Id, + Category: _Category, + Name: _Name, + PhotoUrls: _PhotoUrls, + Tags: _Tags, + Status: _Status + ); + } + + private void Validate() + { + if (_Name == null) + { + throw new ArgumentException("Name is a required property for Pet and cannot be null"); + } + if (_PhotoUrls == null) + { + throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); + } + } + } + + + public enum StatusEnum { Available, Pending, Sold }; + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 000000000000..7ce321d25114 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A tag for a pet + /// + public sealed class Tag: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Name + /// + public string Name { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use Tag.Builder() for instance creation instead. + /// + [Obsolete] + public Tag() + { + } + + private Tag(long? Id, string Name) + { + + this.Id = Id; + + this.Name = Name; + + } + + /// + /// Returns builder of Tag. + /// + /// TagBuilder + public static TagBuilder Builder() + { + return new TagBuilder(); + } + + /// + /// Returns TagBuilder with properties set. + /// Use it to change properties. + /// + /// TagBuilder + public TagBuilder With() + { + return Builder() + .Id(Id) + .Name(Name); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(Tag other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are equals, false otherwise + public static bool operator == (Tag left, Tag right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (Tag. + /// + /// Compared (Tag + /// Compared (Tag + /// true if compared items are not equals, false otherwise + public static bool operator != (Tag left, Tag right) + { + return !Equals(left, right); + } + + /// + /// Builder of Tag. + /// + public sealed class TagBuilder + { + private long? _Id; + private string _Name; + + internal TagBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for Tag.Id property. + /// + /// Id + public TagBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for Tag.Name property. + /// + /// Name + public TagBuilder Name(string value) + { + _Name = value; + return this; + } + + + /// + /// Builds instance of Tag. + /// + /// Tag + public Tag Build() + { + Validate(); + return new Tag( + Id: _Id, + Name: _Name + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 000000000000..04d33ca07f77 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Sharpility.Extensions; +using NodaTime; + +namespace Org.OpenAPITools.v2.Models +{ + /// + /// A User who is purchasing from the pet store + /// + public sealed class User: IEquatable + { + /// + /// Id + /// + public long? Id { get; private set; } + + /// + /// Username + /// + public string Username { get; private set; } + + /// + /// FirstName + /// + public string FirstName { get; private set; } + + /// + /// LastName + /// + public string LastName { get; private set; } + + /// + /// Email + /// + public string Email { get; private set; } + + /// + /// Password + /// + public string Password { get; private set; } + + /// + /// Phone + /// + public string Phone { get; private set; } + + /// + /// User Status + /// + public int? UserStatus { get; private set; } + + + /// + /// Empty constructor required by some serializers. + /// Use User.Builder() for instance creation instead. + /// + [Obsolete] + public User() + { + } + + private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) + { + + this.Id = Id; + + this.Username = Username; + + this.FirstName = FirstName; + + this.LastName = LastName; + + this.Email = Email; + + this.Password = Password; + + this.Phone = Phone; + + this.UserStatus = UserStatus; + + } + + /// + /// Returns builder of User. + /// + /// UserBuilder + public static UserBuilder Builder() + { + return new UserBuilder(); + } + + /// + /// Returns UserBuilder with properties set. + /// Use it to change properties. + /// + /// UserBuilder + public UserBuilder With() + { + return Builder() + .Id(Id) + .Username(Username) + .FirstName(FirstName) + .LastName(LastName) + .Email(Email) + .Password(Password) + .Phone(Phone) + .UserStatus(UserStatus); + } + + public override string ToString() + { + return this.PropertiesToString(); + } + + public override bool Equals(object obj) + { + return this.EqualsByProperties(obj); + } + + public bool Equals(User other) + { + return Equals((object) other); + } + + public override int GetHashCode() + { + return this.PropertiesHash(); + } + + /// + /// Implementation of == operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are equals, false otherwise + public static bool operator == (User left, User right) + { + return Equals(left, right); + } + + /// + /// Implementation of != operator for (User. + /// + /// Compared (User + /// Compared (User + /// true if compared items are not equals, false otherwise + public static bool operator != (User left, User right) + { + return !Equals(left, right); + } + + /// + /// Builder of User. + /// + public sealed class UserBuilder + { + private long? _Id; + private string _Username; + private string _FirstName; + private string _LastName; + private string _Email; + private string _Password; + private string _Phone; + private int? _UserStatus; + + internal UserBuilder() + { + SetupDefaults(); + } + + private void SetupDefaults() + { + } + + /// + /// Sets value for User.Id property. + /// + /// Id + public UserBuilder Id(long? value) + { + _Id = value; + return this; + } + + /// + /// Sets value for User.Username property. + /// + /// Username + public UserBuilder Username(string value) + { + _Username = value; + return this; + } + + /// + /// Sets value for User.FirstName property. + /// + /// FirstName + public UserBuilder FirstName(string value) + { + _FirstName = value; + return this; + } + + /// + /// Sets value for User.LastName property. + /// + /// LastName + public UserBuilder LastName(string value) + { + _LastName = value; + return this; + } + + /// + /// Sets value for User.Email property. + /// + /// Email + public UserBuilder Email(string value) + { + _Email = value; + return this; + } + + /// + /// Sets value for User.Password property. + /// + /// Password + public UserBuilder Password(string value) + { + _Password = value; + return this; + } + + /// + /// Sets value for User.Phone property. + /// + /// Phone + public UserBuilder Phone(string value) + { + _Phone = value; + return this; + } + + /// + /// Sets value for User.UserStatus property. + /// + /// User Status + public UserBuilder UserStatus(int? value) + { + _UserStatus = value; + return this; + } + + + /// + /// Builds instance of User. + /// + /// User + public User Build() + { + Validate(); + return new User( + Id: _Id, + Username: _Username, + FirstName: _FirstName, + LastName: _LastName, + Email: _Email, + Password: _Password, + Phone: _Phone, + UserStatus: _UserStatus + ); + } + + private void Validate() + { + } + } + + + } +} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs new file mode 100644 index 000000000000..9cdfe6b814e6 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs @@ -0,0 +1,246 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + /// + /// Status values that need to be considered for filter + /// + public enum FindPetsByStatusStatusEnum + { + available = 1, + pending = 2, + sold = 3 + }; + + + /// + /// Module processing requests of Pet domain. + /// + public sealed class PetModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public PetModule(PetService service) : base("/v2") + { + Post["/pet"] = parameters => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); + + service.AddPet(Context, pet); + return new Response { ContentType = ""}; + }; + + Delete["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); + + service.DeletePet(Context, petId, apiKey); + return new Response { ContentType = ""}; + }; + + Get["/pet/findByStatus"] = parameters => + { + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); + Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); + + return service.FindPetsByStatus(Context, status).ToArray(); + }; + + Get["/pet/findByTags"] = parameters => + { + var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); + Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); + + return service.FindPetsByTags(Context, tags).ToArray(); + }; + + Get["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); + + return service.GetPetById(Context, petId); + }; + + Put["/pet"] = parameters => + { + var pet = this.Bind(); + Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); + + service.UpdatePet(Context, pet); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); + var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); + + service.UpdatePetWithForm(Context, petId, name, status); + return new Response { ContentType = ""}; + }; + + Post["/pet/{petId}/uploadImage"] = parameters => + { + var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); + var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); + var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); + Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); + + return service.UploadFile(Context, petId, additionalMetadata, file); + }; + } + } + + /// + /// Service handling Pet requests. + /// + public interface PetService + { + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + void AddPet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// Pet id to delete + /// (optional) + /// + void DeletePet(NancyContext context, long? petId, string apiKey); + + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Context of request + /// Status values that need to be considered for filter + /// List<Pet> + List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); + + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Context of request + /// Tags to filter by + /// List<Pet> + List FindPetsByTags(NancyContext context, List tags); + + /// + /// Returns a single pet + /// + /// Context of request + /// ID of pet to return + /// Pet + Pet GetPetById(NancyContext context, long? petId); + + /// + /// + /// + /// Context of request + /// Pet object that needs to be added to the store + /// + void UpdatePet(NancyContext context, Pet pet); + + /// + /// + /// + /// Context of request + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) + /// + void UpdatePetWithForm(NancyContext context, long? petId, string name, string status); + + /// + /// + /// + /// Context of request + /// ID of pet to update + /// Additional data to pass to server (optional) + /// file to upload (optional) + /// ApiResponse + ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); + } + + /// + /// Abstraction of PetService. + /// + public abstract class AbstractPetService: PetService + { + public virtual void AddPet(NancyContext context, Pet pet) + { + AddPet(pet); + } + + public virtual void DeletePet(NancyContext context, long? petId, string apiKey) + { + DeletePet(petId, apiKey); + } + + public virtual List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) + { + return FindPetsByStatus(status); + } + + public virtual List FindPetsByTags(NancyContext context, List tags) + { + return FindPetsByTags(tags); + } + + public virtual Pet GetPetById(NancyContext context, long? petId) + { + return GetPetById(petId); + } + + public virtual void UpdatePet(NancyContext context, Pet pet) + { + UpdatePet(pet); + } + + public virtual void UpdatePetWithForm(NancyContext context, long? petId, string name, string status) + { + UpdatePetWithForm(petId, name, status); + } + + public virtual ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) + { + return UploadFile(petId, additionalMetadata, file); + } + + protected abstract void AddPet(Pet pet); + + protected abstract void DeletePet(long? petId, string apiKey); + + protected abstract List FindPetsByStatus(FindPetsByStatusStatusEnum? status); + + protected abstract List FindPetsByTags(List tags); + + protected abstract Pet GetPetById(long? petId); + + protected abstract void UpdatePet(Pet pet); + + protected abstract void UpdatePetWithForm(long? petId, string name, string status); + + protected abstract ApiResponse UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs new file mode 100644 index 000000000000..be42a7b8b520 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs @@ -0,0 +1,128 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of Store domain. + /// + public sealed class StoreModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public StoreModule(StoreService service) : base("/v2") + { + Delete["/store/order/{orderId}"] = parameters => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); + + service.DeleteOrder(Context, orderId); + return new Response { ContentType = ""}; + }; + + Get["/store/inventory"] = parameters => + { + + return service.GetInventory(Context); + }; + + Get["/store/order/{orderId}"] = parameters => + { + var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); + Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); + + return service.GetOrderById(Context, orderId); + }; + + Post["/store/order"] = parameters => + { + var order = this.Bind(); + Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); + + return service.PlaceOrder(Context, order); + }; + } + } + + /// + /// Service handling Store requests. + /// + public interface StoreService + { + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Context of request + /// ID of the order that needs to be deleted + /// + void DeleteOrder(NancyContext context, string orderId); + + /// + /// Returns a map of status codes to quantities + /// + /// Context of request + /// Dictionary<string, int?> + Dictionary GetInventory(NancyContext context); + + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// + /// Context of request + /// ID of pet that needs to be fetched + /// Order + Order GetOrderById(NancyContext context, long? orderId); + + /// + /// + /// + /// Context of request + /// order placed for purchasing the pet + /// Order + Order PlaceOrder(NancyContext context, Order order); + } + + /// + /// Abstraction of StoreService. + /// + public abstract class AbstractStoreService: StoreService + { + public virtual void DeleteOrder(NancyContext context, string orderId) + { + DeleteOrder(orderId); + } + + public virtual Dictionary GetInventory(NancyContext context) + { + return GetInventory(); + } + + public virtual Order GetOrderById(NancyContext context, long? orderId) + { + return GetOrderById(orderId); + } + + public virtual Order PlaceOrder(NancyContext context, Order order) + { + return PlaceOrder(order); + } + + protected abstract void DeleteOrder(string orderId); + + protected abstract Dictionary GetInventory(); + + protected abstract Order GetOrderById(long? orderId); + + protected abstract Order PlaceOrder(Order order); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs new file mode 100644 index 000000000000..c35bc62dae10 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs @@ -0,0 +1,233 @@ +using System; +using Nancy; +using Nancy.ModelBinding; +using System.Collections.Generic; +using Sharpility.Base; +using Org.OpenAPITools.v2.Models; +using Org.OpenAPITools.v2.Utils; +using NodaTime; + +namespace Org.OpenAPITools.v2.Modules +{ + + /// + /// Module processing requests of User domain. + /// + public sealed class UserModule : NancyModule + { + /// + /// Sets up HTTP methods mappings. + /// + /// Service handling requests + public UserModule(UserService service) : base("/v2") + { + Post["/user"] = parameters => + { + var user = this.Bind(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); + + service.CreateUser(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithArray"] = parameters => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); + + service.CreateUsersWithArrayInput(Context, user); + return new Response { ContentType = ""}; + }; + + Post["/user/createWithList"] = parameters => + { + var user = this.Bind>(); + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); + + service.CreateUsersWithListInput(Context, user); + return new Response { ContentType = ""}; + }; + + Delete["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); + + service.DeleteUser(Context, username); + return new Response { ContentType = ""}; + }; + + Get["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); + + return service.GetUserByName(Context, username); + }; + + Get["/user/login"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); + var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); + + Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); + + return service.LoginUser(Context, username, password); + }; + + Get["/user/logout"] = parameters => + { + + service.LogoutUser(Context); + return new Response { ContentType = ""}; + }; + + Put["/user/{username}"] = parameters => + { + var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); + var user = this.Bind(); + Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); + + Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); + + service.UpdateUser(Context, username, user); + return new Response { ContentType = ""}; + }; + } + } + + /// + /// Service handling User requests. + /// + public interface UserService + { + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// Created user object + /// + void CreateUser(NancyContext context, User user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + void CreateUsersWithArrayInput(NancyContext context, List user); + + /// + /// + /// + /// Context of request + /// List of user object + /// + void CreateUsersWithListInput(NancyContext context, List user); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// The name that needs to be deleted + /// + void DeleteUser(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The name that needs to be fetched. Use user1 for testing. + /// User + User GetUserByName(NancyContext context, string username); + + /// + /// + /// + /// Context of request + /// The user name for login + /// The password for login in clear text + /// string + string LoginUser(NancyContext context, string username, string password); + + /// + /// + /// + /// Context of request + /// + void LogoutUser(NancyContext context); + + /// + /// This can only be done by the logged in user. + /// + /// Context of request + /// name that need to be deleted + /// Updated user object + /// + void UpdateUser(NancyContext context, string username, User user); + } + + /// + /// Abstraction of UserService. + /// + public abstract class AbstractUserService: UserService + { + public virtual void CreateUser(NancyContext context, User user) + { + CreateUser(user); + } + + public virtual void CreateUsersWithArrayInput(NancyContext context, List user) + { + CreateUsersWithArrayInput(user); + } + + public virtual void CreateUsersWithListInput(NancyContext context, List user) + { + CreateUsersWithListInput(user); + } + + public virtual void DeleteUser(NancyContext context, string username) + { + DeleteUser(username); + } + + public virtual User GetUserByName(NancyContext context, string username) + { + return GetUserByName(username); + } + + public virtual string LoginUser(NancyContext context, string username, string password) + { + return LoginUser(username, password); + } + + public virtual void LogoutUser(NancyContext context) + { + LogoutUser(); + } + + public virtual void UpdateUser(NancyContext context, string username, User user) + { + UpdateUser(username, user); + } + + protected abstract void CreateUser(User user); + + protected abstract void CreateUsersWithArrayInput(List user); + + protected abstract void CreateUsersWithListInput(List user); + + protected abstract void DeleteUser(string username); + + protected abstract User GetUserByName(string username); + + protected abstract string LoginUser(string username, string password); + + protected abstract void LogoutUser(); + + protected abstract void UpdateUser(string username, User user); + } + +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj new file mode 100644 index 000000000000..04b710b25cbd --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -0,0 +1,66 @@ + + + + Debug + AnyCPU + {768B8DC6-54EE-4D40-9B20-7857E1D742A4} + Library + Properties + Org.OpenAPITools.v2 + Org.OpenAPITools + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Org.OpenAPITools.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\Org.OpenAPITools.XML + + + + ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + True + + + ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll + True + + + ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll + True + + + ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec new file mode 100644 index 000000000000..102c48def9d8 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -0,0 +1,13 @@ + + + + Org.OpenAPITools + Org.OpenAPITools + 1.0.0 + openapi-generator + openapi-generator + false + NancyFx Org.OpenAPITools API + http://www.apache.org/licenses/LICENSE-2.0.html + + \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs new file mode 100644 index 000000000000..9e7cfd8a8570 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs @@ -0,0 +1,55 @@ +using Nancy.Bootstrapper; +using Nancy.Json; +using NodaTime; +using NodaTime.Text; +using System; +using System.Collections.Generic; + +namespace Org.OpenAPITools.v2.Utils +{ + /// + /// (De)serializes a to a string using + /// the RFC3339 + /// full-date format. + /// + public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup + { + public override IEnumerable SupportedTypes + { + get + { + yield return typeof(LocalDate); + yield return typeof(LocalDate?); + } + } + + public void Initialize(IPipelines pipelines) + { + JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); + } + + + public override object Serialize(object obj, JavaScriptSerializer serializer) + { + if (obj is LocalDate) + { + LocalDate localDate = (LocalDate)obj; + return LocalDatePattern.IsoPattern.Format(localDate); + } + return null; + } + + public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) + { + if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) + { + try + { + return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); + } + catch { } + } + return null; + } + } +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs new file mode 100644 index 000000000000..9bc5408abfea --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Nancy; +using NodaTime; +using NodaTime.Text; +using Sharpility.Base; +using Sharpility.Extensions; +using Sharpility.Util; + +namespace Org.OpenAPITools.v2.Utils +{ + internal static class Parameters + { + private static readonly IDictionary> Parsers = CreateParsers(); + + internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + var valueType = typeof(TValue); + var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); + var isNullable = default(TValue) == null; + string value = RawValueOf(parameters, request, name, parameterType); + Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); + if (value == null && isNullable) + { + return default(TValue); + } + if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) + { + return EnumValueOf(name, value); + } + return ValueOf(parameters, name, value, valueType, request, parameterType); + } + + private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) + { + try + { + switch (parameterType) + { + case ParameterType.Query: + string querValue = request.Query[name]; + return querValue; + case ParameterType.Path: + string pathValue = parameters[name]; + return pathValue; + case ParameterType.Header: + var headerValue = request.Headers[name]; + return headerValue != null ? string.Join(",", headerValue) : null; + } + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); + } + throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); + } + + private static TValue EnumValueOf(string name, string value) + { + var valueType = typeof(TValue); + var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); + Preconditions.IsNotNull(enumType, () => new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); + var values = Enum.GetValues(enumType); + foreach (var entry in values) + { + if (entry.ToString().EqualsIgnoreCases(value) + || ((int)entry).ToString().EqualsIgnoreCases(value)) + { + return (TValue)entry; + } + } + throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", + name, value, Strings.ToString(values))); + } + + private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) + { + var parser = Parsers.GetIfPresent(valueType); + if (parser != null) + { + return ParseValueUsing(name, value, valueType, parser); + } + if (parameterType == ParameterType.Path) + { + return DynamicValueOf(parameters, name); + } + if (parameterType == ParameterType.Query) + { + return DynamicValueOf(request.Query, name); + } + throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); + } + + private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) + { + var result = parser(Parameter.Of(name, value)); + try + { + return (TValue)result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException( + string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + + "Received: '{2}', expected: '{3}'.", + name, value, result.GetType(), valueType)); + } + } + + private static TValue DynamicValueOf(dynamic parameters, string name) + { + string value = parameters[name]; + try + { + TValue result = parameters[name]; + return result; + } + catch (InvalidCastException) + { + throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + + "Expected type: '{2}' is not supported", + name, value, typeof(TValue))); + } + catch (Exception e) + { + throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", + name, typeof(TValue)), e); + } + } + + private static IDictionary> CreateParsers() + { + var parsers = ImmutableDictionary.CreateBuilder>(); + parsers.Put(typeof(string), value => value.Value); + parsers.Put(typeof(bool), SafeParse(bool.Parse)); + parsers.Put(typeof(bool?), SafeParse(bool.Parse)); + parsers.Put(typeof(byte), SafeParse(byte.Parse)); + parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); + parsers.Put(typeof(short), SafeParse(short.Parse)); + parsers.Put(typeof(short?), SafeParse(short.Parse)); + parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); + parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); + parsers.Put(typeof(int), SafeParse(int.Parse)); + parsers.Put(typeof(int?), SafeParse(int.Parse)); + parsers.Put(typeof(uint), SafeParse(uint.Parse)); + parsers.Put(typeof(uint?), SafeParse(uint.Parse)); + parsers.Put(typeof(long), SafeParse(long.Parse)); + parsers.Put(typeof(long?), SafeParse(long.Parse)); + parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); + parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); + parsers.Put(typeof(float), SafeParse(float.Parse)); + parsers.Put(typeof(float?), SafeParse(float.Parse)); + parsers.Put(typeof(double), SafeParse(double.Parse)); + parsers.Put(typeof(double?), SafeParse(double.Parse)); + parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); + parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); + parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); + parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); + parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); + parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); + parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); + parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); + parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); + parsers.Put(typeof(List), ListParse(byte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); + parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); + parsers.Put(typeof(List), ListParse(sbyte.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); + parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); + parsers.Put(typeof(List), ListParse(short.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); + parsers.Put(typeof(HashSet), SetParse(short.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); + parsers.Put(typeof(List), ListParse(ushort.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); + parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); + parsers.Put(typeof(List), ListParse(uint.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); + parsers.Put(typeof(HashSet), SetParse(uint.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); + parsers.Put(typeof(List), ListParse(ulong.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); + parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); + + parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); + parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); + parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); + parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); + + return parsers.ToImmutableDictionary(); + } + + private static Func SafeParse(Func parse) + { + return parameter => + { + try + { + return parse(parameter.Value); + } + catch (OverflowException) + { + throw ParameterOutOfRange(parameter, typeof(T)); + } + catch (FormatException) + { + throw InvalidParameterFormat(parameter, typeof(T)); + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", + parameter.Name, parameter.Value, typeof(T)), e); + } + }; + } + + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + + private static Func ListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new List(); + } + return ParseCollection(parameter.Value, itemParser).ToList(); + }; + } + + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableListParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Lists.EmptyList(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); + }; + } + + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + + private static Func SetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return new HashSet(); + } + return ParseCollection(parameter.Value, itemParser).ToSet(); + }; + } + + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + + private static Func ImmutableSetParse(Func itemParser) + { + return parameter => + { + if (string.IsNullOrEmpty(parameter.Value)) + { + return Sets.EmptySet(); + } + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); + }; + } + + private static ZonedDateTime ParseZonedDateTime(string value) + { + var dateTime = DateTime.Parse(value); + return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); + } + + private static LocalDate ParseLocalDate(string value) + { + return LocalDatePattern.IsoPattern.Parse(value).Value; + } + + private static LocalTime ParseLocalTime(string value) + { + return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; + } + + private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) + { + return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", + parameter.Name, parameter.Value, type)); + } + + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + + private class Parameter + { + internal string Name { get; private set; } + internal string Value { get; private set; } + + private Parameter(string name, string value) + { + Name = name; + Value = value; + } + + internal static Parameter Of(string name, string value) + { + return new Parameter(name, value); + } + } + } + + internal enum ParameterType + { + Undefined, + Query, + Path, + Header + } +} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config new file mode 100644 index 000000000000..e3401566e5d2 --- /dev/null +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml index 8a31b8d5b865..877989080caf 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml +++ b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,29 +27,23 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + x-swagger-router-controller: Pet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -61,118 +51,152 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + x-swagger-router-controller: Pet + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + x-swagger-router-controller: Pet + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: Finds Pets by tags + tags: + - pet + x-swagger-router-controller: Pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-swagger-router-controller: Pet + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -180,148 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - x-openapi-router-controller: Pet - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-swagger-router-controller: Pet + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet + x-swagger-router-controller: Pet /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: uploads an image + tags: + - pet + x-swagger-router-controller: Pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - x-openapi-router-controller: Store - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + x-swagger-router-controller: Store + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -329,30 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} - x-openapi-router-controller: Store + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-swagger-router-controller: Store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-swagger-router-controller: Store + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -360,164 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - x-openapi-router-controller: Store - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} - x-openapi-router-controller: Store + x-swagger-router-controller: Store /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + x-swagger-router-controller: User + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - x-openapi-router-controller: User - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + x-swagger-router-controller: User + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} - x-openapi-router-controller: User + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-swagger-router-controller: User /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-swagger-router-controller: User + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -525,122 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + x-swagger-router-controller: User + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} - x-openapi-router-controller: User + x-swagger-router-controller: User components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -654,116 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/nodejs/.openapi-generator/VERSION b/samples/server/petstore/nodejs/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/nodejs/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs/api/openapi.yaml b/samples/server/petstore/nodejs/api/openapi.yaml index 8a31b8d5b865..877989080caf 100644 --- a/samples/server/petstore/nodejs/api/openapi.yaml +++ b/samples/server/petstore/nodejs/api/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,29 +27,23 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + x-swagger-router-controller: Pet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -61,118 +51,152 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + x-swagger-router-controller: Pet + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + x-swagger-router-controller: Pet + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: Finds Pets by tags + tags: + - pet + x-swagger-router-controller: Pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + x-swagger-router-controller: Pet + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -180,148 +204,122 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - x-openapi-router-controller: Pet - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + x-swagger-router-controller: Pet + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets - x-openapi-router-controller: Pet + x-swagger-router-controller: Pet /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets - x-openapi-router-controller: Pet + summary: uploads an image + tags: + - pet + x-swagger-router-controller: Pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - x-openapi-router-controller: Store - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + x-swagger-router-controller: Store + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -329,30 +327,51 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} - x-openapi-router-controller: Store + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-swagger-router-controller: Store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + x-swagger-router-controller: Store + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -360,164 +379,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - x-openapi-router-controller: Store - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} - x-openapi-router-controller: Store + x-swagger-router-controller: Store /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + x-swagger-router-controller: User + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - x-openapi-router-controller: User - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + x-swagger-router-controller: User + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - x-openapi-router-controller: User - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + x-swagger-router-controller: User + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} - x-openapi-router-controller: User + description: successful operation + summary: Logs out current logged in user session + tags: + - user + x-swagger-router-controller: User /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + x-swagger-router-controller: User + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -525,122 +544,113 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + x-swagger-router-controller: User + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - x-openapi-router-controller: User - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} - x-openapi-router-controller: User + x-swagger-router-controller: User components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -654,116 +664,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/php-silex/.openapi-generator/VERSION b/samples/server/petstore/php-silex/.openapi-generator/VERSION index 1c00c5181548..82602aa4190d 100644 --- a/samples/server/petstore/php-silex/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.2-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rails5/.openapi-generator/VERSION b/samples/server/petstore/rails5/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/rails5/.openapi-generator/VERSION +++ b/samples/server/petstore/rails5/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/.openapi-generator/VERSION b/samples/server/petstore/rust-server/.openapi-generator/VERSION index ad121e8340e0..82602aa4190d 100644 --- a/samples/server/petstore/rust-server/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION index f9f7450d1359..82602aa4190d 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/README.md b/samples/server/petstore/scala-lagom-server/README.md index 938d7331cb7d..e80ddccb7e17 100644 --- a/samples/server/petstore/scala-lagom-server/README.md +++ b/samples/server/petstore/scala-lagom-server/README.md @@ -1,9 +1,9 @@ -# Swagger generated scala-lagomApi +# OpenAPI generated scala-lagomApi ## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the -[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This -is an example of building a swagger-enabled lagon-api. +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled lagon-api. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. diff --git a/samples/server/petstore/scala-lagom-server/build.sbt b/samples/server/petstore/scala-lagom-server/build.sbt index ea9dd5789f03..b6ab43cf17b3 100644 --- a/samples/server/petstore/scala-lagom-server/build.sbt +++ b/samples/server/petstore/scala-lagom-server/build.sbt @@ -2,7 +2,7 @@ version := "1.0.0" name := "scala-lagom-server" -organization := "io.swagger" +organization := "org.openapitools" scalaVersion := "2.11.8" diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index 6ee03b22acac..fea6ba05311d 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index ff42a995e9ae..a5b3b3dd8b30 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala index b62b48d87504..c78d28fc86dd 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -75,7 +75,7 @@ trait UserApi extends Service { * Get user by user name * * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName(username: String): ServiceCall[NotUsed ,User] diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala index 884853e5c25b..38f3bd8aa3d1 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -15,7 +15,7 @@ import play.api.libs.json._ case class ApiResponse ( code: Option[Int], - _type: Option[String], + `type`: Option[String], message: Option[String] ) diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala index c50c6e71c64d..5b058bb51d67 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala index c79ffb780e54..a40c7585cfa0 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala index acc6c25afc38..59c9446ee779 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala index 65aa9c628bcd..0155bfed72c8 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala index b21cd2e7e770..75a835cb7944 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scalatra/.openapi-generator/VERSION b/samples/server/petstore/scalatra/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/scalatra/.openapi-generator/VERSION +++ b/samples/server/petstore/scalatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/.openapi-generator/VERSION b/samples/server/petstore/sinatra/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/openapi.yaml b/samples/server/petstore/sinatra/openapi.yaml index 01e572ba924f..c0b60f85ddeb 100644 --- a/samples/server/petstore/sinatra/openapi.yaml +++ b/samples/server/petstore/sinatra/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,28 +27,22 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -60,115 +50,148 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -176,143 +199,118 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -320,29 +318,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -350,157 +368,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -508,119 +526,111 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -634,116 +644,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/undertow/.openapi-generator/VERSION b/samples/server/petstore/undertow/.openapi-generator/VERSION index 096bf47efe31..82602aa4190d 100644 --- a/samples/server/petstore/undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/undertow/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/undertow/src/main/resources/config/openapi.json b/samples/server/petstore/undertow/src/main/resources/config/openapi.json index d72aeb9f185a..ee18d3bd6b6b 100644 --- a/samples/server/petstore/undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/undertow/src/main/resources/config/openapi.json @@ -108,6 +108,7 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -162,6 +163,7 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, + "style" : "form", "explode" : false, "schema" : { "type" : "array", From cf42bc8d332fa6d7c45abbc43d74269b0b0ec2f5 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 14:57:24 -0700 Subject: [PATCH 11/18] update samples --- .../go/.openapi-generator/VERSION | 2 +- .../go/api/openapi.yaml | 36 +- .../petstore-security-test/go/api_fake.go | 6 +- .../go/configuration.go | 2 +- .../petstore-security-test/go/docs/FakeApi.md | 2 +- .../petstore/R/.openapi-generator/VERSION | 2 +- .../petstore/ada/.openapi-generator/VERSION | 2 +- .../src/client/samples-petstore-clients.adb | 77 +- .../src/client/samples-petstore-clients.ads | 30 +- .../ada/src/model/samples-petstore-models.adb | 10 +- .../ada/src/model/samples-petstore-models.ads | 12 +- .../petstore/ada/src/samples-petstore.ads | 8 +- samples/client/petstore/ada/src/samples.ads | 8 +- .../httpclient/.openapi-generator/VERSION | 2 +- .../android/httpclient/docs/PetApi.md | 8 +- .../android/volley/.openapi-generator/VERSION | 2 +- .../petstore/android/volley/docs/PetApi.md | 8 +- .../petstore/apex/.openapi-generator/VERSION | 2 +- .../petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/README.md | 1 - samples/client/petstore/bash/_petstore-cli | 10 +- samples/client/petstore/bash/docs/FakeApi.md | 2 +- samples/client/petstore/bash/docs/PetApi.md | 33 - samples/client/petstore/bash/petstore-cli | 68 - .../bash/petstore-cli.bash-completion | 2 - .../clojure/.openapi-generator/VERSION | 2 +- samples/client/petstore/clojure/pom.xml | 32 - .../clojure/src/open_api_petstore/api/pet.clj | 4 +- .../cpp-qt5/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-qt5/client/OAIPet.h | 4 +- .../petstore/cpp-qt5/client/OAIPetApi.h | 4 +- .../petstore/cpp-qt5/client/OAIStoreApi.h | 2 +- .../petstore/cpp-qt5/client/OAIUserApi.h | 2 +- .../cpp-restsdk/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-restsdk/ApiClient.cpp | 2 +- .../client/petstore/cpp-restsdk/ApiClient.h | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.cpp | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.h | 2 +- .../petstore/cpp-restsdk/ApiException.cpp | 2 +- .../petstore/cpp-restsdk/ApiException.h | 2 +- .../petstore/cpp-restsdk/HttpContent.cpp | 2 +- .../client/petstore/cpp-restsdk/HttpContent.h | 2 +- .../client/petstore/cpp-restsdk/IHttpBody.h | 2 +- .../client/petstore/cpp-restsdk/JsonBody.cpp | 2 +- .../client/petstore/cpp-restsdk/JsonBody.h | 2 +- .../client/petstore/cpp-restsdk/ModelBase.cpp | 2 +- .../client/petstore/cpp-restsdk/ModelBase.h | 2 +- .../cpp-restsdk/MultipartFormData.cpp | 2 +- .../petstore/cpp-restsdk/MultipartFormData.h | 4 +- .../client/petstore/cpp-restsdk/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/Object.h | 2 +- .../petstore/cpp-restsdk/api/PetApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/PetApi.h | 2 +- .../petstore/cpp-restsdk/api/StoreApi.cpp | 2 +- .../petstore/cpp-restsdk/api/StoreApi.h | 2 +- .../petstore/cpp-restsdk/api/UserApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/UserApi.h | 2 +- .../cpp-restsdk/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restsdk/model/ApiResponse.h | 2 +- .../petstore/cpp-restsdk/model/Category.cpp | 2 +- .../petstore/cpp-restsdk/model/Category.h | 2 +- .../petstore/cpp-restsdk/model/Order.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Order.h | 2 +- .../client/petstore/cpp-restsdk/model/Pet.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Pet.h | 2 +- .../client/petstore/cpp-restsdk/model/Tag.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Tag.h | 2 +- .../petstore/cpp-restsdk/model/User.cpp | 2 +- .../client/petstore/cpp-restsdk/model/User.h | 2 +- .../cpp-tizen/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-tizen/doc/Doxyfile | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../OpenAPIClient/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/README.md | 1 - .../csharp/OpenAPIClient/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClient/docs/PetApi.md | 67 - .../Org.OpenAPITools.Test.csproj | 6 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 215 --- .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet35/README.md | 1 - .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet35/docs/PetApi.md | 67 - .../src/Org.OpenAPITools/Api/PetApi.cs | 107 -- .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet40/README.md | 1 - .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 4 +- .../csharp/OpenAPIClientNet40/docs/PetApi.md | 67 - .../src/Org.OpenAPITools/Api/PetApi.cs | 107 -- .../.openapi-generator/VERSION | 2 +- .../OpenAPIClientNetCoreProject/README.md | 1 - .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 - .../src/Org.OpenAPITools/Api/PetApi.cs | 215 --- .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNetStandard/README.md | 1 - .../OpenAPIClientNetStandard/docs/FakeApi.md | 4 +- .../OpenAPIClientNetStandard/docs/PetApi.md | 67 - .../src/Org.OpenAPITools/Api/PetApi.cs | 215 --- .../.openapi-generator/VERSION | 2 +- .../README.md | 1 - .../docs/FakeApi.md | 4 +- .../docs/PetApi.md | 67 - .../src/Org.OpenAPITools/Api/PetApi.cs | 215 --- .../openapi/.openapi-generator/VERSION | 2 +- .../swagger/.analysis_options | 2 - .../dart/flutter_petstore/swagger/.gitignore | 27 - .../swagger/.openapi-generator-ignore | 23 - .../swagger/.openapi-generator/VERSION | 1 - .../dart/flutter_petstore/swagger/README.md | 121 -- .../flutter_petstore/swagger/docs/Order.md | 20 - .../dart/flutter_petstore/swagger/docs/Pet.md | 20 - .../flutter_petstore/swagger/docs/PetApi.md | 379 ---- .../flutter_petstore/swagger/docs/StoreApi.md | 186 -- .../flutter_petstore/swagger/docs/User.md | 22 - .../flutter_petstore/swagger/docs/UserApi.md | 349 ---- .../dart/flutter_petstore/swagger/git_push.sh | 52 - .../flutter_petstore/swagger/lib/api.dart | 27 - .../swagger/lib/api/pet_api.dart | 432 ----- .../swagger/lib/api/store_api.dart | 207 -- .../swagger/lib/api/user_api.dart | 409 ---- .../swagger/lib/api_client.dart | 160 -- .../swagger/lib/api_exception.dart | 23 - .../swagger/lib/api_helper.dart | 44 - .../swagger/lib/auth/api_key_auth.dart | 27 - .../swagger/lib/auth/authentication.dart | 7 - .../swagger/lib/auth/http_basic_auth.dart | 14 - .../swagger/lib/auth/oauth.dart | 19 - .../swagger/lib/model/api_response.dart | 44 - .../swagger/lib/model/category.dart | 40 - .../swagger/lib/model/order.dart | 57 - .../swagger/lib/model/pet.dart | 57 - .../swagger/lib/model/tag.dart | 40 - .../swagger/lib/model/user.dart | 64 - .../flutter_petstore/swagger/pubspec.yaml | 5 - .../.openapi-generator/VERSION | 2 +- .../dart/openapi/.openapi-generator/VERSION | 2 +- .../petstore/eiffel/.openapi-generator-ignore | 23 - .../eiffel/.openapi-generator/VERSION | 2 +- samples/client/petstore/eiffel/README.md | 1 - samples/client/petstore/eiffel/api_client.ecf | 6 +- .../client/petstore/eiffel/docs/FAKE_API.md | 2 +- .../client/petstore/eiffel/docs/PET_API.md | 31 - .../client/petstore/eiffel/src/api/fake_api.e | 2 +- .../client/petstore/eiffel/src/api/pet_api.e | 46 - .../serialization/api_json_deserializer.e | 2 +- .../client/petstore/eiffel/test/api_test.ecf | 6 +- .../petstore/elixir/.openapi-generator-ignore | 23 - .../elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/elixir/config/config.exs | 4 +- .../elixir/lib/openapi_petstore/api/fake.ex | 2 +- .../elixir/lib/openapi_petstore/api/pet.ex | 30 - .../elixir/lib/openapi_petstore/connection.ex | 2 +- .../petstore/elm/.openapi-generator/VERSION | 2 +- .../erlang-client/.openapi-generator/VERSION | 2 +- .../petstore/flash/.openapi-generator/VERSION | 2 +- samples/client/petstore/flash/flash/build.xml | 6 +- .../org/openapitools/event/ApiClientEvent.as | 4 +- .../petstore/go/go-petstore-withXml/README.md | 1 - .../go/go-petstore-withXml/api/openapi.yaml | 40 - .../go/go-petstore-withXml/api_pet.go | 103 - .../go/go-petstore-withXml/docs/PetApi.md | 38 - .../go/go-petstore/.openapi-generator/VERSION | 2 +- .../go-petstore/docs/ModelApiResponse.md} | 12 +- .../go-petstore/docs/ModelReturn.md} | 10 +- .../go-petstore/docs/OuterBoolean.md} | 10 +- .../go/go-petstore/docs/OuterNumber.md | 9 + .../go/go-petstore/docs/OuterString.md | 9 + .../go/go-petstore/model_outer_boolean.go | 14 + .../go/go-petstore/model_outer_number.go | 14 + .../go/go-petstore/model_outer_string.go | 14 + .../groovy/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/README.md | 4 +- .../lib/OpenAPIPetstore.hs | 2 +- .../lib/OpenAPIPetstore/API.hs | 2 +- .../lib/OpenAPIPetstore/API/AnotherFake.hs | 2 +- .../lib/OpenAPIPetstore/API/Fake.hs | 75 +- .../API/FakeClassnameTags123.hs | 2 +- .../lib/OpenAPIPetstore/API/Pet.hs | 34 +- .../lib/OpenAPIPetstore/API/Store.hs | 14 +- .../lib/OpenAPIPetstore/API/User.hs | 50 +- .../lib/OpenAPIPetstore/Client.hs | 2 +- .../lib/OpenAPIPetstore/Core.hs | 2 +- .../lib/OpenAPIPetstore/Logging.hs | 2 +- .../lib/OpenAPIPetstore/MimeTypes.hs | 2 +- .../lib/OpenAPIPetstore/Model.hs | 5 +- .../lib/OpenAPIPetstore/ModelLens.hs | 2 +- .../openapi-petstore.cabal | 2 +- .../petstore/haskell-http-client/openapi.yaml | 1663 ++++++++--------- .../java/feign/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/jersey1/.openapi-generator/VERSION | 2 +- .../jersey2-java6/.openapi-generator/VERSION | 2 +- .../jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/jersey2/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../okhttp-gson/.openapi-generator/VERSION | 2 +- .../rest-assured/.openapi-generator/VERSION | 2 +- .../java/resteasy/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../resttemplate/.openapi-generator/VERSION | 2 +- .../java/retrofit/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/retrofit2/.openapi-generator/VERSION | 2 +- .../retrofit2rx/.openapi-generator/VERSION | 2 +- .../retrofit2rx2/.openapi-generator/VERSION | 2 +- .../java/vertx/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../javascript-es6/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/README.md | 1 - .../petstore/javascript-es6/docs/PetApi.md | 52 - .../petstore/javascript-es6/src/api/PetApi.js | 56 - .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/README.md | 1 - .../javascript-promise-es6/docs/PetApi.md | 51 - .../javascript-promise-es6/src/api/PetApi.js | 63 - .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise/README.md | 1 - .../javascript-promise/docs/PetApi.md | 50 - .../javascript-promise/src/ApiClient.js | 2 +- .../src/api/AnotherFakeApi.js | 2 +- .../javascript-promise/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../javascript-promise/src/api/PetApi.js | 67 +- .../javascript-promise/src/api/StoreApi.js | 2 +- .../javascript-promise/src/api/UserApi.js | 2 +- .../petstore/javascript-promise/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/Animal.js | 2 +- .../src/model/AnimalFarm.js | 2 +- .../src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../src/model/ArrayOfNumberOnly.js | 2 +- .../javascript-promise/src/model/ArrayTest.js | 2 +- .../src/model/Capitalization.js | 2 +- .../javascript-promise/src/model/Cat.js | 2 +- .../javascript-promise/src/model/Category.js | 2 +- .../src/model/ClassModel.js | 2 +- .../javascript-promise/src/model/Client.js | 2 +- .../javascript-promise/src/model/Dog.js | 2 +- .../src/model/EnumArrays.js | 2 +- .../javascript-promise/src/model/EnumClass.js | 2 +- .../javascript-promise/src/model/EnumTest.js | 2 +- .../src/model/FormatTest.js | 2 +- .../src/model/HasOnlyReadOnly.js | 2 +- .../javascript-promise/src/model/List.js | 2 +- .../javascript-promise/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../src/model/Model200Response.js | 2 +- .../src/model/ModelReturn.js | 2 +- .../javascript-promise/src/model/Name.js | 2 +- .../src/model/NumberOnly.js | 2 +- .../javascript-promise/src/model/Order.js | 2 +- .../src/model/OuterComposite.js | 2 +- .../javascript-promise/src/model/OuterEnum.js | 2 +- .../javascript-promise/src/model/Pet.js | 2 +- .../src/model/ReadOnlyFirst.js | 2 +- .../src/model/SpecialModelName.js | 2 +- .../javascript-promise/src/model/Tag.js | 2 +- .../javascript-promise/src/model/User.js | 2 +- .../javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/README.md | 1 - .../client/petstore/javascript/docs/PetApi.md | 52 - .../petstore/javascript/src/ApiClient.js | 2 +- .../javascript/src/api/AnotherFakeApi.js | 2 +- .../petstore/javascript/src/api/FakeApi.js | 2 +- .../src/api/FakeClassnameTags123Api.js | 2 +- .../petstore/javascript/src/api/PetApi.js | 60 +- .../petstore/javascript/src/api/StoreApi.js | 2 +- .../petstore/javascript/src/api/UserApi.js | 2 +- .../client/petstore/javascript/src/index.js | 2 +- .../src/model/AdditionalPropertiesClass.js | 2 +- .../petstore/javascript/src/model/Animal.js | 2 +- .../javascript/src/model/AnimalFarm.js | 2 +- .../javascript/src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayTest.js | 2 +- .../javascript/src/model/Capitalization.js | 2 +- .../petstore/javascript/src/model/Cat.js | 2 +- .../petstore/javascript/src/model/Category.js | 2 +- .../javascript/src/model/ClassModel.js | 2 +- .../petstore/javascript/src/model/Client.js | 2 +- .../petstore/javascript/src/model/Dog.js | 2 +- .../javascript/src/model/EnumArrays.js | 2 +- .../javascript/src/model/EnumClass.js | 2 +- .../petstore/javascript/src/model/EnumTest.js | 2 +- .../javascript/src/model/FormatTest.js | 2 +- .../javascript/src/model/HasOnlyReadOnly.js | 2 +- .../petstore/javascript/src/model/List.js | 2 +- .../petstore/javascript/src/model/MapTest.js | 2 +- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../javascript/src/model/Model200Response.js | 2 +- .../javascript/src/model/ModelReturn.js | 2 +- .../petstore/javascript/src/model/Name.js | 2 +- .../javascript/src/model/NumberOnly.js | 2 +- .../petstore/javascript/src/model/Order.js | 2 +- .../javascript/src/model/OuterComposite.js | 2 +- .../javascript/src/model/OuterEnum.js | 2 +- .../petstore/javascript/src/model/Pet.js | 2 +- .../javascript/src/model/ReadOnlyFirst.js | 2 +- .../javascript/src/model/SpecialModelName.js | 2 +- .../petstore/javascript/src/model/Tag.js | 2 +- .../petstore/javascript/src/model/User.js | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/Order.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 1 + .../kotlin-string/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin/.openapi-generator/VERSION | 2 +- .../petstore/lua/.openapi-generator/VERSION | 2 +- .../objc/core-data/.openapi-generator/VERSION | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../objc/default/.openapi-generator/VERSION | 2 +- .../default/SwaggerClient/Api/SWGPetApi.m | 4 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../petstore/perl/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/README.md | 1 - samples/client/petstore/perl/docs/FakeApi.md | 2 +- samples/client/petstore/perl/docs/PetApi.md | 52 - .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 95 - .../petstore/php/.openapi-generator/VERSION | 2 +- .../lib/Api/AnotherFakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../lib/Api/FakeClassnameTags123Api.php | 2 +- .../php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../OpenAPIClient-php/lib/ApiException.php | 2 +- .../OpenAPIClient-php/lib/Configuration.php | 2 +- .../OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../lib/Model/AnimalFarm.php | 2 +- .../lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../lib/Model/ArrayOfNumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../lib/Model/Capitalization.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../OpenAPIClient-php/lib/Model/Category.php | 2 +- .../lib/Model/ClassModel.php | 2 +- .../OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../lib/Model/EnumArrays.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/FormatTest.php | 2 +- .../lib/Model/HasOnlyReadOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/MapTest.php | 2 +- ...PropertiesAndAdditionalPropertiesClass.php | 2 +- .../lib/Model/Model200Response.php | 2 +- .../lib/Model/ModelInterface.php | 2 +- .../OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../lib/Model/ModelReturn.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../lib/Model/NumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../lib/Model/OuterComposite.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../lib/Model/ReadOnlyFirst.php | 2 +- .../lib/Model/SpecialModelName.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../lib/ObjectSerializer.php | 2 +- .../test/Api/AnotherFakeApiTest.php | 2 +- .../test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../test/Api/StoreApiTest.php | 2 +- .../test/Api/UserApiTest.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AnimalFarmTest.php | 2 +- .../test/Model/AnimalTest.php | 2 +- .../test/Model/ApiResponseTest.php | 2 +- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayTestTest.php | 2 +- .../test/Model/CapitalizationTest.php | 2 +- .../OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../test/Model/CategoryTest.php | 2 +- .../test/Model/ClassModelTest.php | 2 +- .../test/Model/ClientTest.php | 2 +- .../OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../test/Model/EnumArraysTest.php | 2 +- .../test/Model/EnumClassTest.php | 2 +- .../test/Model/EnumTestTest.php | 2 +- .../test/Model/FormatTestTest.php | 2 +- .../test/Model/HasOnlyReadOnlyTest.php | 2 +- .../test/Model/MapTestTest.php | 2 +- ...ertiesAndAdditionalPropertiesClassTest.php | 2 +- .../test/Model/Model200ResponseTest.php | 2 +- .../test/Model/ModelListTest.php | 2 +- .../test/Model/ModelReturnTest.php | 2 +- .../OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../test/Model/NumberOnlyTest.php | 2 +- .../test/Model/OrderTest.php | 2 +- .../test/Model/OuterCompositeTest.php | 2 +- .../test/Model/OuterEnumTest.php | 2 +- .../OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../test/Model/ReadOnlyFirstTest.php | 2 +- .../test/Model/SpecialModelNameTest.php | 2 +- .../OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../powershell/.openapi-generator/VERSION | 2 +- .../python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/README.md | 1 - .../petstore/python-asyncio/docs/PetApi.md | 55 - .../petstore_api/api/pet_api.py | 109 -- .../python-asyncio/petstore_api/api_client.py | 2 +- .../python-tornado/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/README.md | 1 - .../petstore/python-tornado/docs/PetApi.md | 55 - .../petstore_api/api/pet_api.py | 109 -- .../python-tornado/petstore_api/api_client.py | 2 +- .../python/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/README.md | 1 - samples/client/petstore/python/docs/PetApi.md | 55 - .../python/petstore_api/api/pet_api.py | 109 -- .../python/petstore_api/api_client.py | 2 +- .../petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../ruby/lib/petstore/api/another_fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../api/fake_classname_tags123_api.rb | 2 +- .../petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../ruby/lib/petstore/api/store_api.rb | 2 +- .../ruby/lib/petstore/api/user_api.rb | 2 +- .../petstore/ruby/lib/petstore/api_client.rb | 2 +- .../petstore/ruby/lib/petstore/api_error.rb | 2 +- .../ruby/lib/petstore/configuration.rb | 2 +- .../models/additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/animal.rb | 2 +- .../ruby/lib/petstore/models/animal_farm.rb | 2 +- .../ruby/lib/petstore/models/api_response.rb | 2 +- .../models/array_of_array_of_number_only.rb | 2 +- .../petstore/models/array_of_number_only.rb | 2 +- .../ruby/lib/petstore/models/array_test.rb | 2 +- .../lib/petstore/models/capitalization.rb | 2 +- .../petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../ruby/lib/petstore/models/category.rb | 2 +- .../ruby/lib/petstore/models/class_model.rb | 2 +- .../ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../ruby/lib/petstore/models/enum_class.rb | 2 +- .../ruby/lib/petstore/models/enum_test.rb | 2 +- .../ruby/lib/petstore/models/format_test.rb | 2 +- .../lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/list.rb | 2 +- .../ruby/lib/petstore/models/map_test.rb | 2 +- ...perties_and_additional_properties_class.rb | 2 +- .../lib/petstore/models/model200_response.rb | 2 +- .../ruby/lib/petstore/models/model_return.rb | 2 +- .../petstore/ruby/lib/petstore/models/name.rb | 2 +- .../ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/order.rb | 2 +- .../lib/petstore/models/outer_composite.rb | 2 +- .../ruby/lib/petstore/models/outer_enum.rb | 2 +- .../petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../lib/petstore/models/read_only_first.rb | 2 +- .../lib/petstore/models/special_model_name.rb | 2 +- .../petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../petstore/ruby/lib/petstore/models/user.rb | 2 +- .../petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- .../petstore/rust/.openapi-generator/VERSION | 2 +- .../scala-akka/.openapi-generator/VERSION | 2 +- .../scala-gatling/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../scalaz/.openapi-generator/VERSION | 2 +- .../spring-cloud/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../spring-stubs/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../swift/default/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../Pods/Alamofire/README.md | 1297 ------------- .../Pods/Alamofire/Source/Alamofire.swift | 369 ---- .../Pods/Alamofire/Source/Download.swift | 248 --- .../Pods/Alamofire/Source/Manager.swift | 779 -------- .../Alamofire/Source/MultipartFormData.swift | 659 ------- .../Source/NetworkReachabilityManager.swift | 244 --- .../Pods/Alamofire/Source/Notifications.swift | 47 - .../Alamofire/Source/ParameterEncoding.swift | 261 --- .../Pods/Alamofire/Source/Request.swift | 568 ------ .../Pods/Alamofire/Source/Response.swift | 97 - .../Source/ResponseSerialization.swift | 378 ---- .../Pods/Alamofire/Source/Result.swift | 103 - .../Alamofire/Source/ServerTrustPolicy.swift | 304 --- .../Pods/Alamofire/Source/Stream.swift | 182 -- .../Pods/Alamofire/Source/Timeline.swift | 138 -- .../Pods/Alamofire/Source/Upload.swift | 376 ---- .../Pods/Alamofire/Source/Validation.swift | 214 --- .../PetstoreClient.podspec.json | 25 - .../SwaggerClientTests/Pods/Manifest.lock | 41 - .../Pods/Pods.xcodeproj/project.pbxproj | 1662 ---------------- .../Alamofire/Alamofire-umbrella.h | 8 - .../Target Support Files/Alamofire/Info.plist | 26 - .../OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h | 11 - .../PetstoreClient/PetstoreClient-umbrella.h | 8 - ...ds-SwaggerClient-acknowledgements.markdown | 11 - .../Pods-SwaggerClient-acknowledgements.plist | 49 - .../Pods-SwaggerClient-resources.sh | 96 - .../Pods-SwaggerClient-umbrella.h | 8 - .../Pods-SwaggerClient.debug.xcconfig | 12 - .../Pods-SwaggerClient.release.xcconfig | 12 - .../Pods-SwaggerClientTests-resources.sh | 96 - .../Pods-SwaggerClientTests-umbrella.h | 8 - .../Pods-SwaggerClientTests.debug.xcconfig | 8 - .../Pods-SwaggerClientTests.release.xcconfig | 8 - .../swift/rxswift/.openapi-generator/VERSION | 2 +- .../swift3/default/.openapi-generator/VERSION | 2 +- .../default/SwaggerClientTests/Podfile.lock | 19 - .../objcCompatible/.openapi-generator/VERSION | 2 +- .../promisekit/.openapi-generator/VERSION | 2 +- .../SwaggerClientTests/Podfile.lock | 22 - .../swift3/rxswift/.openapi-generator/VERSION | 2 +- .../rxswift/SwaggerClientTests/Podfile.lock | 22 - .../unwraprequired/.openapi-generator/VERSION | 2 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 - .../objcCompatible/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 - .../promisekit/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 66 - .../swift4/rxswift/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 68 - .../unwrapRequired/.openapi-generator/VERSION | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 47 - .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../with-interfaces/README.md | 18 +- .../npm/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../es6-target/.openapi-generator/VERSION | 2 +- .../builds/es6-target/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/api/PetApi.ts | 42 +- .../typescript-jquery/default/api/StoreApi.ts | 24 +- .../typescript-jquery/default/api/UserApi.ts | 72 +- .../typescript-jquery/default/git_push.sh | 2 +- .../default/model/ApiResponse.ts | 10 +- .../default/model/Category.ts | 10 +- .../typescript-jquery/default/model/Order.ts | 10 +- .../typescript-jquery/default/model/Pet.ts | 10 +- .../typescript-jquery/default/model/Tag.ts | 10 +- .../typescript-jquery/default/model/User.ts | 10 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/README.md | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../npm/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/api.ts | 22 +- .../petstore/typescript-node/npm/package.json | 7 +- .../swift4/default/.openapi-generator/VERSION | 2 +- .../test/swift4/default/TestClient.podspec | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 65 - .../TestClient/Classes/OpenAPIs/APIs.swift | 61 - .../Classes/OpenAPIs/APIs/Swift4TestAPI.swift | 49 - .../OpenAPIs/AlamofireImplementations.swift | 413 ---- .../Classes/OpenAPIs/CodableHelper.swift | 67 - .../Classes/OpenAPIs/Configuration.swift | 15 - .../Classes/OpenAPIs/Extensions.swift | 173 -- .../OpenAPIs/JSONEncodableEncoding.swift | 54 - .../Classes/OpenAPIs/JSONEncodingHelper.swift | 43 - .../TestClient/Classes/OpenAPIs/Models.swift | 36 - .../OpenAPIs/Models/AllPrimitives.swift | 76 - .../Classes/OpenAPIs/Models/BaseCard.swift | 23 - .../Classes/OpenAPIs/Models/ErrorInfo.swift | 27 - .../OpenAPIs/Models/GetAllModelsResult.swift | 27 - .../OpenAPIs/Models/ModelDoubleArray.swift | 12 - .../OpenAPIs/Models/ModelErrorInfoArray.swift | 12 - .../OpenAPIs/Models/ModelStringArray.swift | 12 - .../Classes/OpenAPIs/Models/PersonCard.swift | 27 - .../Classes/OpenAPIs/Models/PlaceCard.swift | 27 - .../Classes/OpenAPIs/Models/SampleBase.swift | 25 - .../OpenAPIs/Models/SampleSubClass.swift | 29 - .../Classes/OpenAPIs/Models/StringEnum.swift | 15 - .../OpenAPIs/Models/VariableNameTest.swift | 36 - .../apache2/.openapi-generator/VERSION | 2 +- samples/config/petstore/apache2/PetApi.conf | 10 +- samples/config/petstore/apache2/StoreApi.conf | 6 +- samples/config/petstore/apache2/UserApi.conf | 12 +- .../cwiki/.openapi-generator/VERSION | 2 +- .../dynamic-html/.openapi-generator/VERSION | 2 +- samples/html.md/.openapi-generator/VERSION | 2 +- samples/html/.openapi-generator/VERSION | 2 +- samples/html2/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- .../petstore/php/.openapi-generator/VERSION | 2 +- .../lib/Api/AnotherFakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../lib/Api/FakeClassnameTags123Api.php | 2 +- .../php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../OpenAPIClient-php/lib/ApiException.php | 2 +- .../OpenAPIClient-php/lib/Configuration.php | 2 +- .../OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../lib/Model/AnimalFarm.php | 2 +- .../lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../lib/Model/ArrayOfNumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../lib/Model/Capitalization.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../OpenAPIClient-php/lib/Model/Category.php | 2 +- .../lib/Model/ClassModel.php | 2 +- .../OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../lib/Model/EnumArrays.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/FormatTest.php | 2 +- .../lib/Model/HasOnlyReadOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/MapTest.php | 2 +- ...PropertiesAndAdditionalPropertiesClass.php | 2 +- .../lib/Model/Model200Response.php | 2 +- .../lib/Model/ModelInterface.php | 2 +- .../OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../lib/Model/ModelReturn.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../lib/Model/NumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../lib/Model/OuterComposite.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../lib/Model/ReadOnlyFirst.php | 2 +- .../lib/Model/SpecialModelName.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../lib/ObjectSerializer.php | 2 +- .../test/Api/AnotherFakeApiTest.php | 2 +- .../test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../test/Api/StoreApiTest.php | 2 +- .../test/Api/UserApiTest.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AnimalFarmTest.php | 2 +- .../test/Model/AnimalTest.php | 2 +- .../test/Model/ApiResponseTest.php | 2 +- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayTestTest.php | 2 +- .../test/Model/CapitalizationTest.php | 2 +- .../OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../test/Model/CategoryTest.php | 2 +- .../test/Model/ClassModelTest.php | 2 +- .../test/Model/ClientTest.php | 2 +- .../OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../test/Model/EnumArraysTest.php | 2 +- .../test/Model/EnumClassTest.php | 2 +- .../test/Model/EnumTestTest.php | 2 +- .../test/Model/FormatTestTest.php | 2 +- .../test/Model/HasOnlyReadOnlyTest.php | 2 +- .../test/Model/MapTestTest.php | 2 +- ...ertiesAndAdditionalPropertiesClassTest.php | 2 +- .../test/Model/Model200ResponseTest.php | 2 +- .../test/Model/ModelListTest.php | 2 +- .../test/Model/ModelReturnTest.php | 2 +- .../OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../test/Model/NumberOnlyTest.php | 2 +- .../test/Model/OrderTest.php | 2 +- .../test/Model/OuterCompositeTest.php | 2 +- .../test/Model/OuterEnumTest.php | 2 +- .../OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../test/Model/ReadOnlyFirstTest.php | 2 +- .../test/Model/SpecialModelNameTest.php | 2 +- .../OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../petstore-security-test/slim/composer.lock | 315 ---- .../aspnetcore/.openapi-generator/VERSION | 2 +- .../wwwroot/openapi-original.json | 2 - .../cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-restbed/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restbed/api/PetApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/PetApi.h | 2 +- .../petstore/cpp-restbed/api/StoreApi.cpp | 2 +- .../petstore/cpp-restbed/api/StoreApi.h | 2 +- .../petstore/cpp-restbed/api/UserApi.cpp | 2 +- .../server/petstore/cpp-restbed/api/UserApi.h | 2 +- .../cpp-restbed/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restbed/model/ApiResponse.h | 2 +- .../petstore/cpp-restbed/model/Category.cpp | 2 +- .../petstore/cpp-restbed/model/Category.h | 2 +- .../petstore/cpp-restbed/model/Order.cpp | 2 +- .../server/petstore/cpp-restbed/model/Order.h | 2 +- .../server/petstore/cpp-restbed/model/Pet.cpp | 2 +- .../server/petstore/cpp-restbed/model/Pet.h | 2 +- .../server/petstore/cpp-restbed/model/Tag.cpp | 2 +- .../server/petstore/cpp-restbed/model/Tag.h | 2 +- .../petstore/cpp-restbed/model/User.cpp | 2 +- .../server/petstore/cpp-restbed/model/User.h | 2 +- .../erlang-server/.openapi-generator/VERSION | 2 +- .../petstore/erlang-server/priv/openapi.json | 2 - .../petstore/finch/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 +++---- .../openapi_server/util.py | 2 +- .../flaskConnexion/.openapi-generator/VERSION | 2 +- .../openapi_server/openapi/openapi.yaml | 676 +++---- .../flaskConnexion/openapi_server/util.py | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-inflector/.openapi-generator/VERSION | 2 +- .../controllers/PetController.java | 6 - .../src/main/openapi/openapi.yaml | 42 - .../java-msf4j/.openapi-generator-ignore | 23 - .../java-msf4j/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/FakeApi.java | 40 +- .../org/openapitools/api/FakeApiService.java | 4 +- .../gen/java/org/openapitools/api/PetApi.java | 27 +- .../org/openapitools/api/PetApiService.java | 4 - .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/model/AnimalFarm.java | 50 - .../org/openapitools/model/EnumArrays.java | 2 +- .../java/org/openapitools/model/MapTest.java | 2 +- .../api/impl/FakeApiServiceImpl.java | 4 +- .../api/impl/PetApiServiceImpl.java | 8 - .../java-pkmst/.openapi-generator-ignore | 23 - .../java-pkmst/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-pkmst/Readme.md | 16 +- samples/server/petstore/java-pkmst/pom.xml | 106 +- ...g.java => SwaggerDocumentationConfig.java} | 2 +- .../com/prokarma/pkmst/controller/PetApi.java | 8 +- .../pkmst/controller/PetApiController.java | 41 +- .../prokarma/pkmst/controller/StoreApi.java | 6 +- .../pkmst/controller/StoreApiController.java | 22 +- .../prokarma/pkmst/controller/UserApi.java | 4 +- .../pkmst/controller/UserApiController.java | 10 - .../src/main/resources/application-dev.yml | 2 +- .../src/main/resources/application-local.yml | 2 +- .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../app/apimodels/EnumArrays.java | 2 +- .../app/apimodels/MapTest.java | 2 +- .../app/controllers/PetApiController.java | 21 - .../app/controllers/PetApiControllerImp.java | 6 - .../PetApiControllerImpInterface.java | 2 - .../conf/routes | 1 - .../public/openapi.json | 60 - .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../public/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework/public/openapi.json | 2 - .../async/.openapi-generator/VERSION | 2 +- .../async/src/main/resources/openapi.json | 2 - .../java-vertx/rx/.openapi-generator/VERSION | 2 +- .../rx/src/main/resources/openapi.json | 2 - .../.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../eap-java8/.openapi-generator/VERSION | 2 +- .../eap-joda/.openapi-generator/VERSION | 2 +- .../eap/.openapi-generator/VERSION | 2 +- .../joda/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../gen/java/org/openapitools/api/PetApi.java | 17 +- .../src/main/openapi/openapi.yaml | 42 - .../.openapi-generator/VERSION | 2 +- .../jaxrs-spec/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../ktor/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/README.md | 2 +- .../nancyfx-async/.openapi-generator/VERSION | 2 +- .../nancyfx-async/Org.OpenAPITools.sln | 25 - .../Org.OpenAPITools/Models/ApiResponse.cs | 185 -- .../src/Org.OpenAPITools/Models/Category.cs | 165 -- .../src/Org.OpenAPITools/Models/Order.cs | 247 --- .../src/Org.OpenAPITools/Models/Pet.cs | 254 --- .../src/Org.OpenAPITools/Models/Tag.cs | 165 -- .../src/Org.OpenAPITools/Models/User.cs | 285 --- .../src/Org.OpenAPITools/Modules/PetModule.cs | 247 --- .../Org.OpenAPITools/Modules/StoreModule.cs | 129 -- .../Org.OpenAPITools/Modules/UserModule.cs | 234 --- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 - .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 - .../Utils/LocalDateConverter.cs | 55 - .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 ----- .../src/Org.OpenAPITools/packages.config | 7 - .../nancyfx/.openapi-generator/VERSION | 2 +- .../petstore/nancyfx/Org.OpenAPITools.sln | 25 - .../Org.OpenAPITools/Models/ApiResponse.cs | 185 -- .../src/Org.OpenAPITools/Models/Category.cs | 165 -- .../src/Org.OpenAPITools/Models/Order.cs | 247 --- .../src/Org.OpenAPITools/Models/Pet.cs | 254 --- .../src/Org.OpenAPITools/Models/Tag.cs | 165 -- .../src/Org.OpenAPITools/Models/User.cs | 285 --- .../src/Org.OpenAPITools/Modules/PetModule.cs | 246 --- .../Org.OpenAPITools/Modules/StoreModule.cs | 128 -- .../Org.OpenAPITools/Modules/UserModule.cs | 233 --- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 66 - .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 13 - .../Utils/LocalDateConverter.cs | 55 - .../src/Org.OpenAPITools/Utils/Parameters.cs | 450 ----- .../src/Org.OpenAPITools/packages.config | 7 - .../.openapi-generator/VERSION | 2 +- .../api/openapi.yaml | 616 +++--- .../nodejs/.openapi-generator/VERSION | 2 +- .../server/petstore/nodejs/api/openapi.yaml | 616 +++--- .../php-lumen/.openapi-generator/VERSION | 2 +- .../php-silex/.openapi-generator/VERSION | 2 +- .../php-slim/.openapi-generator/VERSION | 2 +- .../server/petstore/php-slim/composer.lock | 315 ---- .../php-symfony/.openapi-generator/VERSION | 2 +- .../php-ze-ph/.openapi-generator/VERSION | 2 +- .../rails5/.openapi-generator/VERSION | 2 +- samples/server/petstore/rails5/vendor/.keep | 0 .../rust-server/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-lagom-server/README.md | 8 +- .../petstore/scala-lagom-server/build.sbt | 2 +- .../scala/io/swagger/client/api/PetApi.scala | 10 +- .../io/swagger/client/api/StoreApi.scala | 10 +- .../scala/io/swagger/client/api/UserApi.scala | 12 +- .../io/swagger/client/model/ApiResponse.scala | 12 +- .../io/swagger/client/model/Category.scala | 10 +- .../scala/io/swagger/client/model/Order.scala | 10 +- .../scala/io/swagger/client/model/Pet.scala | 10 +- .../scala/io/swagger/client/model/Tag.scala | 10 +- .../scala/io/swagger/client/model/User.scala | 10 +- .../scalatra/.openapi-generator/VERSION | 2 +- .../sinatra/.openapi-generator/VERSION | 2 +- samples/server/petstore/sinatra/openapi.yaml | 576 +++--- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc/.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../springboot/.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../undertow/.openapi-generator/VERSION | 2 +- .../src/main/resources/config/openapi.json | 2 - 932 files changed, 3597 insertions(+), 25681 deletions(-) delete mode 100644 samples/client/petstore/clojure/pom.xml delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.gitignore delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/README.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart delete mode 100644 samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml delete mode 100644 samples/client/petstore/eiffel/.openapi-generator-ignore delete mode 100644 samples/client/petstore/elixir/.openapi-generator-ignore rename samples/client/petstore/{dart/flutter_petstore/swagger/docs/Tag.md => go/go-petstore/docs/ModelApiResponse.md} (57%) rename samples/client/petstore/{dart/flutter_petstore/swagger/docs/Category.md => go/go-petstore/docs/ModelReturn.md} (57%) rename samples/client/petstore/{dart/flutter_petstore/swagger/docs/ApiResponse.md => go/go-petstore/docs/OuterBoolean.md} (50%) create mode 100644 samples/client/petstore/go/go-petstore/docs/OuterNumber.md create mode 100644 samples/client/petstore/go/go-petstore/docs/OuterString.md create mode 100644 samples/client/petstore/go/go-petstore/model_outer_boolean.go create mode 100644 samples/client/petstore/go/go-petstore/model_outer_number.go create mode 100644 samples/client/petstore/go/go-petstore/model_outer_string.go delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist delete mode 100755 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig delete mode 100755 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig delete mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig delete mode 100644 samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock delete mode 100644 samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock delete mode 100644 samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift delete mode 100644 samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift delete mode 100644 samples/server/petstore-security-test/slim/composer.lock delete mode 100644 samples/server/petstore/java-msf4j/.openapi-generator-ignore delete mode 100644 samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/java-pkmst/.openapi-generator-ignore rename samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/{OpenAPIDocumentationConfig.java => SwaggerDocumentationConfig.java} (98%) delete mode 100644 samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs delete mode 100644 samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config delete mode 100644 samples/server/petstore/nancyfx/Org.OpenAPITools.sln delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs delete mode 100644 samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config delete mode 100644 samples/server/petstore/php-slim/composer.lock delete mode 100644 samples/server/petstore/rails5/vendor/.keep diff --git a/samples/client/petstore-security-test/go/.openapi-generator/VERSION b/samples/client/petstore-security-test/go/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore-security-test/go/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/go/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/go/api/openapi.yaml b/samples/client/petstore-security-test/go/api/openapi.yaml index 9c73a1f81f20..8ed2aa894f41 100644 --- a/samples/client/petstore-security-test/go/api/openapi.yaml +++ b/samples/client/petstore-security-test/go/api/openapi.yaml @@ -1,15 +1,15 @@ openapi: 3.0.1 info: - contact: - email: something@something.abc */ ' " =end -- \r\n \n \r + title: OpenAPI Petstore */ ' " =end -- \r\n \n \r description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ \ \" \\ */ ' \" =end -- \r\n \n \r" + termsOfService: http://url.to/terms/ */ ' " =end -- \r\n \n \r + contact: + email: something@something.abc */ ' " =end -- \r\n \n \r license: name: Apache-2.0 */ ' " =end -- \r\n \n \r url: http://www.apache.org/licenses/LICENSE-2.0.html */ ' " =end -- \r\n \n \r - termsOfService: http://url.to/terms/ */ ' " =end -- \r\n \n \r - title: OpenAPI Petstore */ ' " =end -- \r\n \n \r version: 1.0.0 */ ' " =end -- \r\n \n \r externalDocs: description: Find out more about OpenAPI */ ' " =end -- \r\n \n \r @@ -17,14 +17,17 @@ externalDocs: servers: - url: petstore.swagger.io */ ' " =end -- \r\n \n \r/v2 */ ' " =end -- \r\n \n \r tags: -- description: Everything about your Pets */ ' " =end -- \r\n \n \r +- name: fake + description: Everything about your Pets */ ' " =end -- \r\n \n \r externalDocs: description: Find out more */ ' " =end -- \r\n \n \r url: https://openapis.org - name: fake paths: /fake: put: + tags: + - fake + summary: To test code injection */ ' " =end -- \r\n \n \r operationId: testCodeInject */ ' " =end -- \r\n \n \r requestBody: content: @@ -32,43 +35,40 @@ paths: schema: properties: test code inject */ ' " =end -- \r\n \n \r: - description: To test code injection */ ' " =end -- \r\n \n \r type: string + description: To test code injection */ ' " =end -- \r\n \n \r ? "*/ ' \" =end -- \r\n \n \r" : schema: properties: test code inject */ ' " =end -- \r\n \n \r: - description: To test code injection */ ' " =end -- \r\n \n \r type: string + description: To test code injection */ ' " =end -- \r\n \n \r responses: 400: - content: {} description: To test code injection */ ' " =end -- \r\n \n \r - summary: To test code injection */ ' " =end -- \r\n \n \r - tags: - - fake + content: {} components: schemas: Return: - description: Model for testing reserved words */ ' " =end -- \r\n \n \r + type: object properties: return: + type: integer description: property description */ ' " =end -- \r\n \n \r format: int32 - type: integer - type: object + description: Model for testing reserved words */ ' " =end -- \r\n \n \r xml: name: Return securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account */ ' " =end -- \r\n \n \r read:pets: read your pets */ ' " =end -- \r\n \n \r - type: oauth2 api_key: - in: header - name: api_key */ ' " =end -- \r\n \n \r type: apiKey + name: api_key */ ' " =end -- \r\n \n \r + in: header diff --git a/samples/client/petstore-security-test/go/api_fake.go b/samples/client/petstore-security-test/go/api_fake.go index 1af654fbfec5..c0668d851ef2 100644 --- a/samples/client/petstore-security-test/go/api_fake.go +++ b/samples/client/petstore-security-test/go/api_fake.go @@ -29,7 +29,7 @@ type FakeApiService service FakeApiService To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *TestCodeInjectEndRnNROpts - Optional Parameters: - * @param "UNKNOWNBASETYPE" (optional.Interface of map[string]interface{}) - + * @param "UNKNOWNBASETYPE" (optional.Interface of interface{}) - */ type TestCodeInjectEndRnNROpts struct { @@ -70,9 +70,9 @@ func (a *FakeApiService) TestCodeInjectEndRnNR(ctx context.Context, localVarOpti } // body params if localVarOptionals != nil && localVarOptionals.UNKNOWNBASETYPE.IsSet() { - localVarOptionalUNKNOWNBASETYPE, localVarOptionalUNKNOWNBASETYPEok := localVarOptionals.UNKNOWNBASETYPE.Value().(map[string]interface{}) + localVarOptionalUNKNOWNBASETYPE, localVarOptionalUNKNOWNBASETYPEok := localVarOptionals.UNKNOWNBASETYPE.Value().(interface{}) if !localVarOptionalUNKNOWNBASETYPEok { - return nil, reportError("uNKNOWNBASETYPE should be map[string]interface{}") + return nil, reportError("uNKNOWNBASETYPE should be interface{}") } localVarPostBody = &localVarOptionalUNKNOWNBASETYPE } diff --git a/samples/client/petstore-security-test/go/configuration.go b/samples/client/petstore-security-test/go/configuration.go index 5b45d9faece6..659bb16f14f5 100644 --- a/samples/client/petstore-security-test/go/configuration.go +++ b/samples/client/petstore-security-test/go/configuration.go @@ -25,7 +25,7 @@ func (c contextKey) String() string { } var ( - // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. diff --git a/samples/client/petstore-security-test/go/docs/FakeApi.md b/samples/client/petstore-security-test/go/docs/FakeApi.md index 71c9f77d59e0..c556953bdd72 100644 --- a/samples/client/petstore-security-test/go/docs/FakeApi.md +++ b/samples/client/petstore-security-test/go/docs/FakeApi.md @@ -23,7 +23,7 @@ Optional parameters are passed through a pointer to a TestCodeInjectEndRnNROpts Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **uNKNOWNBASETYPE** | [**optional.Interface of map[string]interface{}**](UNKNOWN_BASE_TYPE.md)| | + **uNKNOWNBASETYPE** | [**optional.Interface of interface{}**](UNKNOWN_BASE_TYPE.md)| | ### Return type diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/.openapi-generator/VERSION b/samples/client/petstore/ada/.openapi-generator/VERSION index 82602aa4190d..855ff9501eb8 100644 --- a/samples/client/petstore/ada/.openapi-generator/VERSION +++ b/samples/client/petstore/ada/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index 4b144dfb1ad5..43fef8ce345d 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -1,11 +1,11 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- +-- Contact: apiteam@swagger.io -- --- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. --- https://openapi-generator.tech +-- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. +-- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually. with Swagger.Streams; package body Samples.Petstore.Clients is @@ -13,14 +13,15 @@ package body Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - Pet_Type : in Samples.Petstore.Models.Pet_Type) is + P_Body : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -33,7 +34,8 @@ package body Samples.Petstore.Clients is Api_Key : in Swagger.Nullable_UString) is URI : Swagger.Clients.URI_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/pet/{petId}"); URI.Set_Path_Param ("petId", Swagger.To_String (Pet_Id)); @@ -44,7 +46,7 @@ package body Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.UString_Vectors.Vector; + Status : in Swagger.Nullable_UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -62,7 +64,7 @@ package body Samples.Petstore.Clients is -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.UString_Vectors.Vector; + Tags : in Swagger.Nullable_UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; @@ -97,14 +99,15 @@ package body Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - Pet_Type : in Samples.Petstore.Models.Pet_Type) is + P_Body : in Samples.Petstore.Models.Pet_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON, Swagger.Clients.APPLICATION_XML)); - Samples.Petstore.Models.Serialize (Req.Stream, "", Pet_Type); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/pet"); Client.Call (Swagger.Clients.PUT, URI, Req); @@ -119,7 +122,8 @@ package body Samples.Petstore.Clients is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM)); Req.Stream.Write_Entity ("name", Name); Req.Stream.Write_Entity ("status", Status); @@ -158,7 +162,8 @@ package body Samples.Petstore.Clients is Order_Id : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/store/order/{orderId}"); URI.Set_Path_Param ("orderId", Order_Id); @@ -169,7 +174,7 @@ package body Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Integer_Map) is + Result : out Swagger.Nullable_Integer_Map) is URI : Swagger.Clients.URI_Type; Reply : Swagger.Value_Type; begin @@ -201,7 +206,7 @@ package body Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - Order_Type : in Samples.Petstore.Models.Order_Type; + P_Body : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; @@ -210,7 +215,7 @@ package body Samples.Petstore.Clients is Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", Order_Type); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/store/order"); Client.Call (Swagger.Clients.POST, URI, Req, Reply); @@ -221,13 +226,14 @@ package body Samples.Petstore.Clients is -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - User_Type : in Samples.Petstore.Models.User_Type) is + P_Body : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/user"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -236,13 +242,14 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", User); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/user/createWithArray"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -251,13 +258,14 @@ package body Samples.Petstore.Clients is -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - User : in Samples.Petstore.Models.User_Type_Vectors.Vector) is + P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", User); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/user/createWithList"); Client.Call (Swagger.Clients.POST, URI, Req); @@ -270,7 +278,8 @@ package body Samples.Petstore.Clients is Username : in Swagger.UString) is URI : Swagger.Clients.URI_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); @@ -318,7 +327,8 @@ package body Samples.Petstore.Clients is (Client : in out Client_Type) is URI : Swagger.Clients.URI_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); URI.Set_Path ("/user/logout"); Client.Call (Swagger.Clients.GET, URI); @@ -329,13 +339,14 @@ package body Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - User_Type : in Samples.Petstore.Models.User_Type) is + P_Body : in Samples.Petstore.Models.User_Type) is URI : Swagger.Clients.URI_Type; Req : Swagger.Clients.Request_Type; begin - + Client.Set_Accept ((Swagger.Clients.APPLICATION_XML, + Swagger.Clients.APPLICATION_JSON)); Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_JSON)); - Samples.Petstore.Models.Serialize (Req.Stream, "", User_Type); + Samples.Petstore.Models.Serialize (Req.Stream, "", P_Body); URI.Set_Path ("/user/{username}"); URI.Set_Path_Param ("username", Username); diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index 3a3b6554b584..590245fe2a38 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -1,11 +1,11 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- +-- Contact: apiteam@swagger.io -- --- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. --- https://openapi-generator.tech +-- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. +-- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually. with Samples.Petstore.Models; with Swagger.Clients; @@ -16,7 +16,7 @@ package Samples.Petstore.Clients is -- Add a new pet to the store procedure Add_Pet (Client : in out Client_Type; - Pet_Type : in Samples.Petstore.Models.Pet_Type); + P_Body : in Samples.Petstore.Models.Pet_Type); -- Deletes a pet procedure Delete_Pet @@ -28,14 +28,14 @@ package Samples.Petstore.Clients is -- Multiple status values can be provided with comma separated strings procedure Find_Pets_By_Status (Client : in out Client_Type; - Status : in Swagger.UString_Vectors.Vector; + Status : in Swagger.Nullable_UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Finds Pets by tags -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. procedure Find_Pets_By_Tags (Client : in out Client_Type; - Tags : in Swagger.UString_Vectors.Vector; + Tags : in Swagger.Nullable_UString_Vectors.Vector; Result : out Samples.Petstore.Models.Pet_Type_Vectors.Vector); -- Find pet by ID @@ -48,7 +48,7 @@ package Samples.Petstore.Clients is -- Update an existing pet procedure Update_Pet (Client : in out Client_Type; - Pet_Type : in Samples.Petstore.Models.Pet_Type); + P_Body : in Samples.Petstore.Models.Pet_Type); -- Updates a pet in the store with form data procedure Update_Pet_With_Form @@ -75,7 +75,7 @@ package Samples.Petstore.Clients is -- Returns a map of status codes to quantities procedure Get_Inventory (Client : in out Client_Type; - Result : out Swagger.Integer_Map); + Result : out Swagger.Nullable_Integer_Map); -- Find purchase order by ID -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -87,24 +87,24 @@ package Samples.Petstore.Clients is -- Place an order for a pet procedure Place_Order (Client : in out Client_Type; - Order_Type : in Samples.Petstore.Models.Order_Type; + P_Body : in Samples.Petstore.Models.Order_Type; Result : out Samples.Petstore.Models.Order_Type); -- Create user -- This can only be done by the logged in user. procedure Create_User (Client : in out Client_Type; - User_Type : in Samples.Petstore.Models.User_Type); + P_Body : in Samples.Petstore.Models.User_Type); -- Creates list of users with given input array procedure Create_Users_With_Array_Input (Client : in out Client_Type; - User : in Samples.Petstore.Models.User_Type_Vectors.Vector); + P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Creates list of users with given input array procedure Create_Users_With_List_Input (Client : in out Client_Type; - User : in Samples.Petstore.Models.User_Type_Vectors.Vector); + P_Body : in Samples.Petstore.Models.User_Type_Vectors.Vector); -- Delete user -- This can only be done by the logged in user. @@ -134,6 +134,6 @@ package Samples.Petstore.Clients is procedure Update_User (Client : in out Client_Type; Username : in Swagger.UString; - User_Type : in Samples.Petstore.Models.User_Type); + P_Body : in Samples.Petstore.Models.User_Type); end Samples.Petstore.Clients; diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.adb b/samples/client/petstore/ada/src/model/samples-petstore-models.adb index ca10031271a4..9b310388c9dc 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.adb +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.adb @@ -1,11 +1,11 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- +-- Contact: apiteam@swagger.io -- --- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. --- https://openapi-generator.tech +-- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. +-- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually. package body Samples.Petstore.Models is diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.ads b/samples/client/petstore/ada/src/model/samples-petstore-models.ads index b5241050f734..625071b3ebf5 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.ads +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.ads @@ -1,11 +1,11 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- -- OpenAPI spec version: 1.0.0 --- +-- Contact: apiteam@swagger.io -- --- NOTE: This package is auto generated by the swagger code generator 3.0.3-SNAPSHOT. --- https://openapi-generator.tech +-- NOTE: This package is auto generated by the swagger code generator 2.4.0-SNAPSHOT. +-- https://github.com/swagger-api/swagger-codegen.git -- Do not edit the class manually. with Swagger.Streams; with Ada.Containers.Vectors; @@ -118,7 +118,7 @@ package Samples.Petstore.Models is Id : Swagger.Nullable_Long; Category : Samples.Petstore.Models.Category_Type; Name : Swagger.UString; - Photo_Urls : Swagger.UString_Vectors.Vector; + Photo_Urls : Swagger.Nullable_UString_Vectors.Vector; Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector; Status : Swagger.Nullable_UString; end record; diff --git a/samples/client/petstore/ada/src/samples-petstore.ads b/samples/client/petstore/ada/src/samples-petstore.ads index 3565c1a3f432..181946604706 100644 --- a/samples/client/petstore/ada/src/samples-petstore.ads +++ b/samples/client/petstore/ada/src/samples-petstore.ads @@ -1,9 +1,9 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with openapi-generator. You can modify it to implement +-- This file was generated with swagger-codegen. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .openapi-generator-ignore file: +-- to the .swagger-codegen-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/ada/src/samples.ads b/samples/client/petstore/ada/src/samples.ads index 1915df406b0a..ff6bb421800d 100644 --- a/samples/client/petstore/ada/src/samples.ads +++ b/samples/client/petstore/ada/src/samples.ads @@ -1,9 +1,9 @@ --- OpenAPI Petstore --- This is a sample server Petstore server. For this sample, you can use the api key `special_key` to test the authorization filters. +-- Swagger Petstore +-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters. -- ------------ EDIT NOTE ------------ --- This file was generated with openapi-generator. You can modify it to implement +-- This file was generated with swagger-codegen. You can modify it to implement -- the server. After you modify this file, you should add the following line --- to the .openapi-generator-ignore file: +-- to the .swagger-codegen-ignore file: -- -- src/samples-petstore.ads -- diff --git a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/android/httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/android/httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md index 0ec2f2870d97..adadfaab9b72 100644 --- a/samples/client/petstore/android/httpclient/docs/PetApi.md +++ b/samples/client/petstore/android/httpclient/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = null; // String | Updated name of the pet -String status = null; // String | Updated status of the pet +String name = "null"; // String | Updated name of the pet +String status = "null"; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = null; // String | Additional data to pass to server -File file = null; // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +File file = new File("null"); // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/android/volley/.openapi-generator/VERSION b/samples/client/petstore/android/volley/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/android/volley/.openapi-generator/VERSION +++ b/samples/client/petstore/android/volley/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md index 0ec2f2870d97..adadfaab9b72 100644 --- a/samples/client/petstore/android/volley/docs/PetApi.md +++ b/samples/client/petstore/android/volley/docs/PetApi.md @@ -278,8 +278,8 @@ Updates a pet in the store with form data PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet that needs to be updated -String name = null; // String | Updated name of the pet -String status = null; // String | Updated status of the pet +String name = "null"; // String | Updated name of the pet +String status = "null"; // String | Updated status of the pet try { apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { @@ -322,8 +322,8 @@ uploads an image PetApi apiInstance = new PetApi(); Long petId = 56L; // Long | ID of pet to update -String additionalMetadata = null; // String | Additional data to pass to server -File file = null; // File | file to upload +String additionalMetadata = "null"; // String | Additional data to pass to server +File file = new File("null"); // File | file to upload try { ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); System.out.println(result); diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index 20abbf5d57ce..a543b69de1be 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -117,7 +117,6 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index f5b919cb6b73..3141c8ccd878 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -315,8 +315,7 @@ case $state in "getPetById[Find pet by ID]" \ "updatePet[Update an existing pet]" \ "updatePetWithForm[Updates a pet in the store with form data]" \ - "uploadFile[uploads an image]" \ - "uploadFileWithRequiredFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ + "uploadFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \ "getInventory[Returns pet inventories by status]" \ "getOrderById[Find purchase order by ID]" \ "placeOrder[Place an order for a pet]" "createUser[Create user]" \ @@ -467,13 +466,6 @@ case $state in ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; - uploadFileWithRequiredFile) - local -a _op_arguments - _op_arguments=( - "petId=:[PATH] ID of pet to update" - ) - _describe -t actions 'operations' _op_arguments -S '' && ret=0 - ;; deleteOrder) local -a _op_arguments _op_arguments=( diff --git a/samples/client/petstore/bash/docs/FakeApi.md b/samples/client/petstore/bash/docs/FakeApi.md index bb3ef255e69e..458397e67277 100644 --- a/samples/client/petstore/bash/docs/FakeApi.md +++ b/samples/client/petstore/bash/docs/FakeApi.md @@ -282,7 +282,7 @@ Name | Type | Description | Notes **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional] **enumQueryDouble** | **float** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**array[string]**](string.md) | Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **array[string]** | Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/bash/docs/PetApi.md b/samples/client/petstore/bash/docs/PetApi.md index 394b31609f8e..d9728a14ac7f 100644 --- a/samples/client/petstore/bash/docs/PetApi.md +++ b/samples/client/petstore/bash/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image ## **addPet** @@ -266,35 +265,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## **uploadFileWithRequiredFile** - -uploads an image - -### Example -```bash -petstore-cli uploadFileWithRequiredFile petId=value -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **integer** | ID of pet to update | - **file** | **binary** | file to upload | [default to null] - **additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 9cb196a2df1b..b74ebf8b2040 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -142,9 +142,6 @@ operation_parameters_minimum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_minimum_occurrences["uploadFile:::petId"]=1 operation_parameters_minimum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["uploadFile:::file"]=0 -operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::petId"]=1 -operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::file"]=1 -operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_minimum_occurrences["deleteOrder:::order_id"]=1 operation_parameters_minimum_occurrences["getOrderById:::order_id"]=1 operation_parameters_minimum_occurrences["placeOrder:::Order"]=1 @@ -212,9 +209,6 @@ operation_parameters_maximum_occurrences["updatePetWithForm:::status"]=0 operation_parameters_maximum_occurrences["uploadFile:::petId"]=0 operation_parameters_maximum_occurrences["uploadFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["uploadFile:::file"]=0 -operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::petId"]=0 -operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::file"]=0 -operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0 operation_parameters_maximum_occurrences["deleteOrder:::order_id"]=0 operation_parameters_maximum_occurrences["getOrderById:::order_id"]=0 operation_parameters_maximum_occurrences["placeOrder:::Order"]=0 @@ -279,9 +273,6 @@ operation_parameters_collection_type["updatePetWithForm:::status"]="" operation_parameters_collection_type["uploadFile:::petId"]="" operation_parameters_collection_type["uploadFile:::additionalMetadata"]="" operation_parameters_collection_type["uploadFile:::file"]="" -operation_parameters_collection_type["uploadFileWithRequiredFile:::petId"]="" -operation_parameters_collection_type["uploadFileWithRequiredFile:::file"]="" -operation_parameters_collection_type["uploadFileWithRequiredFile:::additionalMetadata"]="" operation_parameters_collection_type["deleteOrder:::order_id"]="" operation_parameters_collection_type["getOrderById:::order_id"]="" operation_parameters_collection_type["placeOrder:::Order"]="" @@ -734,7 +725,6 @@ read -r -d '' ops < - 4.0.0 - org.openapitools - openapi-petstore-clojure - pom - 1.0-SNAPSHOT - OpenAPI Clogure Petstore Client - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - lein-test - integration-test - - exec - - - lein - - test - - - - - - - - diff --git a/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj b/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj index 6939bf658218..b0faed710bf3 100644 --- a/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj +++ b/samples/client/petstore/clojure/src/open_api_petstore/api/pet.clj @@ -50,7 +50,7 @@ (call-api "/pet/findByStatus" :get {:path-params {} :header-params {} - :query-params {"status" (with-collection-format status :multi) } + :query-params {"status" (with-collection-format status :csv) } :form-params {} :content-types [] :accepts ["application/json" "application/xml"] @@ -71,7 +71,7 @@ (call-api "/pet/findByTags" :get {:path-params {} :header-params {} - :query-params {"tags" (with-collection-format tags :multi) } + :query-params {"tags" (with-collection-format tags :csv) } :form-params {} :content-types [] :accepts ["application/json" "application/xml"] diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt5/client/OAIPet.h b/samples/client/petstore/cpp-qt5/client/OAIPet.h index a886054a07e1..9e69b6b637f1 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPet.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPet.h @@ -22,8 +22,8 @@ #include -#include "OAIOAICategory.h" -#include "OAIOAITag.h" +#include "OAICategory.h" +#include "OAITag.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h index 6587df873f55..497e4ad01132 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIPetApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIPetApi.h @@ -15,9 +15,9 @@ #include "OAIHttpRequest.h" -#include "OAIOAIApiResponse.h" +#include "OAIApiResponse.h" #include "OAIHttpRequest.h" -#include "OAIOAIPet.h" +#include "OAIPet.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h index f05dacfb65de..7f08be814d64 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIStoreApi.h @@ -15,7 +15,7 @@ #include "OAIHttpRequest.h" -#include "OAIOAIOrder.h" +#include "OAIOrder.h" #include #include diff --git a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h index 7449b2a9a037..137b964bde90 100644 --- a/samples/client/petstore/cpp-qt5/client/OAIUserApi.h +++ b/samples/client/petstore/cpp-qt5/client/OAIUserApi.h @@ -15,7 +15,7 @@ #include "OAIHttpRequest.h" -#include "OAIOAIUser.h" +#include "OAIUser.h" #include #include diff --git a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/ApiClient.cpp index 88f040adf684..448f377926ee 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiClient.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/ApiClient.h index 3c352661539f..355a119f395e 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/ApiClient.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp index 3f953d78d05f..2d5d39513ec9 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h index ba8dd3850684..c39b29fc61f1 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/ApiException.cpp index e39f83f2c802..bb41df86f97c 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiException.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/ApiException.h index 60f6e9c8b36c..6073db8d1ec2 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/ApiException.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/HttpContent.cpp index 4589104af115..8922e724304d 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/HttpContent.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/HttpContent.h index f2db9d04dedd..71b055aaadcc 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/HttpContent.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/IHttpBody.h index 822d16bb1aba..88ce14a536da 100644 --- a/samples/client/petstore/cpp-restsdk/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/IHttpBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/JsonBody.cpp index fbc8b8138181..e3fbd7b340bd 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/JsonBody.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/JsonBody.h index d44384dfb02b..5ec9da11d709 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/JsonBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/ModelBase.cpp index 92de3ce620e2..d13dc7ac9806 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/ModelBase.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/ModelBase.h index 2ea95cd79cf1..6b9818617bcb 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/ModelBase.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp index d4a29f65a08e..fb9b11dfee1b 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/MultipartFormData.h index 293b8f62a491..166ada330cae 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -12,7 +12,7 @@ /* * MultipartFormData.h * - * This class represents a container for building application/x-multipart-formdata requests. + * This class represents a container for building a application/x-multipart-formdata requests. */ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/Object.cpp index 1eee384f1bf6..326ada285e9b 100644 --- a/samples/client/petstore/cpp-restsdk/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/Object.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/Object.h index c94ce994009e..ec9505e194b8 100644 --- a/samples/client/petstore/cpp-restsdk/Object.h +++ b/samples/client/petstore/cpp-restsdk/Object.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp index 27d03a537a34..69b595fc629a 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h index b2bf01999d3b..01cc1f218bc5 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp index a23b28e8bd12..188730555804 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h index 0e9b43ec71a5..303345a8d7c2 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp index 3f7a303fc4a9..9c319adf0230 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h index 27cff8aaba8c..2b198b383a88 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp index 0af7d2b86672..1d8ebbac8b7a 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h index 01b0ea8cd481..0514fcd38c9c 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/model/Category.cpp index 5a6e351cb0cf..60f92843df05 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Category.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/model/Category.h index 794770a08865..f77cf6c508bd 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/model/Category.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/model/Order.cpp index 54f66812cc8b..f23fd13926c0 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Order.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/model/Order.h index 85bb14ac3dea..43893a44fa40 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/model/Order.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/model/Pet.cpp index 653b40a9736c..3c477013b10a 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Pet.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/model/Pet.h index e1aad1c71020..d83922397660 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/model/Pet.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/model/Tag.cpp index 9871c81241bf..584a4b24cf56 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Tag.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/model/Tag.h index 0f5cfa3acb08..663fe05cfcc8 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/model/Tag.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/model/User.cpp index 7966daa7f0a4..a06e9f5aa4bb 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/model/User.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/model/User.h index 0dffafc8406e..0e5f4dc08447 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.h +++ b/samples/client/petstore/cpp-restsdk/model/User.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION b/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tizen/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-tizen/doc/Doxyfile b/samples/client/petstore/cpp-tizen/doc/Doxyfile index 9a0ba8f71860..bbb92191a0a5 100644 --- a/samples/client/petstore/cpp-tizen/doc/Doxyfile +++ b/samples/client/petstore/cpp-tizen/doc/Doxyfile @@ -46,7 +46,7 @@ PROJECT_NUMBER = 1.0.0 PROJECT_BRIEF = "An SDK for creating client applications for OpenAPI Petstore on Tizen Platform (http://tizen.org/)" -# With the PROJECT_LOGO tag one can specify a logo or icon that is included in +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in # the documentation. The maximum height of the logo should not exceed 55 pixels # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index a5ae4a502c79..441abc408817 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 48ec5e0f7c18..e510bba3f599 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -72,8 +72,7 @@ OpenAPI spec version: 1.0.0 - + @@ -85,5 +84,8 @@ OpenAPI spec version: 1.0.0 Org.OpenAPITools + + + diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 041d0037c79d..9bfb712fd455 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -407,31 +382,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1750,170 +1700,5 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index a5ae4a502c79..441abc408817 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs index 060b2eb90495..c6db8f4b909f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -932,87 +907,5 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index a5ae4a502c79..441abc408817 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs index f020476ca4b0..c7aa7e2f6554 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations } @@ -932,87 +907,5 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string ad (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md index 3d6b5f551836..2676c56acc9e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md @@ -94,7 +94,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs index 3b7f149ff3f8..f34cfb4d6a36 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -407,31 +382,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1750,170 +1700,5 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index 3d6b5f551836..2676c56acc9e 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -94,7 +94,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs index 3b7f149ff3f8..f34cfb4d6a36 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -407,31 +382,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1750,170 +1700,5 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index a5ae4a502c79..441abc408817 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -116,7 +116,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index 14acd669304c..2a4fb6094ae0 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -495,7 +495,7 @@ namespace Example var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormStringArray = enumFormStringArray_example; // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) try @@ -522,7 +522,7 @@ Name | Type | Description | Notes **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $] **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md index 1ad695d7c8d3..244ece53a318 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -525,69 +524,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - -uploads an image - -### Example -```csharp -using System; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, file, additionalMetadata); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | - **file** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs index 041d0037c79d..9bfb712fd455 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs @@ -202,31 +202,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -407,31 +382,6 @@ public interface IPetApi : IApiAccessor /// file to upload (optional) /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -1750,170 +1700,5 @@ public async System.Threading.Tasks.Task> UploadFileAsy (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); } - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, file, additionalMetadata); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream file, string additionalMetadata = null) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'file' is set - if (file == null) - throw new ApiException(400, "Missing required parameter 'file' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - } } diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options b/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options deleted file mode 100644 index 518eb901a6ff..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/.analysis_options +++ /dev/null @@ -1,2 +0,0 @@ -analyzer: - strong-mode: true \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore b/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore deleted file mode 100644 index 7c2804416498..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# See https://www.dartlang.org/tools/private-files.html - -# Files and directories created by pub -.buildlog -.packages -.project -.pub/ -build/ -**/packages/ - -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc -doc/api/ - -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION b/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION deleted file mode 100644 index 82602aa4190d..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/README.md b/samples/client/petstore/dart/flutter_petstore/swagger/README.md deleted file mode 100644 index 5f3fe0547842..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# openapi -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 1.20.0 or later OR Flutter 0.0.20 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, please include the following in pubspec.yaml -``` -name: openapi -version: 1.0.0 -description: OpenAPI API client -dependencies: - openapi: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git - version: 'any' -``` - -### Local -To use the package in your local drive, please include the following in pubspec.yaml -``` -dependencies: - openapi: - path: /path/to/openapi -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:openapi/api.dart'; - -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - api_instance.addPet(pet); -} catch (e) { - print("Exception when calling PetApi->addPet: $e\n"); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [ApiResponse](docs//ApiResponse.md) - - [Category](docs//Category.md) - - [Order](docs//Order.md) - - [Pet](docs//Pet.md) - - [Tag](docs//Tag.md) - - [User](docs//User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md deleted file mode 100644 index 310ce6c65be3..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Order.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Order - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] [default to null] -**petId** | **int** | | [optional] [default to null] -**quantity** | **int** | | [optional] [default to null] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] -**status** | **String** | Order Status | [optional] [default to null] -**complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md deleted file mode 100644 index 191e1fc66a95..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Pet.md +++ /dev/null @@ -1,20 +0,0 @@ -# openapi.model.Pet - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] [default to null] -**category** | [**Category**](Category.md) | | [optional] [default to null] -**name** | **String** | | [default to null] -**photoUrls** | **List<String>** | | [default to []] -**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to []] -**status** | **String** | pet status in the store | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md deleted file mode 100644 index 6fa9abf67ae1..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/PetApi.md +++ /dev/null @@ -1,379 +0,0 @@ -# openapi.api.PetApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image - - -# **addPet** -> addPet(pet) - -Add a new pet to the store - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - api_instance.addPet(pet); -} catch (e) { - print("Exception when calling PetApi->addPet: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deletePet** -> deletePet(petId, apiKey) - -Deletes a pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var petId = 789; // int | Pet id to delete -var apiKey = apiKey_example; // String | - -try { - api_instance.deletePet(petId, apiKey); -} catch (e) { - print("Exception when calling PetApi->deletePet: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | - **apiKey** | **String**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **findPetsByStatus** -> List findPetsByStatus(status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var status = []; // List | Status values that need to be considered for filter - -try { - var result = api_instance.findPetsByStatus(status); - print(result); -} catch (e) { - print("Exception when calling PetApi->findPetsByStatus: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | - -### Return type - -[**List**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **findPetsByTags** -> List findPetsByTags(tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var tags = []; // List | Tags to filter by - -try { - var result = api_instance.findPetsByTags(tags); - print(result); -} catch (e) { - print("Exception when calling PetApi->findPetsByTags: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<String>**](String.md)| Tags to filter by | - -### Return type - -[**List**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getPetById** -> Pet getPetById(petId) - -Find pet by ID - -Returns a single pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key -//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; - -var api_instance = new PetApi(); -var petId = 789; // int | ID of pet to return - -try { - var result = api_instance.getPetById(petId); - print(result); -} catch (e) { - print("Exception when calling PetApi->getPetById: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updatePet** -> updatePet(pet) - -Update an existing pet - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var pet = new Pet(); // Pet | Pet object that needs to be added to the store - -try { - api_instance.updatePet(pet); -} catch (e) { - print("Exception when calling PetApi->updatePet: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/json, application/xml - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updatePetWithForm** -> updatePetWithForm(petId, name, status) - -Updates a pet in the store with form data - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var petId = 789; // int | ID of pet that needs to be updated -var name = name_example; // String | Updated name of the pet -var status = status_example; // String | Updated status of the pet - -try { - api_instance.updatePetWithForm(petId, name, status); -} catch (e) { - print("Exception when calling PetApi->updatePetWithForm: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | - **name** | **String**| Updated name of the pet | [optional] [default to null] - **status** | **String**| Updated status of the pet | [optional] [default to null] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) - -uploads an image - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure OAuth2 access token for authorization: petstore_auth -//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PetApi(); -var petId = 789; // int | ID of pet to update -var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -var file = BINARY_DATA_HERE; // MultipartFile | file to upload - -try { - var result = api_instance.uploadFile(petId, additionalMetadata, file); - print(result); -} catch (e) { - print("Exception when calling PetApi->uploadFile: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] - **file** | **MultipartFile**| file to upload | [optional] [default to null] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md deleted file mode 100644 index cc0c2ac2d35e..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/StoreApi.md +++ /dev/null @@ -1,186 +0,0 @@ -# openapi.api.StoreApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID -[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -> deleteOrder(orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new StoreApi(); -var orderId = orderId_example; // String | ID of the order that needs to be deleted - -try { - api_instance.deleteOrder(orderId); -} catch (e) { - print("Exception when calling StoreApi->deleteOrder: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getInventory** -> Map getInventory() - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```dart -import 'package:openapi/api.dart'; -// TODO Configure API key authorization: api_key -//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; - -var api_instance = new StoreApi(); - -try { - var result = api_instance.getInventory(); - print(result); -} catch (e) { - print("Exception when calling StoreApi->getInventory: $e\n"); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Map** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getOrderById** -> Order getOrderById(orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new StoreApi(); -var orderId = 789; // int | ID of pet that needs to be fetched - -try { - var result = api_instance.getOrderById(orderId); - print(result); -} catch (e) { - print("Exception when calling StoreApi->getOrderById: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **int**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **placeOrder** -> Order placeOrder(order) - -Place an order for a pet - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new StoreApi(); -var order = new Order(); // Order | order placed for purchasing the pet - -try { - var result = api_instance.placeOrder(order); - print(result); -} catch (e) { - print("Exception when calling StoreApi->placeOrder: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md deleted file mode 100644 index 3761b70cf0b7..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/User.md +++ /dev/null @@ -1,22 +0,0 @@ -# openapi.model.User - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] [default to null] -**username** | **String** | | [optional] [default to null] -**firstName** | **String** | | [optional] [default to null] -**lastName** | **String** | | [optional] [default to null] -**email** | **String** | | [optional] [default to null] -**password** | **String** | | [optional] [default to null] -**phone** | **String** | | [optional] [default to null] -**userStatus** | **int** | User Status | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md b/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md deleted file mode 100644 index 0dec271be5c6..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/UserApi.md +++ /dev/null @@ -1,349 +0,0 @@ -# openapi.api.UserApi - -## Load the API package -```dart -import 'package:openapi/api.dart'; -``` - -All URIs are relative to *http://petstore.swagger.io/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserApi.md#createUser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user - - -# **createUser** -> createUser(user) - -Create user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = new User(); // User | Created user object - -try { - api_instance.createUser(user); -} catch (e) { - print("Exception when calling UserApi->createUser: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **createUsersWithArrayInput** -> createUsersWithArrayInput(user) - -Creates list of users with given input array - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = [new List<User>()]; // List | List of user object - -try { - api_instance.createUsersWithArrayInput(user); -} catch (e) { - print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](List.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **createUsersWithListInput** -> createUsersWithListInput(user) - -Creates list of users with given input array - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var user = [new List<User>()]; // List | List of user object - -try { - api_instance.createUsersWithListInput(user); -} catch (e) { - print("Exception when calling UserApi->createUsersWithListInput: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](List.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deleteUser** -> deleteUser(username) - -Delete user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var username = username_example; // String | The name that needs to be deleted - -try { - api_instance.deleteUser(username); -} catch (e) { - print("Exception when calling UserApi->deleteUser: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **getUserByName** -> User getUserByName(username) - -Get user by user name - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. - -try { - var result = api_instance.getUserByName(username); - print(result); -} catch (e) { - print("Exception when calling UserApi->getUserByName: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **loginUser** -> String loginUser(username, password) - -Logs user into the system - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var username = username_example; // String | The user name for login -var password = password_example; // String | The password for login in clear text - -try { - var result = api_instance.loginUser(username, password); - print(result); -} catch (e) { - print("Exception when calling UserApi->loginUser: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| The user name for login | - **password** | **String**| The password for login in clear text | - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/xml, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **logoutUser** -> logoutUser() - -Logs out current logged in user session - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); - -try { - api_instance.logoutUser(); -} catch (e) { - print("Exception when calling UserApi->logoutUser: $e\n"); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **updateUser** -> updateUser(username, user) - -Updated user - -This can only be done by the logged in user. - -### Example -```dart -import 'package:openapi/api.dart'; - -var api_instance = new UserApi(); -var username = username_example; // String | name that need to be deleted -var user = new User(); // User | Updated user object - -try { - api_instance.updateUser(username, user); -} catch (e) { - print("Exception when calling UserApi->updateUser: $e\n"); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh b/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh deleted file mode 100644 index 8442b80bb445..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart deleted file mode 100644 index 9a64a5342b4a..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api.dart +++ /dev/null @@ -1,27 +0,0 @@ -library openapi.api; - -import 'dart:async'; -import 'dart:convert'; -import 'package:http/http.dart'; - -part 'api_client.dart'; -part 'api_helper.dart'; -part 'api_exception.dart'; -part 'auth/authentication.dart'; -part 'auth/api_key_auth.dart'; -part 'auth/oauth.dart'; -part 'auth/http_basic_auth.dart'; - -part 'api/pet_api.dart'; -part 'api/store_api.dart'; -part 'api/user_api.dart'; - -part 'model/api_response.dart'; -part 'model/category.dart'; -part 'model/order.dart'; -part 'model/pet.dart'; -part 'model/tag.dart'; -part 'model/user.dart'; - - -ApiClient defaultApiClient = new ApiClient(); diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart deleted file mode 100644 index 4134e018386d..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/pet_api.dart +++ /dev/null @@ -1,432 +0,0 @@ -part of openapi.api; - - - -class PetApi { - final ApiClient apiClient; - - PetApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - /// Add a new pet to the store - /// - /// - Future addPet(Pet pet) async { - Object postBody = pet; - - // verify required params are set - if(pet == null) { - throw new ApiException(400, "Missing required param: pet"); - } - - // create path and map variables - String path = "/pet".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = ["application/json","application/xml"]; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Deletes a pet - /// - /// - Future deletePet(int petId, { String apiKey }) async { - Object postBody = null; - - // verify required params are set - if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); - } - - // create path and map variables - String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - headerParams["api_key"] = apiKey; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Finds Pets by status - /// - /// Multiple status values can be provided with comma separated strings - Future> findPetsByStatus(List status) async { - Object postBody = null; - - // verify required params are set - if(status == null) { - throw new ApiException(400, "Missing required param: status"); - } - - // create path and map variables - String path = "/pet/findByStatus".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat("csv", "status", status)); - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); - } else { - return null; - } - } - /// Finds Pets by tags - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future> findPetsByTags(List tags) async { - Object postBody = null; - - // verify required params are set - if(tags == null) { - throw new ApiException(400, "Missing required param: tags"); - } - - // create path and map variables - String path = "/pet/findByTags".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat("csv", "tags", tags)); - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return (apiClient.deserialize(response.body, 'List') as List).map((item) => item as Pet).toList(); - } else { - return null; - } - } - /// Find pet by ID - /// - /// Returns a single pet - Future getPetById(int petId) async { - Object postBody = null; - - // verify required params are set - if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); - } - - // create path and map variables - String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["api_key"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'Pet') as Pet; - } else { - return null; - } - } - /// Update an existing pet - /// - /// - Future updatePet(Pet pet) async { - Object postBody = pet; - - // verify required params are set - if(pet == null) { - throw new ApiException(400, "Missing required param: pet"); - } - - // create path and map variables - String path = "/pet".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = ["application/json","application/xml"]; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Updates a pet in the store with form data - /// - /// - Future updatePetWithForm(int petId, { String name, String status }) async { - Object postBody = null; - - // verify required params are set - if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); - } - - // create path and map variables - String path = "/pet/{petId}".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = ["application/x-www-form-urlencoded"]; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if (name != null) { - hasFields = true; - mp.fields['name'] = parameterToString(name); - } - if (status != null) { - hasFields = true; - mp.fields['status'] = parameterToString(status); - } - if(hasFields) - postBody = mp; - } - else { - if (name != null) - formParams['name'] = parameterToString(name); - if (status != null) - formParams['status'] = parameterToString(status); - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// uploads an image - /// - /// - Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { - Object postBody = null; - - // verify required params are set - if(petId == null) { - throw new ApiException(400, "Missing required param: petId"); - } - - // create path and map variables - String path = "/pet/{petId}/uploadImage".replaceAll("{format}","json").replaceAll("{" + "petId" + "}", petId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = ["multipart/form-data"]; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["petstore_auth"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if (additionalMetadata != null) { - hasFields = true; - mp.fields['additionalMetadata'] = parameterToString(additionalMetadata); - } - if (file != null) { - hasFields = true; - mp.fields['file'] = file.field; - mp.files.add(file); - } - if(hasFields) - postBody = mp; - } - else { - if (additionalMetadata != null) - formParams['additionalMetadata'] = parameterToString(additionalMetadata); - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'ApiResponse') as ApiResponse; - } else { - return null; - } - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart deleted file mode 100644 index f2a48f2d4dae..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/store_api.dart +++ /dev/null @@ -1,207 +0,0 @@ -part of openapi.api; - - - -class StoreApi { - final ApiClient apiClient; - - StoreApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - /// Delete purchase order by ID - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - Future deleteOrder(String orderId) async { - Object postBody = null; - - // verify required params are set - if(orderId == null) { - throw new ApiException(400, "Missing required param: orderId"); - } - - // create path and map variables - String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Returns pet inventories by status - /// - /// Returns a map of status codes to quantities - Future> getInventory() async { - Object postBody = null; - - // verify required params are set - - // create path and map variables - String path = "/store/inventory".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = ["api_key"]; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return new Map.from(apiClient.deserialize(response.body, 'Map')); - ; - } else { - return null; - } - } - /// Find purchase order by ID - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future getOrderById(int orderId) async { - Object postBody = null; - - // verify required params are set - if(orderId == null) { - throw new ApiException(400, "Missing required param: orderId"); - } - - // create path and map variables - String path = "/store/order/{orderId}".replaceAll("{format}","json").replaceAll("{" + "orderId" + "}", orderId.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'Order') as Order; - } else { - return null; - } - } - /// Place an order for a pet - /// - /// - Future placeOrder(Order order) async { - Object postBody = order; - - // verify required params are set - if(order == null) { - throw new ApiException(400, "Missing required param: order"); - } - - // create path and map variables - String path = "/store/order".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'Order') as Order; - } else { - return null; - } - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart deleted file mode 100644 index cf8ef6bf8002..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api/user_api.dart +++ /dev/null @@ -1,409 +0,0 @@ -part of openapi.api; - - - -class UserApi { - final ApiClient apiClient; - - UserApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient; - - /// Create user - /// - /// This can only be done by the logged in user. - Future createUser(User user) async { - Object postBody = user; - - // verify required params are set - if(user == null) { - throw new ApiException(400, "Missing required param: user"); - } - - // create path and map variables - String path = "/user".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Creates list of users with given input array - /// - /// - Future createUsersWithArrayInput(List user) async { - Object postBody = user; - - // verify required params are set - if(user == null) { - throw new ApiException(400, "Missing required param: user"); - } - - // create path and map variables - String path = "/user/createWithArray".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Creates list of users with given input array - /// - /// - Future createUsersWithListInput(List user) async { - Object postBody = user; - - // verify required params are set - if(user == null) { - throw new ApiException(400, "Missing required param: user"); - } - - // create path and map variables - String path = "/user/createWithList".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Delete user - /// - /// This can only be done by the logged in user. - Future deleteUser(String username) async { - Object postBody = null; - - // verify required params are set - if(username == null) { - throw new ApiException(400, "Missing required param: username"); - } - - // create path and map variables - String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Get user by user name - /// - /// - Future getUserByName(String username) async { - Object postBody = null; - - // verify required params are set - if(username == null) { - throw new ApiException(400, "Missing required param: username"); - } - - // create path and map variables - String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'User') as User; - } else { - return null; - } - } - /// Logs user into the system - /// - /// - Future loginUser(String username, String password) async { - Object postBody = null; - - // verify required params are set - if(username == null) { - throw new ApiException(400, "Missing required param: username"); - } - if(password == null) { - throw new ApiException(400, "Missing required param: password"); - } - - // create path and map variables - String path = "/user/login".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - queryParams.addAll(_convertParametersForCollectionFormat("", "username", username)); - queryParams.addAll(_convertParametersForCollectionFormat("", "password", password)); - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - return apiClient.deserialize(response.body, 'String') as String; - } else { - return null; - } - } - /// Logs out current logged in user session - /// - /// - Future logoutUser() async { - Object postBody = null; - - // verify required params are set - - // create path and map variables - String path = "/user/logout".replaceAll("{format}","json"); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } - /// Updated user - /// - /// This can only be done by the logged in user. - Future updateUser(String username, User user) async { - Object postBody = user; - - // verify required params are set - if(username == null) { - throw new ApiException(400, "Missing required param: username"); - } - if(user == null) { - throw new ApiException(400, "Missing required param: user"); - } - - // create path and map variables - String path = "/user/{username}".replaceAll("{format}","json").replaceAll("{" + "username" + "}", username.toString()); - - // query params - List queryParams = []; - Map headerParams = {}; - Map formParams = {}; - - List contentTypes = []; - - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; - - if(contentType.startsWith("multipart/form-data")) { - bool hasFields = false; - MultipartRequest mp = new MultipartRequest(null, null); - if(hasFields) - postBody = mp; - } - else { - } - - var response = await apiClient.invokeAPI(path, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentType, - authNames); - - if(response.statusCode >= 400) { - throw new ApiException(response.statusCode, response.body); - } else if(response.body != null) { - } else { - return; - } - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart deleted file mode 100644 index db4116dd96dc..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_client.dart +++ /dev/null @@ -1,160 +0,0 @@ -part of openapi.api; - -class QueryParam { - String name; - String value; - - QueryParam(this.name, this.value); -} - -class ApiClient { - - String basePath; - var client = new Client(); - - Map _defaultHeaderMap = {}; - Map _authentications = {}; - - final _RegList = new RegExp(r'^List<(.*)>$'); - final _RegMap = new RegExp(r'^Map$'); - - ApiClient({this.basePath: "http://petstore.swagger.io/v2"}) { - // Setup authentications (key: authentication name, value: authentication). - _authentications['api_key'] = new ApiKeyAuth("header", "api_key"); - _authentications['petstore_auth'] = new OAuth(); - } - - void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; - } - - dynamic _deserialize(dynamic value, String targetType) { - try { - switch (targetType) { - case 'String': - return '$value'; - case 'int': - return value is int ? value : int.parse('$value'); - case 'bool': - return value is bool ? value : '$value'.toLowerCase() == 'true'; - case 'double': - return value is double ? value : double.parse('$value'); - case 'ApiResponse': - return new ApiResponse.fromJson(value); - case 'Category': - return new Category.fromJson(value); - case 'Order': - return new Order.fromJson(value); - case 'Pet': - return new Pet.fromJson(value); - case 'Tag': - return new Tag.fromJson(value); - case 'User': - return new User.fromJson(value); - default: - { - Match match; - if (value is List && - (match = _RegList.firstMatch(targetType)) != null) { - var newTargetType = match[1]; - return value.map((v) => _deserialize(v, newTargetType)).toList(); - } else if (value is Map && - (match = _RegMap.firstMatch(targetType)) != null) { - var newTargetType = match[1]; - return new Map.fromIterables(value.keys, - value.values.map((v) => _deserialize(v, newTargetType))); - } - } - } - } catch (e, stack) { - throw new ApiException.withInner(500, 'Exception during deserialization.', e, stack); - } - throw new ApiException(500, 'Could not find a suitable class for deserialization'); - } - - dynamic deserialize(String json, String targetType) { - // Remove all spaces. Necessary for reg expressions as well. - targetType = targetType.replaceAll(' ', ''); - - if (targetType == 'String') return json; - - var decodedJson = JSON.decode(json); - return _deserialize(decodedJson, targetType); - } - - String serialize(Object obj) { - String serialized = ''; - if (obj == null) { - serialized = ''; - } else { - serialized = JSON.encode(obj); - } - return serialized; - } - - // We don't use a Map for queryParams. - // If collectionFormat is 'multi' a key might appear multiple times. - Future invokeAPI(String path, - String method, - Iterable queryParams, - Object body, - Map headerParams, - Map formParams, - String contentType, - List authNames) async { - - _updateParamsForAuth(authNames, queryParams, headerParams); - - var ps = queryParams.where((p) => p.value != null).map((p) => '${p.name}=${p.value}'); - String queryString = ps.isNotEmpty ? - '?' + ps.join('&') : - ''; - - String url = basePath + path + queryString; - - headerParams.addAll(_defaultHeaderMap); - headerParams['Content-Type'] = contentType; - - if(body is MultipartRequest) { - var request = new MultipartRequest(method, Uri.parse(url)); - request.fields.addAll(body.fields); - request.files.addAll(body.files); - request.headers.addAll(body.headers); - request.headers.addAll(headerParams); - var response = await client.send(request); - return Response.fromStream(response); - } else { - var msgBody = contentType == "application/x-www-form-urlencoded" ? formParams : serialize(body); - switch(method) { - case "POST": - return client.post(url, headers: headerParams, body: msgBody); - case "PUT": - return client.put(url, headers: headerParams, body: msgBody); - case "DELETE": - return client.delete(url, headers: headerParams); - case "PATCH": - return client.patch(url, headers: headerParams, body: msgBody); - default: - return client.get(url, headers: headerParams); - } - } - } - - /// Update query and header parameters based on authentication settings. - /// @param authNames The authentications to apply - void _updateParamsForAuth(List authNames, List queryParams, Map headerParams) { - authNames.forEach((authName) { - Authentication auth = _authentications[authName]; - if (auth == null) throw new ArgumentError("Authentication undefined: " + authName); - auth.applyToParams(queryParams, headerParams); - }); - } - - void setAccessToken(String accessToken) { - _authentications.forEach((key, auth) { - if (auth is OAuth) { - auth.setAccessToken(accessToken); - } - }); - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart deleted file mode 100644 index f188fd125a4d..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_exception.dart +++ /dev/null @@ -1,23 +0,0 @@ -part of openapi.api; - -class ApiException implements Exception { - int code = 0; - String message = null; - Exception innerException = null; - StackTrace stackTrace = null; - - ApiException(this.code, this.message); - - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); - - String toString() { - if (message == null) return "ApiException"; - - if (innerException == null) { - return "ApiException $code: $message"; - } - - return "ApiException $code: $message (Inner exception: ${innerException})\n\n" + - stackTrace.toString(); - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart deleted file mode 100644 index 79af4521d5b3..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/api_helper.dart +++ /dev/null @@ -1,44 +0,0 @@ -part of openapi.api; - -const _delimiters = const {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; - -// port from Java version -Iterable _convertParametersForCollectionFormat( - String collectionFormat, String name, dynamic value) { - var params = []; - - // preconditions - if (name == null || name.isEmpty || value == null) return params; - - if (value is! List) { - params.add(new QueryParam(name, parameterToString(value))); - return params; - } - - List values = value as List; - - // get the collection format - collectionFormat = (collectionFormat == null || collectionFormat.isEmpty) - ? "csv" - : collectionFormat; // default: csv - - if (collectionFormat == "multi") { - return values.map((v) => new QueryParam(name, parameterToString(v))); - } - - String delimiter = _delimiters[collectionFormat] ?? ","; - - params.add(new QueryParam(name, values.map((v) => parameterToString(v)).join(delimiter))); - return params; -} - -/// Format the given parameter object into string. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } else if (value is DateTime) { - return value.toUtc().toIso8601String(); - } else { - return value.toString(); - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart deleted file mode 100644 index f9617f7ae4da..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,27 +0,0 @@ -part of openapi.api; - -class ApiKeyAuth implements Authentication { - - final String location; - final String paramName; - String apiKey; - String apiKeyPrefix; - - ApiKeyAuth(this.location, this.paramName); - - @override - void applyToParams(List queryParams, Map headerParams) { - String value; - if (apiKeyPrefix != null) { - value = '$apiKeyPrefix $apiKey'; - } else { - value = apiKey; - } - - if (location == 'query' && value != null) { - queryParams.add(new QueryParam(paramName, value)); - } else if (location == 'header' && value != null) { - headerParams[paramName] = value; - } - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart deleted file mode 100644 index abd5e2fe68a3..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/authentication.dart +++ /dev/null @@ -1,7 +0,0 @@ -part of openapi.api; - -abstract class Authentication { - - /// Apply authentication settings to header and query params. - void applyToParams(List queryParams, Map headerParams); -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart deleted file mode 100644 index 4e77ddcf6e68..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/http_basic_auth.dart +++ /dev/null @@ -1,14 +0,0 @@ -part of openapi.api; - -class HttpBasicAuth implements Authentication { - - String username; - String password; - - @override - void applyToParams(List queryParams, Map headerParams) { - String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); - headerParams["Authorization"] = "Basic " + BASE64.encode(UTF8.encode(str)); - } - -} \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart deleted file mode 100644 index 13bfd799743b..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/auth/oauth.dart +++ /dev/null @@ -1,19 +0,0 @@ -part of openapi.api; - -class OAuth implements Authentication { - String accessToken; - - OAuth({this.accessToken}) { - } - - @override - void applyToParams(List queryParams, Map headerParams) { - if (accessToken != null) { - headerParams["Authorization"] = "Bearer " + accessToken; - } - } - - void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } -} diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart deleted file mode 100644 index a39d9500b29d..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/api_response.dart +++ /dev/null @@ -1,44 +0,0 @@ -part of openapi.api; - -class ApiResponse { - - int code = null; - - String type = null; - - String message = null; - ApiResponse(); - - @override - String toString() { - return 'ApiResponse[code=$code, type=$type, message=$message, ]'; - } - - ApiResponse.fromJson(Map json) { - if (json == null) return; - code = json['code']; - type = json['type']; - message = json['message']; - } - - Map toJson() { - return { - 'code': code, - 'type': type, - 'message': message - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new ApiResponse.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new ApiResponse.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart deleted file mode 100644 index b9b2481dd295..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/category.dart +++ /dev/null @@ -1,40 +0,0 @@ -part of openapi.api; - -class Category { - - int id = null; - - String name = null; - Category(); - - @override - String toString() { - return 'Category[id=$id, name=$name, ]'; - } - - Category.fromJson(Map json) { - if (json == null) return; - id = json['id']; - name = json['name']; - } - - Map toJson() { - return { - 'id': id, - 'name': name - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Category.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Category.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart deleted file mode 100644 index 4e264a183ef9..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/order.dart +++ /dev/null @@ -1,57 +0,0 @@ -part of openapi.api; - -class Order { - - int id = null; - - int petId = null; - - int quantity = null; - - DateTime shipDate = null; - /* Order Status */ - String status = null; - //enum statusEnum { placed, approved, delivered, };{ - - bool complete = false; - Order(); - - @override - String toString() { - return 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete, ]'; - } - - Order.fromJson(Map json) { - if (json == null) return; - id = json['id']; - petId = json['petId']; - quantity = json['quantity']; - shipDate = json['shipDate'] == null ? null : DateTime.parse(json['shipDate']); - status = json['status']; - complete = json['complete']; - } - - Map toJson() { - return { - 'id': id, - 'petId': petId, - 'quantity': quantity, - 'shipDate': shipDate == null ? '' : shipDate.toUtc().toIso8601String(), - 'status': status, - 'complete': complete - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Order.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Order.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart deleted file mode 100644 index 4d2f77a1a5ae..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/pet.dart +++ /dev/null @@ -1,57 +0,0 @@ -part of openapi.api; - -class Pet { - - int id = null; - - Category category = null; - - String name = null; - - List photoUrls = []; - - List tags = []; - /* pet status in the store */ - String status = null; - //enum statusEnum { available, pending, sold, };{ - Pet(); - - @override - String toString() { - return 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status, ]'; - } - - Pet.fromJson(Map json) { - if (json == null) return; - id = json['id']; - category = new Category.fromJson(json['category']); - name = json['name']; - photoUrls = (json['photoUrls'] as List).map((item) => item as String).toList(); - tags = Tag.listFromJson(json['tags']); - status = json['status']; - } - - Map toJson() { - return { - 'id': id, - 'category': category, - 'name': name, - 'photoUrls': photoUrls, - 'tags': tags, - 'status': status - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Pet.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Pet.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart deleted file mode 100644 index 315a326adb72..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/tag.dart +++ /dev/null @@ -1,40 +0,0 @@ -part of openapi.api; - -class Tag { - - int id = null; - - String name = null; - Tag(); - - @override - String toString() { - return 'Tag[id=$id, name=$name, ]'; - } - - Tag.fromJson(Map json) { - if (json == null) return; - id = json['id']; - name = json['name']; - } - - Map toJson() { - return { - 'id': id, - 'name': name - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new Tag.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new Tag.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart b/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart deleted file mode 100644 index 0e4cc2104c76..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/lib/model/user.dart +++ /dev/null @@ -1,64 +0,0 @@ -part of openapi.api; - -class User { - - int id = null; - - String username = null; - - String firstName = null; - - String lastName = null; - - String email = null; - - String password = null; - - String phone = null; - /* User Status */ - int userStatus = null; - User(); - - @override - String toString() { - return 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus, ]'; - } - - User.fromJson(Map json) { - if (json == null) return; - id = json['id']; - username = json['username']; - firstName = json['firstName']; - lastName = json['lastName']; - email = json['email']; - password = json['password']; - phone = json['phone']; - userStatus = json['userStatus']; - } - - Map toJson() { - return { - 'id': id, - 'username': username, - 'firstName': firstName, - 'lastName': lastName, - 'email': email, - 'password': password, - 'phone': phone, - 'userStatus': userStatus - }; - } - - static List listFromJson(List json) { - return json == null ? new List() : json.map((value) => new User.fromJson(value)).toList(); - } - - static Map mapFromJson(Map> json) { - var map = new Map(); - if (json != null && json.length > 0) { - json.forEach((String key, Map value) => map[key] = new User.fromJson(value)); - } - return map; - } -} - diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml b/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml deleted file mode 100644 index d54efb46a2e4..000000000000 --- a/samples/client/petstore/dart/flutter_petstore/swagger/pubspec.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: openapi -version: 1.0.0 -description: OpenAPI API client -dependencies: - http: '>=0.11.1 <0.12.0' diff --git a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi-browser-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/dart/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/.openapi-generator-ignore b/samples/client/petstore/eiffel/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/eiffel/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/eiffel/.openapi-generator/VERSION b/samples/client/petstore/eiffel/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/eiffel/.openapi-generator/VERSION +++ b/samples/client/petstore/eiffel/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/eiffel/README.md b/samples/client/petstore/eiffel/README.md index 25bb0357e138..bb363368532d 100644 --- a/samples/client/petstore/eiffel/README.md +++ b/samples/client/petstore/eiffel/README.md @@ -41,7 +41,6 @@ Class | Method | HTTP request | Description *PET_API* | [**update_pet**](docs/PET_API.md#update_pet) | **Put** /pet | Update an existing pet *PET_API* | [**update_pet_with_form**](docs/PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data *PET_API* | [**upload_file**](docs/PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image -*PET_API* | [**upload_file_with_required_file**](docs/PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *STORE_API* | [**delete_order**](docs/STORE_API.md#delete_order) | **Delete** /store/order/{order_id} | Delete purchase order by ID *STORE_API* | [**inventory**](docs/STORE_API.md#inventory) | **Get** /store/inventory | Returns pet inventories by status *STORE_API* | [**order_by_id**](docs/STORE_API.md#order_by_id) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/eiffel/api_client.ecf b/samples/client/petstore/eiffel/api_client.ecf index c8115359aa81..6f0ef48e4822 100644 --- a/samples/client/petstore/eiffel/api_client.ecf +++ b/samples/client/petstore/eiffel/api_client.ecf @@ -1,9 +1,5 @@ -<<<<<<< HEAD - -======= - ->>>>>>> 2c6791c7e6f7a7153c00eb9a8ad646c35e96d536 + diff --git a/samples/client/petstore/eiffel/docs/FAKE_API.md b/samples/client/petstore/eiffel/docs/FAKE_API.md index 948a89a92484..94888d077727 100644 --- a/samples/client/petstore/eiffel/docs/FAKE_API.md +++ b/samples/client/petstore/eiffel/docs/FAKE_API.md @@ -257,7 +257,7 @@ Name | Type | Description | Notes **enum_query_string** | **STRING_32**| Query parameter enum test (string) | [optional] [default to -efg] **enum_query_integer** | **INTEGER_32**| Query parameter enum test (double) | [optional] **enum_query_double** | **REAL_64**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | [**LIST [STRING_32]**](STRING_32.md)| Form parameter enum test (string array) | [optional] [default to $] + **enum_form_string_array** | **LIST [STRING_32]**| Form parameter enum test (string array) | [optional] [default to $] **enum_form_string** | **STRING_32**| Form parameter enum test (string) | [optional] [default to -efg] ### Return type diff --git a/samples/client/petstore/eiffel/docs/PET_API.md b/samples/client/petstore/eiffel/docs/PET_API.md index 0cd65def72d8..2bd3122ea68b 100644 --- a/samples/client/petstore/eiffel/docs/PET_API.md +++ b/samples/client/petstore/eiffel/docs/PET_API.md @@ -12,7 +12,6 @@ Feature | HTTP request | Description [**update_pet**](PET_API.md#update_pet) | **Put** /pet | Update an existing pet [**update_pet_with_form**](PET_API.md#update_pet_with_form) | **Post** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PET_API.md#upload_file) | **Post** /pet/{petId}/uploadImage | uploads an image -[**upload_file_with_required_file**](PET_API.md#upload_file_with_required_file) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -250,33 +249,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file_with_required_file** -> upload_file_with_required_file (pet_id: INTEGER_64 ; file: FILE ; additional_metadata: detachable STRING_32 ): detachable API_RESPONSE - - -uploads an image - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **INTEGER_64**| ID of pet to update | - **file** | **FILE**| file to upload | [default to null] - **additional_metadata** | **STRING_32**| Additional data to pass to server | [optional] [default to null] - -### Return type - -[**API_RESPONSE**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/eiffel/src/api/fake_api.e b/samples/client/petstore/eiffel/src/api/fake_api.e index f266f7d55592..6e7a054c2bdc 100644 --- a/samples/client/petstore/eiffel/src/api/fake_api.e +++ b/samples/client/petstore/eiffel/src/api/fake_api.e @@ -339,7 +339,7 @@ feature -- API Access end end - test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: detachable LIST [STRING_32]; enum_form_string: STRING_32) + test_enum_parameters (enum_header_string_array: detachable LIST [STRING_32]; enum_header_string: STRING_32; enum_query_string_array: detachable LIST [STRING_32]; enum_query_string: STRING_32; enum_query_integer: INTEGER_32; enum_query_double: REAL_64; enum_form_string_array: LIST [STRING_32]; enum_form_string: STRING_32) -- To test enum parameters -- To test enum parameters -- diff --git a/samples/client/petstore/eiffel/src/api/pet_api.e b/samples/client/petstore/eiffel/src/api/pet_api.e index e6fbb1273a8a..17a482737ed5 100644 --- a/samples/client/petstore/eiffel/src/api/pet_api.e +++ b/samples/client/petstore/eiffel/src/api/pet_api.e @@ -315,51 +315,5 @@ feature -- API Access end end - upload_file_with_required_file (pet_id: INTEGER_64; file: FILE; additional_metadata: STRING_32): detachable API_RESPONSE - -- uploads an image - -- - -- - -- argument: pet_id ID of pet to update (required) - -- - -- argument: file file to upload (required) - -- - -- argument: additional_metadata Additional data to pass to server (optional, default to null) - -- - -- - -- Result API_RESPONSE - require - local - l_path: STRING - l_request: API_CLIENT_REQUEST - l_response: API_CLIENT_RESPONSE - do - reset_error - create l_request - - l_path := "/pet/{petId}/uploadImageWithRequiredFile" - l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) - - if attached additional_metadata as l_additional_metadata then - l_request.add_form(l_additional_metadata,"additionalMetadata"); - end - if attached file as l_file then - l_request.add_form(l_file,"file"); - end - - if attached {STRING} api_client.select_header_accept (<<"application/json">>) as l_accept then - l_request.add_header(l_accept,"Accept"); - end - l_request.add_header(api_client.select_header_content_type (<<"multipart/form-data">>),"Content-Type") - l_request.set_auth_names (<<"petstore_auth">>) - l_response := api_client.call_api (l_path, "Post", l_request, Void, agent deserializer) - if l_response.has_error then - last_error := l_response.error - elseif attached { API_RESPONSE } l_response.data ({ API_RESPONSE }) as l_data then - Result := l_data - else - create last_error.make ("Unknown error: Status response [ " + l_response.status.out + "]") - end - end - end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e index a7bcedfd3509..993decf6a2c2 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_json_deserializer.e @@ -20,7 +20,7 @@ expanded class feature -- Access from_json (a_val:STRING; a_type: TYPE [detachable ANY] ): detachable ANY - -- Deserialize a json representation `a_val' to an object + -- Deserialize a a json representation `a_val' to an object -- of type `a_type' local conv_from: JSON_BASIC_REFLECTOR_DESERIALIZER diff --git a/samples/client/petstore/eiffel/test/api_test.ecf b/samples/client/petstore/eiffel/test/api_test.ecf index e0851811b514..ddb5082cabec 100644 --- a/samples/client/petstore/eiffel/test/api_test.ecf +++ b/samples/client/petstore/eiffel/test/api_test.ecf @@ -1,9 +1,5 @@ -<<<<<<< HEAD - -======= - ->>>>>>> 2c6791c7e6f7a7153c00eb9a8ad646c35e96d536 + diff --git a/samples/client/petstore/elixir/.openapi-generator-ignore b/samples/client/petstore/elixir/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/elixir/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/config/config.exs b/samples/client/petstore/elixir/config/config.exs index 72508194de35..7ce1553ff17a 100644 --- a/samples/client/petstore/elixir/config/config.exs +++ b/samples/client/petstore/elixir/config/config.exs @@ -10,11 +10,11 @@ use Mix.Config # You can configure for your application as: # -# config :open_api_petstore, key: :value +# config :swagger_petstore, key: :value # # And access this configuration in your application as: # -# Application.get_env(:open_api_petstore, :key) +# Application.get_env(:swagger_petstore, :key) # # Or configure a 3rd-party app: # diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index 31050082ad16..92281bc7f3c1 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -271,7 +271,7 @@ defmodule OpenapiPetstore.Api.Fake do ## Parameters - connection (OpenapiPetstore.Connection): Connection to server - - request_body (%{optional(String.t) => String.t}): request body + - request_body (String.t): request body - opts (KeywordList): [optional] Optional parameters ## Returns diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex index e89a145e7939..ba926165d6db 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex @@ -220,34 +220,4 @@ defmodule OpenapiPetstore.Api.Pet do |> (&Connection.request(connection, &1)).() |> decode(%OpenapiPetstore.Model.ApiResponse{}) end - - @doc """ - uploads an image - - ## Parameters - - - connection (OpenapiPetstore.Connection): Connection to server - - pet_id (integer()): ID of pet to update - - file (String.t): file to upload - - opts (KeywordList): [optional] Optional parameters - - :additional_metadata (String.t): Additional data to pass to server - ## Returns - - {:ok, %OpenapiPetstore.Model.ApiResponse{}} on success - {:error, info} on failure - """ - @spec upload_file_with_required_file(Tesla.Env.client, integer(), String.t, keyword()) :: {:ok, OpenapiPetstore.Model.ApiResponse.t} | {:error, Tesla.Env.t} - def upload_file_with_required_file(connection, pet_id, file, opts \\ []) do - optional_params = %{ - :"additionalMetadata" => :form - } - %{} - |> method(:post) - |> url("/pet/#{pet_id}/uploadImageWithRequiredFile") - |> add_param(:file, :"file", file) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> decode(%OpenapiPetstore.Model.ApiResponse{}) - end end diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex index 834cc003d108..a26f07618129 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex @@ -15,7 +15,7 @@ defmodule OpenapiPetstore.Connection do plug Tesla.Middleware.EncodeJson @doc """ - Configure a client connection using Basic authentication. + Configure an client connection using Basic authentication. ## Parameters diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-client/.openapi-generator/VERSION b/samples/client/petstore/erlang-client/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/erlang-client/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/.openapi-generator/VERSION b/samples/client/petstore/flash/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/flash/.openapi-generator/VERSION +++ b/samples/client/petstore/flash/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/flash/flash/build.xml b/samples/client/petstore/flash/flash/build.xml index dedf7e030081..da3c67f83443 100644 --- a/samples/client/petstore/flash/flash/build.xml +++ b/samples/client/petstore/flash/flash/build.xml @@ -15,7 +15,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -189,4 +189,4 @@ - + \ No newline at end of file diff --git a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as index abb0fe121fb2..964dbc26d692 100644 --- a/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as +++ b/samples/client/petstore/flash/flash/src/org/openapitools/event/ApiClientEvent.as @@ -11,7 +11,7 @@ import flash.events.Event; public class ApiClientEvent extends Event{ /** - * Event type to indicate an unsuccessful invocation + * Event type to indicate a unsuccessful invocation */ public static const FAILURE_EVENT:String = "unsuccesfulInvocation"; @@ -33,4 +33,4 @@ public class ApiClientEvent extends Event{ super(type, bubbles, cancelable); } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index e6f811087550..dfb07bd7fdf6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -50,7 +50,6 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index 670b9e7adecc..c5c2dfaffa71 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -282,46 +282,6 @@ paths: summary: uploads an image tags: - pet - /pet/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - required: - - file - required: true - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index f44bbc804da4..37db3a5b3535 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -696,106 +696,3 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt return localVarReturnValue, localVarHttpResponse, nil } - -/* -PetApiService uploads an image - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param petId ID of pet to update - * @param file file to upload - * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: - * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse -*/ - -type UploadFileWithRequiredFileOpts struct { - AdditionalMetadata optional.String -} - -func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ApiResponse - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"multipart/form-data"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { - localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) - } - localVarFile := file - if localVarFile != nil { - fbs, _ := ioutil.ReadAll(localVarFile) - localVarFileBytes = fbs - localVarFileName = localVarFile.Name() - localVarFile.Close() - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ApiResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index 402f31e72910..9a78c747da00 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **AddPet** @@ -258,40 +257,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional) -uploads an image - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **petId** | **int64**| ID of pet to update | - **file** | ***os.File*****os.File**| file to upload | - **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **additionalMetadata** | **optional.String**| Additional data to pass to server | - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md b/samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md similarity index 57% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md rename to samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md index ded7b32ac3d7..f4af21468294 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore/docs/ModelApiResponse.md @@ -1,15 +1,11 @@ -# openapi.model.Tag - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` +# ModelApiResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] [default to null] -**name** | **String** | | [optional] [default to null] +**Code** | **int32** | | [optional] [default to null] +**Type_** | **string** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md b/samples/client/petstore/go/go-petstore/docs/ModelReturn.md similarity index 57% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md rename to samples/client/petstore/go/go-petstore/docs/ModelReturn.md index cc0d1633b59c..86350d4310c1 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/Category.md +++ b/samples/client/petstore/go/go-petstore/docs/ModelReturn.md @@ -1,15 +1,9 @@ -# openapi.model.Category - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` +# ModelReturn ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | | [optional] [default to null] -**name** | **String** | | [optional] [default to null] +**Return_** | **int32** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore/docs/OuterBoolean.md similarity index 50% rename from samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md rename to samples/client/petstore/go/go-petstore/docs/OuterBoolean.md index 92422f0f446e..8b2433994745 100644 --- a/samples/client/petstore/dart/flutter_petstore/swagger/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore/docs/OuterBoolean.md @@ -1,16 +1,8 @@ -# openapi.model.ApiResponse - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` +# OuterBoolean ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **int** | | [optional] [default to null] -**type** | **String** | | [optional] [default to null] -**message** | **String** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/OuterNumber.md b/samples/client/petstore/go/go-petstore/docs/OuterNumber.md new file mode 100644 index 000000000000..8aa37f329bd4 --- /dev/null +++ b/samples/client/petstore/go/go-petstore/docs/OuterNumber.md @@ -0,0 +1,9 @@ +# OuterNumber + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore/docs/OuterString.md b/samples/client/petstore/go/go-petstore/docs/OuterString.md new file mode 100644 index 000000000000..9ccaadaf98df --- /dev/null +++ b/samples/client/petstore/go/go-petstore/docs/OuterString.md @@ -0,0 +1,9 @@ +# OuterString + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/go/go-petstore/model_outer_boolean.go b/samples/client/petstore/go/go-petstore/model_outer_boolean.go new file mode 100644 index 000000000000..dc9ceb0c67e3 --- /dev/null +++ b/samples/client/petstore/go/go-petstore/model_outer_boolean.go @@ -0,0 +1,14 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package petstore + +type OuterBoolean struct { +} diff --git a/samples/client/petstore/go/go-petstore/model_outer_number.go b/samples/client/petstore/go/go-petstore/model_outer_number.go new file mode 100644 index 000000000000..75aad986c34f --- /dev/null +++ b/samples/client/petstore/go/go-petstore/model_outer_number.go @@ -0,0 +1,14 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package petstore + +type OuterNumber struct { +} diff --git a/samples/client/petstore/go/go-petstore/model_outer_string.go b/samples/client/petstore/go/go-petstore/model_outer_string.go new file mode 100644 index 000000000000..f2a440337bdd --- /dev/null +++ b/samples/client/petstore/go/go-petstore/model_outer_string.go @@ -0,0 +1,14 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package petstore + +type OuterString struct { +} diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/README.md b/samples/client/petstore/haskell-http-client/README.md index df8a36316301..7e2167a91d90 100644 --- a/samples/client/petstore/haskell-http-client/README.md +++ b/samples/client/petstore/haskell-http-client/README.md @@ -2,7 +2,7 @@ The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the OpenAPI Petstore API. -OpenApi Version: 3.0.1 +OpenApi Version: 3.0.0 ## Installation @@ -36,7 +36,7 @@ to obtain and use the openapi-generator cli tool lives at https://openapi-generator.tech -The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be +The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be ``` haskell-http-client diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs index 83e607b1ad72..4e71ab9e7206 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs index 7335a85067e3..3c3deada26b9 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs index 0deb75364af9..d6187951efe7 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs index fa21cfee9f26..6e27a5fe5b1b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -64,11 +64,10 @@ import qualified Prelude as P -- Test serialization of outer boolean types -- fakeOuterBooleanSerialize - :: (Consumes FakeOuterBooleanSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept -fakeOuterBooleanSerialize _ _ = + :: (Consumes FakeOuterBooleanSerialize MimeJSON) + => Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize MimeJSON Bool accept +fakeOuterBooleanSerialize _ = _mkRequest "POST" ["/fake/outer/boolean"] data FakeOuterBooleanSerialize @@ -76,6 +75,9 @@ data FakeOuterBooleanSerialize -- | /Body Param/ "body" - Input boolean as post body instance HasBodyParam FakeOuterBooleanSerialize BodyBool +-- | @application/json@ +instance Consumes FakeOuterBooleanSerialize MimeJSON + -- | @*/*@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype @@ -87,11 +89,10 @@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype -- Test serialization of object with outer number type -- fakeOuterCompositeSerialize - :: (Consumes FakeOuterCompositeSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept -fakeOuterCompositeSerialize _ _ = + :: (Consumes FakeOuterCompositeSerialize MimeJSON) + => Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize MimeJSON OuterComposite accept +fakeOuterCompositeSerialize _ = _mkRequest "POST" ["/fake/outer/composite"] data FakeOuterCompositeSerialize @@ -99,6 +100,9 @@ data FakeOuterCompositeSerialize -- | /Body Param/ "OuterComposite" - Input composite as post body instance HasBodyParam FakeOuterCompositeSerialize OuterComposite +-- | @application/json@ +instance Consumes FakeOuterCompositeSerialize MimeJSON + -- | @*/*@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype @@ -110,11 +114,10 @@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype -- Test serialization of outer number types -- fakeOuterNumberSerialize - :: (Consumes FakeOuterNumberSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept -fakeOuterNumberSerialize _ _ = + :: (Consumes FakeOuterNumberSerialize MimeJSON) + => Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterNumberSerialize MimeJSON Double accept +fakeOuterNumberSerialize _ = _mkRequest "POST" ["/fake/outer/number"] data FakeOuterNumberSerialize @@ -122,6 +125,9 @@ data FakeOuterNumberSerialize -- | /Body Param/ "body" - Input number as post body instance HasBodyParam FakeOuterNumberSerialize Body +-- | @application/json@ +instance Consumes FakeOuterNumberSerialize MimeJSON + -- | @*/*@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype @@ -133,11 +139,10 @@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype -- Test serialization of outer string types -- fakeOuterStringSerialize - :: (Consumes FakeOuterStringSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept -fakeOuterStringSerialize _ _ = + :: (Consumes FakeOuterStringSerialize MimeJSON) + => Accept accept -- ^ request accept ('MimeType') + -> OpenAPIPetstoreRequest FakeOuterStringSerialize MimeJSON Text accept +fakeOuterStringSerialize _ = _mkRequest "POST" ["/fake/outer/string"] data FakeOuterStringSerialize @@ -145,31 +150,11 @@ data FakeOuterStringSerialize -- | /Body Param/ "body" - Input string as post body instance HasBodyParam FakeOuterStringSerialize BodyText --- | @*/*@ -instance MimeType mtype => Produces FakeOuterStringSerialize mtype - - --- *** testBodyWithQueryParams - --- | @PUT \/fake\/body-with-query-params@ --- -testBodyWithQueryParams - :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) - => User -- ^ "user" - -> Query -- ^ "query" - -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent -testBodyWithQueryParams user (Query query) = - _mkRequest "PUT" ["/fake/body-with-query-params"] - `setBodyParam` user - `setQuery` toQuery ("query", Just query) - -data TestBodyWithQueryParams -instance HasBodyParam TestBodyWithQueryParams User - -- | @application/json@ -instance Consumes TestBodyWithQueryParams MimeJSON +instance Consumes FakeOuterStringSerialize MimeJSON -instance Produces TestBodyWithQueryParams MimeNoContent +-- | @*/*@ +instance MimeType mtype => Produces FakeOuterStringSerialize mtype -- *** testClientModel @@ -322,7 +307,7 @@ instance HasOptionalParam TestEnumParameters EnumHeaderString where -- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) instance HasOptionalParam TestEnumParameters EnumQueryStringArray where applyOptionalParam req (EnumQueryStringArray xs) = - req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) + req `setQuery` toQueryColl MultiParamArray ("enum_query_string_array", Just xs) -- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) instance HasOptionalParam TestEnumParameters EnumQueryString where diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs index 5719e3c4cd4b..e1776cbfd8b7 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs index 48c91af3aaa4..16797e4fdbf5 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -292,35 +292,3 @@ instance Consumes UploadFile MimeMultipartFormData -- | @application/json@ instance Produces UploadFile MimeJSON - --- *** uploadFileWithRequiredFile - --- | @POST \/pet\/{petId}\/uploadImageWithRequiredFile@ --- --- uploads an image --- --- AuthMethod: 'AuthOAuthPetstoreAuth' --- -uploadFileWithRequiredFile - :: (Consumes UploadFileWithRequiredFile MimeMultipartFormData) - => File -- ^ "file" - file to upload - -> PetId -- ^ "petId" - ID of pet to update - -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON -uploadFileWithRequiredFile (File file) (PetId petId) = - _mkRequest "POST" ["/pet/",toPath petId,"/uploadImageWithRequiredFile"] - `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `_addMultiFormPart` NH.partFileSource "file" file - -data UploadFileWithRequiredFile - --- | /Optional Param/ "additionalMetadata" - Additional data to pass to server -instance HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata where - applyOptionalParam req (AdditionalMetadata xs) = - req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) - --- | @multipart/form-data@ -instance Consumes UploadFileWithRequiredFile MimeMultipartFormData - --- | @application/json@ -instance Produces UploadFileWithRequiredFile MimeJSON - diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs index 12bcd0bc94a7..628da5181219 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -128,12 +128,11 @@ instance Produces GetOrderById MimeJSON -- Place an order for a pet -- placeOrder - :: (Consumes PlaceOrder contentType, MimeRender contentType Order) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') + :: (Consumes PlaceOrder MimeJSON, MimeRender MimeJSON Order) + => Accept accept -- ^ request accept ('MimeType') -> Order -- ^ "order" - order placed for purchasing the pet - -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept -placeOrder _ _ order = + -> OpenAPIPetstoreRequest PlaceOrder MimeJSON Order accept +placeOrder _ order = _mkRequest "POST" ["/store/order"] `setBodyParam` order @@ -142,6 +141,9 @@ data PlaceOrder -- | /Body Param/ "Order" - order placed for purchasing the pet instance HasBodyParam PlaceOrder Order +-- | @application/json@ +instance Consumes PlaceOrder MimeJSON + -- | @application/xml@ instance Produces PlaceOrder MimeXML -- | @application/json@ diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs index efc6ad66f315..76b4963a8f10 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -66,11 +66,10 @@ import qualified Prelude as P -- This can only be done by the logged in user. -- createUser - :: (Consumes CreateUser contentType, MimeRender contentType User) - => ContentType contentType -- ^ request content-type ('MimeType') - -> User -- ^ "user" - Created user object - -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent -createUser _ user = + :: (Consumes CreateUser MimeJSON, MimeRender MimeJSON User) + => User -- ^ "user" - Created user object + -> OpenAPIPetstoreRequest CreateUser MimeJSON NoContent MimeNoContent +createUser user = _mkRequest "POST" ["/user"] `setBodyParam` user @@ -79,6 +78,9 @@ data CreateUser -- | /Body Param/ "User" - Created user object instance HasBodyParam CreateUser User +-- | @application/json@ +instance Consumes CreateUser MimeJSON + instance Produces CreateUser MimeNoContent @@ -89,11 +91,10 @@ instance Produces CreateUser MimeNoContent -- Creates list of users with given input array -- createUsersWithArrayInput - :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType User2) - => ContentType contentType -- ^ request content-type ('MimeType') - -> User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent -createUsersWithArrayInput _ user = + :: (Consumes CreateUsersWithArrayInput MimeJSON, MimeRender MimeJSON User2) + => User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithArrayInput MimeJSON NoContent MimeNoContent +createUsersWithArrayInput user = _mkRequest "POST" ["/user/createWithArray"] `setBodyParam` user @@ -102,6 +103,9 @@ data CreateUsersWithArrayInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithArrayInput User2 +-- | @application/json@ +instance Consumes CreateUsersWithArrayInput MimeJSON + instance Produces CreateUsersWithArrayInput MimeNoContent @@ -112,11 +116,10 @@ instance Produces CreateUsersWithArrayInput MimeNoContent -- Creates list of users with given input array -- createUsersWithListInput - :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType User2) - => ContentType contentType -- ^ request content-type ('MimeType') - -> User2 -- ^ "user" - List of user object - -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent -createUsersWithListInput _ user = + :: (Consumes CreateUsersWithListInput MimeJSON, MimeRender MimeJSON User2) + => User2 -- ^ "user" - List of user object + -> OpenAPIPetstoreRequest CreateUsersWithListInput MimeJSON NoContent MimeNoContent +createUsersWithListInput user = _mkRequest "POST" ["/user/createWithList"] `setBodyParam` user @@ -125,6 +128,9 @@ data CreateUsersWithListInput -- | /Body Param/ "User" - List of user object instance HasBodyParam CreateUsersWithListInput User2 +-- | @application/json@ +instance Consumes CreateUsersWithListInput MimeJSON + instance Produces CreateUsersWithListInput MimeNoContent @@ -217,12 +223,11 @@ instance Produces LogoutUser MimeNoContent -- This can only be done by the logged in user. -- updateUser - :: (Consumes UpdateUser contentType, MimeRender contentType User) - => ContentType contentType -- ^ request content-type ('MimeType') - -> User -- ^ "user" - Updated user object + :: (Consumes UpdateUser MimeJSON, MimeRender MimeJSON User) + => User -- ^ "user" - Updated user object -> Username -- ^ "username" - name that need to be deleted - -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent -updateUser _ user (Username username) = + -> OpenAPIPetstoreRequest UpdateUser MimeJSON NoContent MimeNoContent +updateUser user (Username username) = _mkRequest "PUT" ["/user/",toPath username] `setBodyParam` user @@ -231,5 +236,8 @@ data UpdateUser -- | /Body Param/ "User" - Updated user object instance HasBodyParam UpdateUser User +-- | @application/json@ +instance Consumes UpdateUser MimeJSON + instance Produces UpdateUser MimeNoContent diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs index 31cd12f7adaf..d9203a5bd4f2 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs index 6fbc9899d343..019f2ce6131c 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs index 8e3d4ac772bc..3241dbd85a5d 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Logging.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs index 0da4b6310f07..33b2868d0fa6 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/MimeTypes.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 602a1b79a46b..60bcf3a4b692 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} @@ -168,9 +168,6 @@ newtype PatternWithoutDelimiter = PatternWithoutDelimiter { unPatternWithoutDeli -- ** PetId newtype PetId = PetId { unPetId :: Integer } deriving (P.Eq, P.Show) --- ** Query -newtype Query = Query { unQuery :: Text } deriving (P.Eq, P.Show) - -- ** RequestBody newtype RequestBody = RequestBody { unRequestBody :: (Map.Map String Text) } deriving (P.Eq, P.Show, A.ToJSON) diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index 149d051ad4d2..cef3d3da526b 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -3,7 +3,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - OpenAPI Version: 3.0.1 + OpenAPI Version: 3.0.0 OpenAPI Petstore API version: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) -} diff --git a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal index a4c4bbb6e9f0..456867d65121 100644 --- a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal +++ b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal @@ -10,7 +10,7 @@ description: . . OpenAPI Petstore API version: 1.0.0 . - OpenAPI version: 3.0.1 + OpenAPI version: 3.0.0 . category: Web homepage: https://openapi-generator.tech diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 670b9e7adecc..b3a6fbc50e50 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1,199 +1,161 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: + title: OpenAPI Petstore description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \' license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io:80/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: addPet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - 405: - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store + put: tags: - pet - put: + summary: Update an existing pet operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found 405: - content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet + post: tags: - pet + summary: Add a new pet to the store + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 405: + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + style: form + explode: false schema: + type: array items: - default: available + type: string enum: - available - pending - sold - type: string - type: array - style: form + default: available responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + style: form + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by tags - tags: - - pet /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet + get: tags: - pet - get: + summary: Find pet by ID description: Returns a single pet operationId: getPetById parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -201,158 +163,135 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found security: - api_key: [] - summary: Find pet by ID + post: tags: - pet - post: + summary: Updates a pet in the store with form data operationId: updatePetWithForm parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string + $ref: '#/components/schemas/body' responses: 405: - content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + delete: tags: - pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile + summary: Deletes a pet + operationId: deletePet parameters: - - description: ID of pet to update + - name: api_key + in: header + required: false + style: simple + explode: false + schema: + type: string + - name: petId in: path - name: petId + description: Pet id to delete required: true + style: simple + explode: false schema: - format: int64 type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string + format: int64 responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation + 400: + description: Invalid pet value security: - petstore_auth: - write:pets - read:pets - summary: uploads an image + /pet/{petId}/uploadImage: + post: tags: - pet - /pet/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile + summary: uploads an image + operationId: uploadFile parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - required: - - file - required: true + $ref: '#/components/schemas/body_1' responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: placeOrder requestBody: + description: order placed for purchasing the pet content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -360,49 +299,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: order_id - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Order not found - summary: Delete purchase order by ID + get: tags: - store - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - description: ID of pet that needs to be fetched + - name: order_id in: path - name: order_id + description: ID of pet that needs to be fetched required: true + style: simple + explode: false schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -410,157 +330,146 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Order not found - summary: Find purchase order by ID + delete: tags: - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid ID supplied + 404: + description: Order not found /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: + description: Created user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user /user/login: get: + tags: + - user + summary: Logs user into the system operationId: loginUser parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true + style: form + explode: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true + style: form + explode: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user + style: simple + explode: false schema: - format: int32 type: integer + format: int32 X-Expires-After: - description: date in UTC when token expires + description: date in UTC when toekn expires + style: simple + explode: false schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logoutUser responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: - content: {} - description: User not found - summary: Delete user + get: tags: - user - get: + summary: Get user by user name operationId: getUserByName parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true + style: simple + explode: false schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -568,188 +477,179 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found - summary: Get user by user name + put: tags: - user - put: + summary: Updated user description: This can only be done by the logged in user. operationId: updateUser parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true + style: simple + explode: false schema: type: string requestBody: + description: Updated user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied 404: - content: {} description: User not found - summary: Updated user + delete: tags: - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid username supplied + 404: + description: User not found /fake_classname_test: patch: + tags: + - fake_classname_tags 123#$%^ + summary: To test class name in snake case description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' - description: successful operation security: - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ /fake: get: + tags: + - fake + summary: To test enum parameters description: To test enum parameters operationId: testEnumParameters parameters: - - description: Header parameter enum test (string array) - explode: false + - name: enum_header_string_array in: header - name: enum_header_string_array + description: Header parameter enum test (string array) + required: false + style: simple + explode: true schema: + type: array items: - default: $ + type: string enum: - '>' - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) + default: $ + - name: enum_header_string in: header - name: enum_header_string + description: Header parameter enum test (string) + required: false + style: simple + explode: false schema: - default: -efg + type: string enum: - _abc - -efg - (xyz) - type: string - - description: Query parameter enum test (string array) - explode: false + default: -efg + - name: enum_query_string_array in: query - name: enum_query_string_array + description: Query parameter enum test (string array) + required: false + style: form + explode: true schema: + type: array items: - default: $ + type: string enum: - '>' - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) + default: $ + - name: enum_query_string in: query - name: enum_query_string + description: Query parameter enum test (string) + required: false + style: form + explode: true schema: - default: -efg + type: string enum: - _abc - -efg - (xyz) - type: string - - description: Query parameter enum test (double) + default: -efg + - name: enum_query_integer in: query - name: enum_query_integer + description: Query parameter enum test (double) + required: false + style: form + explode: true schema: + type: integer + format: int32 enum: - 1 - -2 - format: int32 - type: integer - - description: Query parameter enum test (double) + - name: enum_query_double in: query - name: enum_query_double + description: Query parameter enum test (double) + required: false + style: form + explode: true schema: + type: number + format: double enum: - 1.1 - -1.2 - format: double - type: number requestBody: content: application/x-www-form-urlencoded: schema: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string + $ref: '#/components/schemas/body_2' responses: 400: - content: {} description: Invalid request 404: - content: {} description: Not found - summary: To test enum parameters - tags: - - fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model + post: tags: - fake - post: + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 description: | Fake endpoint for testing various parameters 假端點 @@ -760,288 +660,208 @@ paths: content: application/x-www-form-urlencoded: schema: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - required: true + $ref: '#/components/schemas/body_3' responses: 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found security: - http_basic_test: [] - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + patch: tags: - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + requestBody: + $ref: '#/components/requestBodies/Client' + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' /fake/outer/number: post: + tags: + - fake description: Test serialization of outer number types operationId: fakeOuterNumberSerialize requestBody: + description: Input number as post body content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - required: false responses: 200: + description: Output number content: '*/*': schema: $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake /fake/outer/string: post: + tags: + - fake description: Test serialization of outer string types operationId: fakeOuterStringSerialize requestBody: + description: Input string as post body content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' - description: Input string as post body - required: false responses: 200: + description: Output string content: '*/*': schema: $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake /fake/outer/boolean: post: + tags: + - fake description: Test serialization of outer boolean types operationId: fakeOuterBooleanSerialize requestBody: + description: Input boolean as post body content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - required: false responses: 200: + description: Output boolean content: '*/*': schema: $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake /fake/outer/composite: post: + tags: + - fake description: Test serialization of object with outer number type operationId: fakeOuterCompositeSerialize requestBody: + description: Input composite as post body content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - required: false responses: 200: + description: Output composite content: '*/*': schema: $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake /fake/jsonFormData: get: + tags: + - fake + summary: test json serialization of form data operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - required: true + $ref: '#/components/schemas/body_4' responses: 200: - content: {} description: successful operation - summary: test json serialization of form data - tags: - - fake /fake/inline-additionalProperties: post: + tags: + - fake + summary: test inline additionalProperties operationId: testInlineAdditionalProperties requestBody: + description: request body content: application/json: schema: + type: object additionalProperties: type: string - type: object - description: request body required: true responses: 200: - content: {} description: successful operation - summary: test inline additionalProperties - tags: - - fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - 200: - content: {} - description: Success - tags: - - fake /another-fake/dummy: patch: + tags: + - $another-fake? + summary: To test special tags description: To test special tags operationId: test_special_tags requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? components: schemas: - Category: - example: - name: name - id: 6 + Order: + type: object properties: id: + type: integer format: int64 + petId: type: integer - name: + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + xml: + name: Order + Category: type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: + name: name + id: 6 xml: name: Category User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: object properties: id: - format: int64 type: integer + format: int64 x-is-unique: true username: type: string @@ -1056,267 +876,420 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - type: object + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User - OuterNumber: - type: number - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array + Tag: type: object - Capitalization: properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet + id: + type: integer + format: int64 + name: type: string + example: + name: name + id: 1 + xml: + name: Tag + Pet: + required: + - name + - photoUrls type: object - MixedPropertiesAndAdditionalPropertiesClass: properties: - uuid: - format: uuid + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: type: string - dateTime: - format: date-time + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - ApiResponse: + description: pet status in the store + enum: + - available + - pending + - sold example: - code: 0 - type: type - message: message + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + xml: + name: Pet + ApiResponse: + type: object properties: code: - format: int32 type: integer + format: int32 type: type: string message: type: string - type: object + example: + code: 0 + type: type + message: message + Return: + properties: + return: + type: integer + format: int32 + description: Model for testing reserved words + xml: + name: Return Name: - description: Model for testing model name same as property name + required: + - name properties: name: - format: int32 type: integer + format: int32 snake_case: + type: integer format: int32 readOnly: true - type: integer property: type: string 123Number: - readOnly: true type: integer - required: - - name - type: object + format: int32 + readOnly: true + description: Model for testing model name same as property name xml: name: Name - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - List: - properties: - 123-list: - type: string - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object 200_response: - description: Model for testing model name starting with number properties: name: - format: int32 type: integer + format: int32 class: type: string - type: object + description: Model for testing model name starting with number xml: name: Name - Client: - example: - client: client + ClassModel: properties: - client: + _class: type: string - type: object + description: Model for testing model with "_class" property Dog: allOf: - $ref: '#/components/schemas/Animal' - - properties: + - type: object + properties: breed: type: string - type: object - Enum_Test: + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Animal: + required: + - className + type: object properties: - enum_string: - enum: - - UPPER - - lower - - "" + className: type: string - enum_string_required: - enum: - - UPPER - - lower - - "" + color: type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' + default: red + discriminator: + propertyName: className + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: required: - - enum_string_required + - byte + - date + - number + - password type: object - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed properties: - id: - format: int64 + integer: + maximum: 100 + minimum: 10 type: integer - petId: - format: int64 + format: int32 + int32: + maximum: 200 + minimum: 20 type: integer - quantity: format: int32 + int64: type: integer - shipDate: + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + maximum: 987.6 + minimum: 54.3 + type: number + format: float + double: + maximum: 123.4 + minimum: 67.8 + type: number + format: double + string: + type: string + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string format: date-time + uuid: type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered + format: uuid + password: + maxLength: 64 + minLength: 10 type: string - complete: - default: false - type: boolean + format: password + EnumClass: + type: string + enum: + - _abc + - -efg + - (xyz) + default: -efg + Enum_Test: + required: + - enum_string_required type: object - xml: - name: Order + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - "" + enum_string_required: + type: string + enum: + - UPPER + - lower + - "" + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' AdditionalPropertiesClass: + type: object properties: map_property: + type: object additionalProperties: type: string - type: object map_of_map_property: + type: object additionalProperties: + type: object additionalProperties: type: string - type: object - type: object + MixedPropertiesAndAdditionalPropertiesClass: type: object - $special[model.name]: properties: - $special[property.name]: - format: int64 - type: integer + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: type: object - xml: - name: $special[model.name] - Return: - description: Model for testing reserved words properties: - return: - format: int32 - type: integer + 123-list: + type: string + Client: type: object - xml: - name: Return + properties: + client: + type: string + example: + client: client ReadOnlyFirst: + type: object properties: bar: - readOnly: true type: string + readOnly: true baz: type: string + hasOnlyReadOnly: type: object - ArrayOfArrayOfNumberOnly: properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + type: string + description: | + Name of the pet + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower ArrayTest: + type: object properties: array_of_string: + type: array items: type: string - type: array array_array_of_integer: + type: array items: + type: array items: - format: int64 type: integer - type: array - type: array + format: int64 array_array_of_model: + type: array items: + type: array items: $ref: '#/components/schemas/ReadOnlyFirst' - type: array + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + type: string + enum: + - placed + - approved + - delivered OuterComposite: - example: {} + type: object properties: my_number: $ref: '#/components/schemas/OuterNumber' @@ -1324,222 +1297,186 @@ components: $ref: '#/components/schemas/OuterString' my_boolean: $ref: '#/components/schemas/OuterBoolean' + example: {} + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + _special_model.name_: + properties: + $special[property.name]: + type: integer + format: int64 + xml: + name: $special[model.name] + body: + type: object + properties: + name: + type: string + description: Updated name of the pet + status: + type: string + description: Updated status of the pet + body_1: + type: object + properties: + additionalMetadata: + type: string + description: Additional data to pass to server + file: + type: string + description: file to upload + format: binary + body_2: + type: object + properties: + enum_form_string_array: + type: array + description: Form parameter enum test (string array) + items: + type: string + enum: + - '>' + - $ + default: $ + enum_form_string: + type: string + description: Form parameter enum test (string) + enum: + - _abc + - -efg + - (xyz) + default: -efg + body_3: + required: + - byte + - double + - number + - pattern_without_delimiter type: object - format_test: properties: integer: - maximum: 1E+2 - minimum: 1E+1 + maximum: 100 + minimum: 10 type: integer - int32: + description: None format: int32 - maximum: 2E+2 - minimum: 2E+1 + int32: + maximum: 200 + minimum: 20 type: integer + description: None + format: int32 int64: - format: int64 type: integer + description: None + format: int64 number: maximum: 543.2 minimum: 32.1 type: number + description: None float: - format: float maximum: 987.6 - minimum: 54.3 type: number + description: None + format: float double: - format: double maximum: 123.4 minimum: 67.8 type: number + description: None + format: double string: - pattern: /[a-z]/i type: string + description: None + pattern_without_delimiter: + type: string + description: None byte: - format: byte - pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ type: string + description: None + format: byte binary: - format: binary type: string + description: None + format: binary date: - format: date type: string + description: None + format: date dateTime: - format: date-time - type: string - uuid: - format: uuid type: string + description: None + format: date-time password: - format: password maxLength: 64 minLength: 10 type: string - required: - - byte - - date - - number - - password - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterString: - type: string - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - type: object - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold + description: None + format: password + callback: type: string + description: None + body_4: required: - - name - - photoUrls + - param + - param2 type: object - xml: - name: Pet - hasOnlyReadOnly: properties: - bar: - readOnly: true + param: type: string - foo: - readOnly: true + description: field1 + param2: type: string - type: object + description: field2 + requestBodies: + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true + Client: + description: client model + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + required: true + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 - http_basic_test: - scheme: basic - type: http api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header api_key_query: - in: query - name: api_key_query type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index 268532598b00..9503c4fd15ae 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -110,7 +110,6 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-es6/docs/PetApi.md b/samples/client/petstore/javascript-es6/docs/PetApi.md index 6cd6020a0a66..324ecfbe867a 100644 --- a/samples/client/petstore/javascript-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-es6/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -399,54 +398,3 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json - -# **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, file, opts) - -uploads an image - -### Example -```javascript -import OpenApiPetstore from 'open_api_petstore'; -let defaultClient = OpenApiPetstore.ApiClient.instance; - -// Configure OAuth2 access token for authorization: petstore_auth -let petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -let apiInstance = new OpenApiPetstore.PetApi(); -let petId = 789; // Number | ID of pet to update -let file = "/path/to/file"; // File | file to upload -let opts = { - 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server -}; -apiInstance.uploadFileWithRequiredFile(petId, file, opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Number**| ID of pet to update | - **file** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - diff --git a/samples/client/petstore/javascript-es6/src/api/PetApi.js b/samples/client/petstore/javascript-es6/src/api/PetApi.js index f9cf80ec5284..d6b39c8671b8 100644 --- a/samples/client/petstore/javascript-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-es6/src/api/PetApi.js @@ -408,61 +408,5 @@ export default class PetApi { ); } - /** - * Callback function to receive the result of the uploadFileWithRequiredFile operation. - * @callback module:api/PetApi~uploadFileWithRequiredFileCallback - * @param {String} error Error message, if any. - * @param {module:model/ApiResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/ApiResponse} - */ - uploadFileWithRequiredFile(petId, file, opts, callback) { - opts = opts || {}; - let postBody = null; - - // verify the required parameter 'petId' is set - if (petId === undefined || petId === null) { - throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); - } - - // verify the required parameter 'file' is set - if (file === undefined || file === null) { - throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); - } - - - let pathParams = { - 'petId': petId - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - 'additionalMetadata': opts['additionalMetadata'], - 'file': file - }; - - let authNames = ['petstore_auth']; - let contentTypes = ['multipart/form-data']; - let accepts = ['application/json']; - let returnType = ApiResponse; - - return this.apiClient.callApi( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - } diff --git a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index bfdbe52f3749..fa41841dab26 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -108,7 +108,6 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md index eadf2039c51b..3a402233a9ec 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -391,53 +390,3 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json - -# **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, file, opts) - -uploads an image - -### Example -```javascript -import OpenApiPetstore from 'open_api_petstore'; -let defaultClient = OpenApiPetstore.ApiClient.instance; - -// Configure OAuth2 access token for authorization: petstore_auth -let petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -let apiInstance = new OpenApiPetstore.PetApi(); -let petId = 789; // Number | ID of pet to update -let file = "/path/to/file"; // File | file to upload -let opts = { - 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server -}; -apiInstance.uploadFileWithRequiredFile(petId, file, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Number**| ID of pet to update | - **file** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - diff --git a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js index 9da0f136bebe..a8a8d91c9502 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js @@ -456,67 +456,4 @@ export default class PetApi { } - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response - */ - uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) { - opts = opts || {}; - let postBody = null; - - // verify the required parameter 'petId' is set - if (petId === undefined || petId === null) { - throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); - } - - // verify the required parameter 'file' is set - if (file === undefined || file === null) { - throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); - } - - - let pathParams = { - 'petId': petId - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - 'additionalMetadata': opts['additionalMetadata'], - 'file': file - }; - - let authNames = ['petstore_auth']; - let contentTypes = ['multipart/form-data']; - let accepts = ['application/json']; - let returnType = ApiResponse; - - return this.apiClient.callApi( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType - ); - } - - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} - */ - uploadFileWithRequiredFile(petId, file, opts) { - return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - } diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index 8cb5a9b477f5..a78275aee673 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -132,7 +132,6 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md index 7d9cfc0134f1..28469bc95a1c 100644 --- a/samples/client/petstore/javascript-promise/docs/PetApi.md +++ b/samples/client/petstore/javascript-promise/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -383,52 +382,3 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json - -# **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, file, opts) - -uploads an image - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | ID of pet to update -var file = "/path/to/file"; // File | file to upload -var opts = { - 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server -}; -apiInstance.uploadFileWithRequiredFile(petId, file, opts).then(function(data) { - console.log('API called successfully. Returned data: ' + data); -}, function(error) { - console.error(error); -}); - -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Number**| ID of pet to update | - **file** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index 68a41803ca88..435175dc8d6b 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js index 2ddf6a4c78a7..7821ec7a222e 100644 --- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 31a2cc5697ab..8b07f17c78f9 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js index a94f1da8c72d..7293a03fe8eb 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js index aa3fb392389c..68d7bd7e1022 100644 --- a/samples/client/petstore/javascript-promise/src/api/PetApi.js +++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * @@ -488,71 +488,6 @@ return response_and_data.data; }); } - - - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response - */ - this.uploadFileWithRequiredFileWithHttpInfo = function(petId, file, opts) { - opts = opts || {}; - var postBody = null; - - // verify the required parameter 'petId' is set - if (petId === undefined || petId === null) { - throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); - } - - // verify the required parameter 'file' is set - if (file === undefined || file === null) { - throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); - } - - - var pathParams = { - 'petId': petId - }; - var queryParams = { - }; - var collectionQueryParams = { - }; - var headerParams = { - }; - var formParams = { - 'additionalMetadata': opts['additionalMetadata'], - 'file': file - }; - - var authNames = ['petstore_auth']; - var contentTypes = ['multipart/form-data']; - var accepts = ['application/json']; - var returnType = ApiResponse; - - return this.apiClient.callApi( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType - ); - } - - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse} - */ - this.uploadFileWithRequiredFile = function(petId, file, opts) { - return this.uploadFileWithRequiredFileWithHttpInfo(petId, file, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } }; return exports; diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index 7da89a389c8a..c4b2f93bbc0d 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js index 5d998ec12f1a..4942cbc464b3 100644 --- a/samples/client/petstore/javascript-promise/src/api/UserApi.js +++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js index 501429c714a7..25685095fb2f 100644 --- a/samples/client/petstore/javascript-promise/src/index.js +++ b/samples/client/petstore/javascript-promise/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js index 2d54186ad863..08572d900840 100644 --- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js index 716623465cc5..29376d771bfc 100644 --- a/samples/client/petstore/javascript-promise/src/model/Animal.js +++ b/samples/client/petstore/javascript-promise/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js index 55f624ee6765..e1a4797eec19 100644 --- a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js index c215c0e5a7a4..5c112418181d 100644 --- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js index 256e93e7e35b..024c26469df3 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js index 03b6ca2ed5ac..ca79a7c2a6d0 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js index b23ae3922b25..01b97a1b5809 100644 --- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js index 07d953ad09f8..05934fb253ce 100644 --- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js index bd1c37fddf04..10b787fed4eb 100644 --- a/samples/client/petstore/javascript-promise/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js index 6e3eb81b825b..c289c6b8e5bd 100644 --- a/samples/client/petstore/javascript-promise/src/model/Category.js +++ b/samples/client/petstore/javascript-promise/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js index 6356546b5718..6edd8fbadd04 100644 --- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js index 45aef43867e0..e563bcf7ea59 100644 --- a/samples/client/petstore/javascript-promise/src/model/Client.js +++ b/samples/client/petstore/javascript-promise/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js index 151eab76c00d..c308f3dc9f11 100644 --- a/samples/client/petstore/javascript-promise/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js index 7eac55a5a61a..07d52b119db0 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js index 89fce871cd52..d4a9f39f5661 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js index caecbeb1fec0..4dfc6753323a 100644 --- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js index b9461c3de345..6c5986d48985 100644 --- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js index 4995eb62ae73..484fd0c99910 100644 --- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js index 7a67414e7d3a..ab3c2e34e343 100644 --- a/samples/client/petstore/javascript-promise/src/model/List.js +++ b/samples/client/petstore/javascript-promise/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js index c677dd92d383..adf82a358c28 100644 --- a/samples/client/petstore/javascript-promise/src/model/MapTest.js +++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 8da729262d6a..62c7a2f59e32 100644 --- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js index 0b974172bdb7..84131169fb13 100644 --- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js index 15f47bf8cfc4..87484d2ee234 100644 --- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js index 74e73f93bbc4..8c851c4cec54 100644 --- a/samples/client/petstore/javascript-promise/src/model/Name.js +++ b/samples/client/petstore/javascript-promise/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js index db55400362f2..389ad08e8c5c 100644 --- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js index 49d91d874db3..bfd5f3714bef 100644 --- a/samples/client/petstore/javascript-promise/src/model/Order.js +++ b/samples/client/petstore/javascript-promise/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js index 769e2752c2d8..b4fc48476dee 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js index 62fd6c0cf1a5..9e1f532b44d0 100644 --- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js index 08b9d2269e67..55997490b789 100644 --- a/samples/client/petstore/javascript-promise/src/model/Pet.js +++ b/samples/client/petstore/javascript-promise/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js index e9b320969575..1b0ae1104cc6 100644 --- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js index b6df224a024c..22464bbe7a25 100644 --- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js index 898ac6ba5e0a..9e4f88b0872e 100644 --- a/samples/client/petstore/javascript-promise/src/model/Tag.js +++ b/samples/client/petstore/javascript-promise/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js index 6ea6b2b8017b..06d4e6e7ad0a 100644 --- a/samples/client/petstore/javascript-promise/src/model/User.js +++ b/samples/client/petstore/javascript-promise/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index d21f8d30584e..9d9637737d0c 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -135,7 +135,6 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md index 3273a109e81a..fbcca8372ccc 100644 --- a/samples/client/petstore/javascript/docs/PetApi.md +++ b/samples/client/petstore/javascript/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image @@ -399,54 +398,3 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json - -# **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, file, opts) - -uploads an image - -### Example -```javascript -var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OpenApiPetstore.PetApi(); -var petId = 789; // Number | ID of pet to update -var file = "/path/to/file"; // File | file to upload -var opts = { - 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.uploadFileWithRequiredFile(petId, file, opts, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Number**| ID of pet to update | - **file** | **File**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index f0238f93f166..f43711962b0a 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js index c4bc23dc811a..73b690b0d56d 100644 --- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js +++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 9da453623b29..71cb70f8be7c 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js index 12e2115255d4..469890d60bbb 100644 --- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js +++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js index 74837e68cb04..840cb2fa67e9 100644 --- a/samples/client/petstore/javascript/src/api/PetApi.js +++ b/samples/client/petstore/javascript/src/api/PetApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * @@ -441,64 +441,6 @@ authNames, contentTypes, accepts, returnType, callback ); } - - /** - * Callback function to receive the result of the uploadFileWithRequiredFile operation. - * @callback module:api/PetApi~uploadFileWithRequiredFileCallback - * @param {String} error Error message, if any. - * @param {module:model/ApiResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * uploads an image - * @param {Number} petId ID of pet to update - * @param {File} file file to upload - * @param {Object} opts Optional parameters - * @param {String} opts.additionalMetadata Additional data to pass to server - * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/ApiResponse} - */ - this.uploadFileWithRequiredFile = function(petId, file, opts, callback) { - opts = opts || {}; - var postBody = null; - - // verify the required parameter 'petId' is set - if (petId === undefined || petId === null) { - throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); - } - - // verify the required parameter 'file' is set - if (file === undefined || file === null) { - throw new Error("Missing the required parameter 'file' when calling uploadFileWithRequiredFile"); - } - - - var pathParams = { - 'petId': petId - }; - var queryParams = { - }; - var collectionQueryParams = { - }; - var headerParams = { - }; - var formParams = { - 'additionalMetadata': opts['additionalMetadata'], - 'file': file - }; - - var authNames = ['petstore_auth']; - var contentTypes = ['multipart/form-data']; - var accepts = ['application/json']; - var returnType = ApiResponse; - - return this.apiClient.callApi( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } }; return exports; diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index 2037d0ab0fab..ba2c675ec771 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js index 4b19a6dfb7f1..d3e3b8513c55 100644 --- a/samples/client/petstore/javascript/src/api/UserApi.js +++ b/samples/client/petstore/javascript/src/api/UserApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js index 501429c714a7..25685095fb2f 100644 --- a/samples/client/petstore/javascript/src/index.js +++ b/samples/client/petstore/javascript/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js index 2d54186ad863..08572d900840 100644 --- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js index 716623465cc5..29376d771bfc 100644 --- a/samples/client/petstore/javascript/src/model/Animal.js +++ b/samples/client/petstore/javascript/src/model/Animal.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js index 55f624ee6765..e1a4797eec19 100644 --- a/samples/client/petstore/javascript/src/model/AnimalFarm.js +++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js index c215c0e5a7a4..5c112418181d 100644 --- a/samples/client/petstore/javascript/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript/src/model/ApiResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js index 256e93e7e35b..024c26469df3 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js index 03b6ca2ed5ac..ca79a7c2a6d0 100644 --- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js index b23ae3922b25..01b97a1b5809 100644 --- a/samples/client/petstore/javascript/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript/src/model/ArrayTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js index 07d953ad09f8..05934fb253ce 100644 --- a/samples/client/petstore/javascript/src/model/Capitalization.js +++ b/samples/client/petstore/javascript/src/model/Capitalization.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js index bd1c37fddf04..10b787fed4eb 100644 --- a/samples/client/petstore/javascript/src/model/Cat.js +++ b/samples/client/petstore/javascript/src/model/Cat.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js index 6e3eb81b825b..c289c6b8e5bd 100644 --- a/samples/client/petstore/javascript/src/model/Category.js +++ b/samples/client/petstore/javascript/src/model/Category.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js index 6356546b5718..6edd8fbadd04 100644 --- a/samples/client/petstore/javascript/src/model/ClassModel.js +++ b/samples/client/petstore/javascript/src/model/ClassModel.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js index 45aef43867e0..e563bcf7ea59 100644 --- a/samples/client/petstore/javascript/src/model/Client.js +++ b/samples/client/petstore/javascript/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js index 151eab76c00d..c308f3dc9f11 100644 --- a/samples/client/petstore/javascript/src/model/Dog.js +++ b/samples/client/petstore/javascript/src/model/Dog.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js index 7eac55a5a61a..07d52b119db0 100644 --- a/samples/client/petstore/javascript/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript/src/model/EnumArrays.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js index 89fce871cd52..d4a9f39f5661 100644 --- a/samples/client/petstore/javascript/src/model/EnumClass.js +++ b/samples/client/petstore/javascript/src/model/EnumClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js index caecbeb1fec0..4dfc6753323a 100644 --- a/samples/client/petstore/javascript/src/model/EnumTest.js +++ b/samples/client/petstore/javascript/src/model/EnumTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js index b9461c3de345..6c5986d48985 100644 --- a/samples/client/petstore/javascript/src/model/FormatTest.js +++ b/samples/client/petstore/javascript/src/model/FormatTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js index 4995eb62ae73..484fd0c99910 100644 --- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js index 7a67414e7d3a..ab3c2e34e343 100644 --- a/samples/client/petstore/javascript/src/model/List.js +++ b/samples/client/petstore/javascript/src/model/List.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js index c677dd92d383..adf82a358c28 100644 --- a/samples/client/petstore/javascript/src/model/MapTest.js +++ b/samples/client/petstore/javascript/src/model/MapTest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 8da729262d6a..62c7a2f59e32 100644 --- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js index 0b974172bdb7..84131169fb13 100644 --- a/samples/client/petstore/javascript/src/model/Model200Response.js +++ b/samples/client/petstore/javascript/src/model/Model200Response.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js index 15f47bf8cfc4..87484d2ee234 100644 --- a/samples/client/petstore/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore/javascript/src/model/ModelReturn.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js index 74e73f93bbc4..8c851c4cec54 100644 --- a/samples/client/petstore/javascript/src/model/Name.js +++ b/samples/client/petstore/javascript/src/model/Name.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js index db55400362f2..389ad08e8c5c 100644 --- a/samples/client/petstore/javascript/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript/src/model/NumberOnly.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js index 49d91d874db3..bfd5f3714bef 100644 --- a/samples/client/petstore/javascript/src/model/Order.js +++ b/samples/client/petstore/javascript/src/model/Order.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js index 769e2752c2d8..b4fc48476dee 100644 --- a/samples/client/petstore/javascript/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript/src/model/OuterComposite.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js index 62fd6c0cf1a5..9e1f532b44d0 100644 --- a/samples/client/petstore/javascript/src/model/OuterEnum.js +++ b/samples/client/petstore/javascript/src/model/OuterEnum.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js index 08b9d2269e67..55997490b789 100644 --- a/samples/client/petstore/javascript/src/model/Pet.js +++ b/samples/client/petstore/javascript/src/model/Pet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js index e9b320969575..1b0ae1104cc6 100644 --- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js index b6df224a024c..22464bbe7a25 100644 --- a/samples/client/petstore/javascript/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js index 898ac6ba5e0a..9e4f88b0872e 100644 --- a/samples/client/petstore/javascript/src/model/Tag.js +++ b/samples/client/petstore/javascript/src/model/Tag.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js index 6ea6b2b8017b..06d4e6e7ad0a 100644 --- a/samples/client/petstore/javascript/src/model/User.js +++ b/samples/client/petstore/javascript/src/model/User.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.2-SNAPSHOT * * Do not edit the class manually. * diff --git a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java index 98733af6be9c..3aa2ec3d55c3 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Order.java @@ -31,6 +31,7 @@ public class Order { @ApiModelProperty(value = "") private Date shipDate = null; + @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java index e477f2bac509..c7e7cda691e2 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java @@ -37,6 +37,7 @@ public class Pet { @ApiModelProperty(value = "") private List tags = null; + @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index 36fecb1dd44c..e57006827b99 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h index 48a9763a971e..24d89beeb61e 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove an apiKey for an identifier, just set the apiKey to nil. + * To remove a apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h index aeac8955cc1e..e51705deb256 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index 36fecb1dd44c..e57006827b99 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -193,7 +193,7 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (status != nil) { - queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"]; + queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; @@ -250,7 +250,7 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; if (tags != nil) { - queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"]; + queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"]; } NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders]; [headerParams addEntriesFromDictionary:self.defaultHeaders]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h index 48a9763a971e..24d89beeb61e 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGDefaultConfiguration.h @@ -93,7 +93,7 @@ /** * Sets API key * - * To remove an apiKey for an identifier, just set the apiKey to nil. + * To remove a apiKey for an identifier, just set the apiKey to nil. * * @param apiKey API key or token. * @param identifier API key identifier (authentication schema). diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h index aeac8955cc1e..e51705deb256 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGResponseDeserializer.h @@ -49,7 +49,7 @@ extern NSInteger const SWGUnknownResponseObjectErrorCode; @interface SWGResponseDeserializer : NSObject /** - * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored + * If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * @default NO */ @property (nonatomic, assign) BOOL treatNullAsError; diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 8180f2514f7d..7b381e92c825 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -363,7 +363,6 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 9956e4adabbd..57f579884246 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -412,7 +412,7 @@ Name | Type | Description | Notes **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] **enum_query_double** | **double**| Query parameter enum test (double) | [optional] - **enum_form_string_array** | [**ARRAY[string]**](string.md)| Form parameter enum test (string array) | [optional] [default to '$'] + **enum_form_string_array** | **ARRAY[string]**| Form parameter enum test (string array) | [optional] [default to '$'] **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] ### Return type diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index f0edd9e6fad1..5ad3f6f41fa1 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -17,7 +17,6 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -410,54 +409,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file_with_required_file** -> ApiResponse upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata) - -uploads an image - -### Example -```perl -use Data::Dumper; -use WWW::OpenAPIClient::PetApi; -my $api_instance = WWW::OpenAPIClient::PetApi->new( - - # Configure OAuth2 access token for authorization: petstore_auth - access_token => 'YOUR_ACCESS_TOKEN', -); - -my $pet_id = 789; # int | ID of pet to update -my $file = "/path/to/file"; # string | file to upload -my $additional_metadata = "additional_metadata_example"; # string | Additional data to pass to server - -eval { - my $result = $api_instance->upload_file_with_required_file(pet_id => $pet_id, file => $file, additional_metadata => $additional_metadata); - print Dumper($result); -}; -if ($@) { - warn "Exception when calling PetApi->upload_file_with_required_file: $@\n"; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **file** | **string****string**| file to upload | - **additional_metadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 645181bfda67..4bbf6bc58cec 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -616,99 +616,4 @@ sub upload_file { return $_response_object; } -# -# upload_file_with_required_file -# -# uploads an image -# -# @param int $pet_id ID of pet to update (required) -# @param string $file file to upload (required) -# @param string $additional_metadata Additional data to pass to server (optional) -{ - my $params = { - 'pet_id' => { - data_type => 'int', - description => 'ID of pet to update', - required => '1', - }, - 'file' => { - data_type => 'string', - description => 'file to upload', - required => '1', - }, - 'additional_metadata' => { - data_type => 'string', - description => 'Additional data to pass to server', - required => '0', - }, - }; - __PACKAGE__->method_documentation->{ 'upload_file_with_required_file' } = { - summary => 'uploads an image', - params => $params, - returns => 'ApiResponse', - }; -} -# @return ApiResponse -# -sub upload_file_with_required_file { - my ($self, %args) = @_; - - # verify the required parameter 'pet_id' is set - unless (exists $args{'pet_id'}) { - croak("Missing the required parameter 'pet_id' when calling upload_file_with_required_file"); - } - - # verify the required parameter 'file' is set - unless (exists $args{'file'}) { - croak("Missing the required parameter 'file' when calling upload_file_with_required_file"); - } - - # parse inputs - my $_resource_path = '/pet/{petId}/uploadImageWithRequiredFile'; - - my $_method = 'POST'; - my $query_params = {}; - my $header_params = {}; - my $form_params = {}; - - # 'Accept' and 'Content-Type' header - my $_header_accept = $self->{api_client}->select_header_accept('application/json'); - if ($_header_accept) { - $header_params->{'Accept'} = $_header_accept; - } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('multipart/form-data'); - - # path params - if ( exists $args{'pet_id'}) { - my $_base_variable = "{" . "petId" . "}"; - my $_base_value = $self->{api_client}->to_path_value($args{'pet_id'}); - $_resource_path =~ s/$_base_variable/$_base_value/g; - } - - # form params - if ( exists $args{'additional_metadata'} ) { - $form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'}); - } - - # form params - if ( exists $args{'file'} ) { - $form_params->{'file'} = [] unless defined $form_params->{'file'}; - push @{$form_params->{'file'}}, $args{'file'}; - } - - my $_body_data; - # authentication setting, if any - my $auth_settings = [qw(petstore_auth )]; - - # make the API Call - my $response = $self->{api_client}->call_api($_resource_path, $_method, - $query_params, $form_params, - $header_params, $_body_data, $auth_settings); - if (!$response) { - return; - } - my $_response_object = $self->{api_client}->deserialize('ApiResponse', $response); - return $_response_object; -} - 1; diff --git a/samples/client/petstore/php/.openapi-generator/VERSION b/samples/client/petstore/php/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 1c668d963da4..5892fe3245c9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 15628291dd32..2c40a01b4f9a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index ffe6a623b71f..69df7f8229e1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 99298cdee5e6..3d3ed046e9d5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 76f1da432d84..e49133d4642a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 84226530cfa6..7e7254b0dcb4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index a0a5b4d1caf9..068489bf3f4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index b58313a42200..f6f11acaecca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index dcf3363c78b8..956e562e07d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index ae5f3dc3de83..24d099ae9f10 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 16aef52de050..8cfaeb0339fc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 78c16fa1bb60..6ab8fb874bc0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index b8764bf3724b..530b447626fe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 1fdcfffbeedc..140a4f65936a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 392af57b47e7..4220ab9f4068 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 2a11f3de6e1d..b2b0c4e2d7ee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index ff26cc123c08..1afa94edbe40 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 665cc61a838e..3a67d13acdb8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index e90f161fe02e..6055eacb00af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 2dd300ddc45c..be2145fd847a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 82e0ee402985..138823eb93d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index c404888a0eb9..a53c8c10e22e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index f12665f5e842..4af4453992ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index e44e9eb161df..997deb17631c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 561f5593bcfe..f676cf2e7fde 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 265daee0ddb5..e8237af335da 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index ba3d46a72385..5950e75f499c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index e0c38408559a..2785e00ef118 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 920dbcf94212..2483418c5cd6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index d4d0d61eab42..78dd064c91b9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index c0d21323450c..f77147b51d0d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8798057ca349..8f98802b36dc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 9c1d061f252f..7bed78ef1176 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index d42800f3a268..eb4042a1bde0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 4a7c1fcc7eba..3999135c65e0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index a88c4e6313a1..ca3bb50cc9b3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index c2a7377ffa0f..007d98995d4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 59c373db531c..656697e8c3d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 031a73710ef1..ff148524cd8b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index ff00acc3059f..41a2cd355e75 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index f95ca0cc8175..b34310013a42 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index bb725bce935f..0511bd8584af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index ec4001d71821..e2e89e4dfd77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 52fc6524d173..a7760c6c3bce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index efb1f5fcc4fd..86dda5841001 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 831c2c685f6e..32b60cb7858b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index d45a51364a67..b22c8952fce7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 691be928897c..38768c8cc22d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 668501cbf5d1..60d3ba37641a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 38b46ff60d2e..6d46e33d3f7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 367699196e60..53fb98b6f8fe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index 9a79dce72cb9..bad9a4ff7a21 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 087bf5139b94..77cf8d8c377c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index aa4ec27b52cc..3d7897cb6f77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 6e82cd038de0..86f6e08d5922 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index da50230be508..9af38b98cd6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index 6ffa97a2f5eb..ad347c5a3955 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 27415e821364..bf4a244db51d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 1f8efed8125a..3d602e2afdb5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 36e5c38b5c43..74744243a388 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index fb437b3b8c0d..367a01281dbe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 77efed5cb06d..97b2fe4b3137 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index e6f29e2cec7d..95caf5749fd1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 9a8f9d10ef35..97a411bf54ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index a9d6cd7fac6f..c361a07c2abe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index eefd2eb83f52..2d221b46b692 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index c5161755b52b..23c6cda8037b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index bb698360fff2..97d9ff1d26ca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index c3f347e1bdaa..59b0439fd2b7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 35d7a9f5205c..63a65ea552f7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 532d82516998..d305c67d1074 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 66650ee5bf57..239ac38847a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 226a12786fe0..ac28f1b19099 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 978ee08944b9..8569ae423f22 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 479ed393069c..28f3046abad7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 953fe0a76540..5626620b2117 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 736bcebb1c72..451224e892d4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index fd20e51d581e..6474554c55ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index e6b5d5e97420..a136d3003ec4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 226fb97b0608..c974fb9c8f68 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 17baa78ef02d..9081228bc6b5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 68734c49de25..1a49a5d3971a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 3e4a4822df6d..70f353f41f02 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index c50d3da406ba..b88da343a42c 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -90,7 +90,6 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-asyncio/docs/PetApi.md b/samples/client/petstore/python-asyncio/docs/PetApi.md index 2454a3e61515..748cf407ea45 100644 --- a/samples/client/petstore/python-asyncio/docs/PetApi.md +++ b/samples/client/petstore/python-asyncio/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -429,57 +428,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file_with_required_file** -> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - -uploads an image - -### Example -```python -from __future__ import print_function -import time -import petstore_api -from petstore_api.rest import ApiException -from pprint import pprint - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration() -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -file = '/path/to/file' # file | file to upload -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) - -try: - # uploads an image - api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **file** | **file**| file to upload | - **additional_metadata** | **str**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 51acaabb45df..5b62a0b12a5c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -803,112 +803,3 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - return data - - def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 - all_params.append('async') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method upload_file_with_required_file" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): - raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 - # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): - raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['multipart/form-data']) # noqa: E501 - - # Authentication setting - auth_settings = ['petstore_auth'] # noqa: E501 - - return self.api_client.call_api( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ApiResponse', # noqa: E501 - auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index c548ce4e2898..cff6604b98b2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return an original value. + """Return a original value. :return: object. """ diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index c50d3da406ba..b88da343a42c 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -90,7 +90,6 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python-tornado/docs/PetApi.md b/samples/client/petstore/python-tornado/docs/PetApi.md index 2454a3e61515..748cf407ea45 100644 --- a/samples/client/petstore/python-tornado/docs/PetApi.md +++ b/samples/client/petstore/python-tornado/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -429,57 +428,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file_with_required_file** -> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - -uploads an image - -### Example -```python -from __future__ import print_function -import time -import petstore_api -from petstore_api.rest import ApiException -from pprint import pprint - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration() -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -file = '/path/to/file' # file | file to upload -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) - -try: - # uploads an image - api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **file** | **file**| file to upload | - **additional_metadata** | **str**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 51acaabb45df..5b62a0b12a5c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -803,112 +803,3 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - return data - - def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 - all_params.append('async') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method upload_file_with_required_file" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): - raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 - # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): - raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['multipart/form-data']) # noqa: E501 - - # Authentication setting - auth_settings = ['petstore_auth'] # noqa: E501 - - return self.api_client.call_api( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ApiResponse', # noqa: E501 - auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 65e37617061a..a98c0247a0ce 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -547,7 +547,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return an original value. + """Return a original value. :return: object. """ diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index c50d3da406ba..b88da343a42c 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -90,7 +90,6 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image *StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID diff --git a/samples/client/petstore/python/docs/PetApi.md b/samples/client/petstore/python/docs/PetApi.md index 2454a3e61515..748cf407ea45 100644 --- a/samples/client/petstore/python/docs/PetApi.md +++ b/samples/client/petstore/python/docs/PetApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet [**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data [**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image # **add_pet** @@ -429,57 +428,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **upload_file_with_required_file** -> ApiResponse upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - -uploads an image - -### Example -```python -from __future__ import print_function -import time -import petstore_api -from petstore_api.rest import ApiException -from pprint import pprint - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration() -configuration.access_token = 'YOUR_ACCESS_TOKEN' - -# create an instance of the API class -api_instance = petstore_api.PetApi(petstore_api.ApiClient(configuration)) -pet_id = 56 # int | ID of pet to update -file = '/path/to/file' # file | file to upload -additional_metadata = 'additional_metadata_example' # str | Additional data to pass to server (optional) - -try: - # uploads an image - api_response = api_instance.upload_file_with_required_file(pet_id, file, additional_metadata=additional_metadata) - pprint(api_response) -except ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **file** | **file**| file to upload | - **additional_metadata** | **str**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 51acaabb45df..5b62a0b12a5c 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -803,112 +803,3 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def upload_file_with_required_file(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async'): - return self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, file, **kwargs) # noqa: E501 - return data - - def upload_file_with_required_file_with_http_info(self, pet_id, file, **kwargs): # noqa: E501 - """uploads an image # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async=True - >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, file, async=True) - >>> result = thread.get() - - :param async bool - :param int pet_id: ID of pet to update (required) - :param file file: file to upload (required) - :param str additional_metadata: Additional data to pass to server - :return: ApiResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pet_id', 'file', 'additional_metadata'] # noqa: E501 - all_params.append('async') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method upload_file_with_required_file" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pet_id' is set - if ('pet_id' not in params or - params['pet_id'] is None): - raise ValueError("Missing the required parameter `pet_id` when calling `upload_file_with_required_file`") # noqa: E501 - # verify the required parameter 'file' is set - if ('file' not in params or - params['file'] is None): - raise ValueError("Missing the required parameter `file` when calling `upload_file_with_required_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'pet_id' in params: - path_params['petId'] = params['pet_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - if 'additional_metadata' in params: - form_params.append(('additionalMetadata', params['additional_metadata'])) # noqa: E501 - if 'file' in params: - local_var_files['file'] = params['file'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['multipart/form-data']) # noqa: E501 - - # Authentication setting - auth_settings = ['petstore_auth'] # noqa: E501 - - return self.api_client.call_api( - '/pet/{petId}/uploadImageWithRequiredFile', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ApiResponse', # noqa: E501 - auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index b5396239330c..432ab964f37a 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -545,7 +545,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return an original value. + """Return a original value. :return: object. """ diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 2a86f13e4d95..25dbee09b276 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 187b736a24d8..78879ac2e5a1 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 0946ee27ceae..b4237e244c69 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index d0864b4b7ab4..2e27e128be82 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index e75f9b6c2298..832162bed17e 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 49da82985674..0e52d0a743bf 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 5ecbdfd50e22..7d1b45571a6c 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 4e771e8a2b37..dd8fb16206b0 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 7fcd202fce20..c54635b3c5d9 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 9ff223719679..6c64471e150d 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 3ddfd105b77b..b3846c26d85d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index a0c80f7c9ae1..baf9784d3ade 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index bb6161841373..913f3916599d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index e9362b5f0cb7..5801264dd3c6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 203e2ac4e4fd..df1167ba60c3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index a2a00019fdf8..372ec29a2990 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index e5a3dca4283a..fc7eb19fdb31 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index b38681f0a486..8bc848210a6f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index c98a8a1bf0b3..2f9b6c9c6b7c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 5ef3ab0c05f6..7a9a37252052 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index 3bfd6c21c512..4f07b8eb7c6c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index b2132d0b3420..1d10bb83a536 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 8a22808a7922..f66c7b6b5b9e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index bd96b8c94156..1ce7d829787f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 52c11823e708..5cd8f3eebc1b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 2917701281fa..6ffbda5b541d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index fb6ec93fbb14..57f5859c2053 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index fefc61d11fcc..3b9520c7a807 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index 565efc08f796..053754d2fda2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 080986f43c90..8a77d872974b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index c2708ce6e663..6272eb532f26 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 9461275477ea..b2e578955878 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 33db52e9b8f1..24a4effe95c5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 6ec761db2cda..16623c9172af 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 9cb549a9bf61..9cc706162f27 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 15c5bf89e911..894d5657698e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 023acf4fbde2..312f149ab96f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index d85af07c5241..b640af3dd514 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 1bc456006fb7..441e29665ed7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index b5da2959fa7c..3422f98e985f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index f5992f5f356a..cac6fc0d6974 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index d8a5a00cf602..1622c832086d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 3d890741aa44..1a0b96fcb20f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 1afecd51de62..ff566ba51c3c 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 4c466dd232a8..2f6a64862156 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3-SNAPSHOT +OpenAPI Generator version: 3.0.3 =end diff --git a/samples/client/petstore/rust/.openapi-generator/VERSION b/samples/client/petstore/rust/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/rust/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scalaz/.openapi-generator/VERSION b/samples/client/petstore/scalaz/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/scalaz/.openapi-generator/VERSION +++ b/samples/client/petstore/scalaz/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 896fb02af725..546a211d4295 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index f175d2a42ade..520cf12f33dd 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 1a18bd119980..168658b65700 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 5d11918504b1..c1ca6d4eed1c 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 9f4feecd01a5..b4eef869ca33 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index ff7b38263c83..9d14f976e9ea 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift/default/.openapi-generator/VERSION b/samples/client/petstore/swift/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/swift/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md deleted file mode 100644 index e0acf722db1d..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md +++ /dev/null @@ -1,1297 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg)](https://travis-ci.org/Alamofire/Alamofire) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) - -Alamofire is an HTTP networking library written in Swift. - -## Features - -- [x] Chainable Request / Response methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download using Request or Resume data -- [x] Authentication with NSURLCredential -- [x] HTTP Response Validation -- [x] TLS Certificate and Public Key Pinning -- [x] Progress Closure & NSProgress -- [x] cURL Debug Output -- [x] Comprehensive Unit Test Coverage -- [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -* [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -* [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `NSURLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 7.3+ - -## Migration Guides - -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication - -- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). (Tag 'alamofire') -- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). -- If you **found a bug**, open an issue. -- If you **have a feature request**, open an issue. -- If you **want to contribute**, submit a pull request. - -## Installation - -> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** -> -> Alamofire is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Alamofire ecosystem. - -### CocoaPods - -[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 0.39.0+ is required to build Alamofire 3.0.0+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '9.0' -use_frameworks! - -target '' do - pod 'Alamofire', '~> 3.4' -end -``` - -Then, run the following command: - -```bash -$ pod install -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](http://brew.sh/) using the following command: - -```bash -$ brew update -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 3.4 -``` - -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - -### Manually - -If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - -```bash -$ git init -``` - -- Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: - -```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS` or `Alamofire OSX`. - -- And that's it! - -> The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - ---- - -## Usage - -### Making a Request - -```swift -import Alamofire - -Alamofire.request(.GET, "https://httpbin.org/get") -``` - -### Response Handling - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .responseJSON { response in - print(response.request) // original URL request - print(response.response) // URL response - print(response.data) // server data - print(response.result) // result of response serialization - - if let JSON = response.result.value { - print("JSON: \(JSON)") - } - } -``` - -> Networking in Alamofire is done _asynchronously_. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are [very good reasons](https://developer.apple.com/library/ios/qa/qa1693/_index.html) for doing it this way. - -> Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler. - -### Validation - -By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. - -#### Manual Validation - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate(statusCode: 200..<300) - .validate(contentType: ["application/json"]) - .response { response in - print(response) - } -``` - -#### Automatic Validation - -Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { response in - switch response.result { - case .Success: - print("Validation Successful") - case .Failure(let error): - print(error) - } - } -``` - -### Response Serialization - -**Built-in Response Methods** - -- `response()` -- `responseData()` -- `responseString(encoding: NSStringEncoding)` -- `responseJSON(options: NSJSONReadingOptions)` -- `responsePropertyList(options: NSPropertyListReadOptions)` - -#### Response Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .response { request, response, data, error in - print(request) - print(response) - print(data) - print(error) - } -``` - -> The `response` serializer does NOT evaluate any of the response data. It merely forwards on all the information directly from the URL session delegate. We strongly encourage you to leverage the other response serializers taking advantage of `Response` and `Result` types. - -#### Response Data Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseData { response in - print(response.request) - print(response.response) - print(response.result) - } -``` - -#### Response String Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseString { response in - print("Success: \(response.result.isSuccess)") - print("Response String: \(response.result.value)") - } -``` - -#### Response JSON Handler - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseJSON { response in - debugPrint(response) - } -``` - -#### Chained Response Handlers - -Response handlers can even be chained: - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") - .validate() - .responseString { response in - print("Response String: \(response.result.value)") - } - .responseJSON { response in - print("Response JSON: \(response.result.value)") - } -``` - -### HTTP Methods - -`Alamofire.Method` lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): - -```swift -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT -} -``` - -These values can be passed as the first argument of the `Alamofire.request` method: - -```swift -Alamofire.request(.POST, "https://httpbin.org/post") - -Alamofire.request(.PUT, "https://httpbin.org/put") - -Alamofire.request(.DELETE, "https://httpbin.org/delete") -``` - -### Parameters - -#### GET Request With URL-Encoded Parameters - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) -// https://httpbin.org/get?foo=bar -``` - -#### POST Request With URL-Encoded Parameters - -```swift -let parameters = [ - "foo": "bar", - "baz": ["a", 1], - "qux": [ - "x": 1, - "y": 2, - "z": 3 - ] -] - -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters) -// HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 -``` - -### Parameter Encoding - -Parameters can also be encoded as JSON, Property List, or any custom format, using the `ParameterEncoding` enum: - -```swift -enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(format: NSPropertyListFormat, options: NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - func encode(request: NSURLRequest, parameters: [String: AnyObject]?) -> (NSURLRequest, NSError?) - { ... } -} -``` - -- `URL`: A query string to be set as or appended to any existing URL query for `GET`, `HEAD`, and `DELETE` requests, or set as the body for requests with any other HTTP method. The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded`. _Since there is no published specification for how to encode collection types, Alamofire follows the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`)._ -- `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same implementation as the `.URL` case, but always applies the encoded result to the URL. -- `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -- `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. -- `Custom`: Uses the associated closure value to construct a new request given an existing request and parameters. - -#### Manual Parameter Encoding of an NSURLRequest - -```swift -let URL = NSURL(string: "https://httpbin.org/get")! -var request = NSMutableURLRequest(URL: URL) - -let parameters = ["foo": "bar"] -let encoding = Alamofire.ParameterEncoding.URL -(request, _) = encoding.encode(request, parameters: parameters) -``` - -#### POST Request with JSON-encoded Parameters - -```swift -let parameters = [ - "foo": [1,2,3], - "bar": [ - "baz": "qux" - ] -] - -Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters, encoding: .JSON) -// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} -``` - -### HTTP Headers - -Adding a custom HTTP header to a `Request` is supported directly in the global `request` method. This makes it easy to attach HTTP headers to a `Request` that can be constantly changing. - -> For HTTP headers that do not change, it is recommended to set them on the `NSURLSessionConfiguration` so they are automatically applied to any `NSURLSessionTask` created by the underlying `NSURLSession`. - -```swift -let headers = [ - "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", - "Accept": "application/json" -] - -Alamofire.request(.GET, "https://httpbin.org/get", headers: headers) - .responseJSON { response in - debugPrint(response) - } -``` - -### Caching - -Caching is handled on the system framework level by [`NSURLCache`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache). - -### Uploading - -**Supported Upload Types** - -- File -- Data -- Stream -- MultipartFormData - -#### Uploading a File - -```swift -let fileURL = NSBundle.mainBundle().URLForResource("Default", withExtension: "png") -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) -``` - -#### Uploading with Progress - -```swift -Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) - .progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in - print(totalBytesWritten) - - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes written on main queue: \(totalBytesWritten)") - } - } - .validate() - .responseJSON { response in - debugPrint(response) - } -``` - -#### Uploading MultipartFormData - -```swift -Alamofire.upload( - .POST, - "https://httpbin.org/post", - multipartFormData: { multipartFormData in - multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn") - multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow") - }, - encodingCompletion: { encodingResult in - switch encodingResult { - case .Success(let upload, _, _): - upload.responseJSON { response in - debugPrint(response) - } - case .Failure(let encodingError): - print(encodingError) - } - } -) -``` - -### Downloading - -**Supported Download Types** - -- Request -- Resume Data - -#### Downloading a File - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100") { temporaryURL, response in - let fileManager = NSFileManager.defaultManager() - let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] - let pathComponent = response.suggestedFilename - - return directoryURL.URLByAppendingPathComponent(pathComponent!) -} -``` - -#### Using the Default Download Destination - -```swift -let destination = Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask) -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) -``` - -#### Downloading a File w/Progress - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in - print(totalBytesRead) - - // This closure is NOT called on the main queue for performance - // reasons. To update your ui, dispatch to the main queue. - dispatch_async(dispatch_get_main_queue()) { - print("Total bytes read on main queue: \(totalBytesRead)") - } - } - .response { _, _, _, error in - if let error = error { - print("Failed with error: \(error)") - } else { - print("Downloaded file successfully") - } - } -``` - -#### Accessing Resume Data for Failed Downloads - -```swift -Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) - .response { _, _, data, _ in - if let - data = data, - resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } - } -``` - -> The `data` parameter is automatically populated with the `resumeData` if available. - -```swift -let download = Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) -download.response { _, _, _, _ in - if let - resumeData = download.resumeData, - resumeDataString = NSString(data: resumeData, encoding: NSUTF8StringEncoding) - { - print("Resume Data: \(resumeDataString)") - } else { - print("Resume Data was empty") - } -} -``` - -### Authentication - -Authentication is handled on the system framework level by [`NSURLCredential` and `NSURLAuthenticationChallenge`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html). - -**Supported Authentication Schemes** - -- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) -- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) -- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) -- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) - -#### HTTP Basic Authentication - -The `authenticate` method on a `Request` will automatically provide an `NSURLCredential` to an `NSURLAuthenticationChallenge` when appropriate: - -```swift -let user = "user" -let password = "password" - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(user: user, password: password) - .responseJSON { response in - debugPrint(response) - } -``` - -Depending upon your server implementation, an `Authorization` header may also be appropriate: - -```swift -let user = "user" -let password = "password" - -let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! -let base64Credentials = credentialData.base64EncodedStringWithOptions([]) - -let headers = ["Authorization": "Basic \(base64Credentials)"] - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/user/password", headers: headers) - .responseJSON { response in - debugPrint(response) - } -``` - -#### Authentication with NSURLCredential - -```swift -let user = "user" -let password = "password" - -let credential = NSURLCredential(user: user, password: password, persistence: .ForSession) - -Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") - .authenticate(usingCredential: credential) - .responseJSON { response in - debugPrint(response) - } -``` - -### Timeline - -Alamofire collects timings throughout the lifecycle of a `Request` and creates a `Timeline` object exposed as a property on a `Response`. - -```swift -Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - .validate() - .responseJSON { response in - print(response.timeline) - } -``` - -The above reports the following `Timeline` info: - -- `Latency`: 0.428 seconds -- `Request Duration`: 0.428 seconds -- `Serialization Duration`: 0.001 seconds -- `Total Duration`: 0.429 seconds - -### Printable - -```swift -let request = Alamofire.request(.GET, "https://httpbin.org/ip") - -print(request) -// GET https://httpbin.org/ip (200) -``` - -### DebugPrintable - -```swift -let request = Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) - -debugPrint(request) -``` - -#### Output (cURL) - -```bash -$ curl -i \ - -H "User-Agent: Alamofire" \ - -H "Accept-Encoding: Accept-Encoding: gzip;q=1.0,compress;q=0.5" \ - -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ - "https://httpbin.org/get?foo=bar" -``` - ---- - -## Advanced Usage - -> Alamofire is built on `NSURLSession` and the Foundation URL Loading System. To make the most of -this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. - -**Recommended Reading** - -- [URL Loading System Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html) -- [NSURLSession Class Reference](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/cl/NSURLSession) -- [NSURLCache Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache) -- [NSURLAuthenticationChallenge Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html) - -### Manager - -Top-level convenience methods like `Alamofire.request` use a shared instance of `Alamofire.Manager`, which is configured with the default `NSURLSessionConfiguration`. - -As such, the following two statements are equivalent: - -```swift -Alamofire.request(.GET, "https://httpbin.org/get") -``` - -```swift -let manager = Alamofire.Manager.sharedInstance -manager.request(NSURLRequest(URL: NSURL(string: "https://httpbin.org/get")!)) -``` - -Applications can create managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`HTTPAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). - -#### Creating a Manager with Default Configuration - -```swift -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Creating a Manager with Background Configuration - -```swift -let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier("com.example.app.background") -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Creating a Manager with Ephemeral Configuration - -```swift -let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration() -let manager = Alamofire.Manager(configuration: configuration) -``` - -#### Modifying Session Configuration - -```swift -var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders ?? [:] -defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" - -let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() -configuration.HTTPAdditionalHeaders = defaultHeaders - -let manager = Alamofire.Manager(configuration: configuration) -``` - -> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use `URLRequestConvertible` and `ParameterEncoding`, respectively. - -### Request - -The result of a `request`, `upload`, or `download` method is an instance of `Alamofire.Request`. A request is always created using a constructor method from an owning manager, and never initialized directly. - -Methods like `authenticate`, `validate` and `responseData` return the caller in order to facilitate chaining. - -Requests can be suspended, resumed, and cancelled: - -- `suspend()`: Suspends the underlying task and dispatch queue -- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. -- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. - -### Response Serialization - -#### Handling Errors - -Before implementing custom response serializers or object serialization methods, it's important to be prepared to handle any errors that may occur. Alamofire recommends handling these through the use of either your own `NSError` creation methods, or a simple `enum` that conforms to `ErrorType`. For example, this `BackendError` type, which will be used in later examples: - -```swift -public enum BackendError: ErrorType { - case Network(error: NSError) - case DataSerialization(reason: String) - case JSONSerialization(error: NSError) - case ObjectSerialization(reason: String) - case XMLSerialization(error: NSError) -} -``` - -#### Creating a Custom Response Serializer - -Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.Request`. - -For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: - -```swift -extension Request { - public static func XMLResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } - - guard let validData = data else { - return .Failure(.DataSerialization(reason: "Data could not be serialized. Input data was nil.")) - } - - do { - let XML = try ONOXMLDocument(data: validData) - return .Success(XML) - } catch { - return .Failure(.XMLSerialization(error: error as NSError)) - } - } - } - - public func responseXMLDocument(completionHandler: Response -> Void) -> Self { - return response(responseSerializer: Request.XMLResponseSerializer(), completionHandler: completionHandler) - } -} -``` - -#### Generic Response Object Serialization - -Generics can be used to provide automatic, type-safe response object serialization. - -```swift -public protocol ResponseObjectSerializable { - init?(response: NSHTTPURLResponse, representation: AnyObject) -} - -extension Request { - public func responseObject(completionHandler: Response -> Void) -> Self { - let responseSerializer = ResponseSerializer { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } - - let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONResponseSerializer.serializeResponse(request, response, data, error) - - switch result { - case .Success(let value): - if let - response = response, - responseObject = T(response: response, representation: value) - { - return .Success(responseObject) - } else { - return .Failure(.ObjectSerialization(reason: "JSON could not be serialized into response object: \(value)")) - } - case .Failure(let error): - return .Failure(.JSONSerialization(error: error)) - } - } - - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` - -```swift -final class User: ResponseObjectSerializable { - let username: String - let name: String - - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String - } -} -``` - -```swift -Alamofire.request(.GET, "https://example.com/users/mattt") - .responseObject { (response: Response) in - debugPrint(response) - } -``` - -The same approach can also be used to handle endpoints that return a representation of a collection of objects: - -```swift -public protocol ResponseCollectionSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] -} - -extension ResponseCollectionSerializable where Self: ResponseObjectSerializable { - static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] { - var collection = [Self]() - - if let representation = representation as? [[String: AnyObject]] { - for itemRepresentation in representation { - if let item = Self(response: response, representation: itemRepresentation) { - collection.append(item) - } - } - } - - return collection - } -} - -extension Alamofire.Request { - public func responseCollection(completionHandler: Response<[T], BackendError> -> Void) -> Self { - let responseSerializer = ResponseSerializer<[T], BackendError> { request, response, data, error in - guard error == nil else { return .Failure(.Network(error: error!)) } - - let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) - let result = JSONSerializer.serializeResponse(request, response, data, error) - - switch result { - case .Success(let value): - if let response = response { - return .Success(T.collection(response: response, representation: value)) - } else { - return .Failure(. ObjectSerialization(reason: "Response collection could not be serialized due to nil response")) - } - case .Failure(let error): - return .Failure(.JSONSerialization(error: error)) - } - } - - return response(responseSerializer: responseSerializer, completionHandler: completionHandler) - } -} -``` - -```swift -final class User: ResponseObjectSerializable, ResponseCollectionSerializable { - let username: String - let name: String - - init?(response: NSHTTPURLResponse, representation: AnyObject) { - self.username = response.URL!.lastPathComponent! - self.name = representation.valueForKeyPath("name") as! String - } -} -``` - -```swift -Alamofire.request(.GET, "http://example.com/users") - .responseCollection { (response: Response<[User], BackendError>) in - debugPrint(response) - } -``` - -### URLStringConvertible - -Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: - -```swift -let string = NSString(string: "https://httpbin.org/post") -Alamofire.request(.POST, string) - -let URL = NSURL(string: string)! -Alamofire.request(.POST, URL) - -let URLRequest = NSURLRequest(URL: URL) -Alamofire.request(.POST, URLRequest) // overrides `HTTPMethod` of `URLRequest` - -let URLComponents = NSURLComponents(URL: URL, resolvingAgainstBaseURL: true) -Alamofire.request(.POST, URLComponents) -``` - -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLStringConvertible` as a convenient way to map domain-specific models to server resources. - -#### Type-Safe Routing - -```swift -extension User: URLStringConvertible { - static let baseURLString = "http://example.com" - - var URLString: String { - return User.baseURLString + "/users/\(username)/" - } -} -``` - -```swift -let user = User(username: "mattt") -Alamofire.request(.GET, user) // http://example.com/users/mattt -``` - -### URLRequestConvertible - -Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `NSURLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): - -```swift -let URL = NSURL(string: "https://httpbin.org/post")! -let mutableURLRequest = NSMutableURLRequest(URL: URL) -mutableURLRequest.HTTPMethod = "POST" - -let parameters = ["foo": "bar"] - -do { - mutableURLRequest.HTTPBody = try NSJSONSerialization.dataWithJSONObject(parameters, options: NSJSONWritingOptions()) -} catch { - // No-op -} - -mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - -Alamofire.request(mutableURLRequest) -``` - -Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. - -#### API Parameter Abstraction - -```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static let perPage = 50 - - case Search(query: String, page: Int) - - // MARK: URLRequestConvertible - - var URLRequest: NSMutableURLRequest { - let result: (path: String, parameters: [String: AnyObject]) = { - switch self { - case .Search(let query, let page) where page > 0: - return ("/search", ["q": query, "offset": Router.perPage * page]) - case .Search(let query, _): - return ("/search", ["q": query]) - } - }() - - let URL = NSURL(string: Router.baseURLString)! - let URLRequest = NSURLRequest(URL: URL.URLByAppendingPathComponent(result.path)) - let encoding = Alamofire.ParameterEncoding.URL - - return encoding.encode(URLRequest, parameters: result.parameters).0 - } -} -``` - -```swift -Alamofire.request(Router.Search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 -``` - -#### CRUD & Authorization - -```swift -enum Router: URLRequestConvertible { - static let baseURLString = "http://example.com" - static var OAuthToken: String? - - case CreateUser([String: AnyObject]) - case ReadUser(String) - case UpdateUser(String, [String: AnyObject]) - case DestroyUser(String) - - var method: Alamofire.Method { - switch self { - case .CreateUser: - return .POST - case .ReadUser: - return .GET - case .UpdateUser: - return .PUT - case .DestroyUser: - return .DELETE - } - } - - var path: String { - switch self { - case .CreateUser: - return "/users" - case .ReadUser(let username): - return "/users/\(username)" - case .UpdateUser(let username, _): - return "/users/\(username)" - case .DestroyUser(let username): - return "/users/\(username)" - } - } - - // MARK: URLRequestConvertible - - var URLRequest: NSMutableURLRequest { - let URL = NSURL(string: Router.baseURLString)! - let mutableURLRequest = NSMutableURLRequest(URL: URL.URLByAppendingPathComponent(path)) - mutableURLRequest.HTTPMethod = method.rawValue - - if let token = Router.OAuthToken { - mutableURLRequest.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") - } - - switch self { - case .CreateUser(let parameters): - return Alamofire.ParameterEncoding.JSON.encode(mutableURLRequest, parameters: parameters).0 - case .UpdateUser(_, let parameters): - return Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: parameters).0 - default: - return mutableURLRequest - } - } -} -``` - -```swift -Alamofire.request(Router.ReadUser("mattt")) // GET /users/mattt -``` - -### SessionDelegate - -By default, an Alamofire `Manager` instance creates an internal `SessionDelegate` object to handle all the various types of delegate callbacks that are generated by the underlying `NSURLSession`. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons. - -#### Override Closures - -The first way to customize the `SessionDelegate` behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching `SessionDelegate` API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available: - -```swift -/// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. -public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - -/// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. -public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? - -/// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. -public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - -/// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. -public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? -``` - -The following is a short example of how to use the `taskWillPerformHTTPRedirection` to avoid following redirects to any `apple.com` domains. - -```swift -let delegate: Alamofire.Manager.SessionDelegate = manager.delegate - -delegate.taskWillPerformHTTPRedirection = { session, task, response, request in - var finalRequest = request - - if let originalRequest = task.originalRequest where originalRequest.URLString.containsString("apple.com") { - finalRequest = originalRequest - } - - return finalRequest -} -``` - -#### Subclassing - -Another way to override the default implementation of the `SessionDelegate` is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here's a quick example of subclassing the `SessionDelegate` and logging a message when a redirect occurs. - -```swift -class LoggingSessionDelegate: Manager.SessionDelegate { - override func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: NSURLRequest? -> Void) - { - print("URLSession will perform HTTP redirection to request: \(request)") - - super.URLSession( - session, - task: task, - willPerformHTTPRedirection: response, - newRequest: request, - completionHandler: completionHandler - ) - } -} -``` - -Generally, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort. - -> It is important to keep in mind that the `subdelegates` are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks. - -### Security - -Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple's built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the `ServerTrustPolicy`. - -#### ServerTrustPolicy - -The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. - -```swift -let serverTrustPolicy = ServerTrustPolicy.PinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), - validateCertificateChain: true, - validateHost: true -) -``` - -There are many different cases of server trust evaluation giving you complete control over the validation process: - -* `PerformDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. -* `PinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. -* `PinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. -* `DisableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. -* `CustomEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. - -#### Server Trust Policy Manager - -The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. - -```swift -let serverTrustPolicies: [String: ServerTrustPolicy] = [ - "test.example.com": .PinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), - validateCertificateChain: true, - validateHost: true - ), - "insecure.expired-apis.com": .DisableEvaluation -] - -let manager = Manager( - serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies) -) -``` - -> Make sure to keep a reference to the new `Manager` instance, otherwise your requests will all get cancelled when your `manager` is deallocated. - -These server trust policies will result in the following behavior: - -* `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: - * Certificate chain MUST be valid. - * Certificate chain MUST include one of the pinned certificates. - * Challenge host MUST match the host in the certificate chain's leaf certificate. -* `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. -* All other hosts will use the default evaluation provided by Apple. - -##### Subclassing Server Trust Policy Manager - -If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the `ServerTrustPolicyManager` and override the `serverTrustPolicyForHost` method with your own custom implementation. - -```swift -class CustomServerTrustPolicyManager: ServerTrustPolicyManager { - override func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { - var policy: ServerTrustPolicy? - - // Implement your custom domain matching behavior... - - return policy - } -} -``` - -#### Validating the Host - -The `.PerformDefaultEvaluation`, `.PinCertificates` and `.PinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. - -> It is recommended that `validateHost` always be set to `true` in production environments. - -#### Validating the Certificate Chain - -Pinning certificates and public keys both have the option of validating the certificate chain using the `validateCertificateChain` parameter. By setting this value to `true`, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certificates or public keys. A value of `false` will skip the certificate chain validation, but will still perform the byte equality check. - -There are several cases where it may make sense to disable certificate chain validation. The most common use cases for disabling validation are self-signed and expired certificates. The evaluation would always fail in both of these cases, but the byte equality check will still ensure you are receiving the certificate you expect from the server. - -> It is recommended that `validateCertificateChain` always be set to `true` in production environments. - -#### App Transport Security - -With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom `ServerTrustPolicyManager` with several `ServerTrustPolicy` objects will have no effect. If you continuously see `CFNetwork SSLHandshake failed (-9806)` errors, you have probably run into this problem. Apple's ATS system overrides the entire challenge system unless you configure the ATS settings in your app's plist to disable enough of it to allow your app to evaluate the server trust. - -If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your `Info.plist`. - -```xml - - NSAppTransportSecurity - - NSExceptionDomains - - example.com - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - NSTemporaryExceptionMinimumTLSVersion - TLSv1.2 - - - - -``` - -Whether you need to set the `NSExceptionRequiresForwardSecrecy` to `NO` depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to `NO`. The `NSExceptionAllowsInsecureHTTPLoads` MUST be set to `YES` in order to allow the `SessionDelegate` to receive challenge callbacks. Once the challenge callbacks are being called, the `ServerTrustPolicyManager` will take over the server trust evaluation. You may also need to specify the `NSTemporaryExceptionMinimumTLSVersion` if you're trying to connect to a host that only supports TLS versions less than `1.2`. - -> It is recommended to always use valid certificates in production environments. - -### Network Reachability - -The `NetworkReachabilityManager` listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces. - -```swift -let manager = NetworkReachabilityManager(host: "www.apple.com") - -manager?.listener = { status in - print("Network Status Changed: \(status)") -} - -manager?.startListening() -``` - -> Make sure to remember to retain the `manager` in the above example, or no status changes will be reported. - -There are some important things to remember when using network reachability to determine what to do next. - -* **Do NOT** use Reachability to determine if a network request should be sent. - * You should **ALWAYS** send it. -* When Reachability is restored, use the event to retry failed network requests. - * Even though the network requests may still fail, this is a good moment to retry them. -* The network reachability status can be useful for determining why a network request may have failed. - * If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as "request timed out." - -> It is recommended to check out [WWDC 2012 Session 706, "Networking Best Practices"](https://developer.apple.com/videos/play/wwdc2012-706/) for more info. - ---- - -## Open Rdars - -The following rdars have some affect on the current implementation of Alamofire. - -* [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -* [rdar://26761490](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - ---- - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially register as a federal non-profit organization. Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. Donating to the ASF will enable us to: - -* Pay our legal fees to register as a federal non-profit organization -* Pay our yearly legal fees to keep the non-profit in good status -* Pay for our mail servers to help us stay on top of all questions and security issues -* Potentially fund test servers to make it easier for us to test the edge cases -* Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiam around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated. - -Click here to lend your support to: Alamofire Software Foundation and make a donation at pledgie.com ! - -## License - -Alamofire is released under the MIT license. See LICENSE for details. diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index 0945204dccaa..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,369 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -// MARK: - URLStringConvertible - -/** - Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to - construct URL requests. -*/ -public protocol URLStringConvertible { - /** - A URL that conforms to RFC 2396. - - Methods accepting a `URLStringConvertible` type parameter parse it according to RFCs 1738 and 1808. - - See https://tools.ietf.org/html/rfc2396 - See https://tools.ietf.org/html/rfc1738 - See https://tools.ietf.org/html/rfc1808 - */ - var URLString: String { get } -} - -extension String: URLStringConvertible { - public var URLString: String { return self } -} - -extension NSURL: URLStringConvertible { - public var URLString: String { return absoluteString } -} - -extension NSURLComponents: URLStringConvertible { - public var URLString: String { return URL!.URLString } -} - -extension NSURLRequest: URLStringConvertible { - public var URLString: String { return URL!.URLString } -} - -// MARK: - URLRequestConvertible - -/** - Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -*/ -public protocol URLRequestConvertible { - /// The URL request. - var URLRequest: NSMutableURLRequest { get } -} - -extension NSURLRequest: URLRequestConvertible { - public var URLRequest: NSMutableURLRequest { return self.mutableCopy() as! NSMutableURLRequest } -} - -// MARK: - Convenience - -func URLRequest( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil) - -> NSMutableURLRequest -{ - let mutableURLRequest: NSMutableURLRequest - - if let request = URLString as? NSMutableURLRequest { - mutableURLRequest = request - } else if let request = URLString as? NSURLRequest { - mutableURLRequest = request.URLRequest - } else { - mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URLString.URLString)!) - } - - mutableURLRequest.HTTPMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - mutableURLRequest.setValue(headerValue, forHTTPHeaderField: headerField) - } - } - - return mutableURLRequest -} - -// MARK: - Request Methods - -/** - Creates a request using the shared manager instance for the specified method, URL string, parameters, and - parameter encoding. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. -*/ -public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request -{ - return Manager.sharedInstance.request( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/** - Creates a request using the shared manager instance for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. -*/ -public func request(URLRequest: URLRequestConvertible) -> Request { - return Manager.sharedInstance.request(URLRequest.URLRequest) -} - -// MARK: - Upload Methods - -// MARK: File - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and file. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and file. - - - parameter URLRequest: The URL request. - - parameter file: The file to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return Manager.sharedInstance.upload(URLRequest, file: file) -} - -// MARK: Data - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and data. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and data. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return Manager.sharedInstance.upload(URLRequest, data: data) -} - -// MARK: Stream - -/** - Creates an upload request using the shared manager instance for the specified method, URL string, and stream. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request -{ - return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) -} - -/** - Creates an upload request using the shared manager instance for the specified URL request and stream. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. -*/ -public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return Manager.sharedInstance.upload(URLRequest, stream: stream) -} - -// MARK: MultipartFormData - -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ -public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ - return Manager.sharedInstance.upload( - method, - URLString, - headers: headers, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) -} - -/** - Creates an upload request using the shared manager instance for the specified method and URL string. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -*/ -public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ - return Manager.sharedInstance.upload( - URLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) -} - -// MARK: - Download Methods - -// MARK: URL Request - -/** - Creates a download request using the shared manager instance for the specified method and URL string. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request -{ - return Manager.sharedInstance.download( - method, - URLString, - parameters: parameters, - encoding: encoding, - headers: headers, - destination: destination - ) -} - -/** - Creates a download request using the shared manager instance for the specified URL request. - - - parameter URLRequest: The URL request. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(URLRequest, destination: destination) -} - -// MARK: Resume Data - -/** - Creates a request using the shared manager instance for downloading from the resume data produced from a - previous request cancellation. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for additional - information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. -*/ -public func download(resumeData data: NSData, destination: Request.DownloadFileDestination) -> Request { - return Manager.sharedInstance.download(data, destination: destination) -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift deleted file mode 100644 index 52e90badfdea..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift +++ /dev/null @@ -1,248 +0,0 @@ -// -// Download.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Manager { - private enum Downloadable { - case Request(NSURLRequest) - case ResumeData(NSData) - } - - private func download(downloadable: Downloadable, destination: Request.DownloadFileDestination) -> Request { - var downloadTask: NSURLSessionDownloadTask! - - switch downloadable { - case .Request(let request): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithRequest(request) - } - case .ResumeData(let resumeData): - dispatch_sync(queue) { - downloadTask = self.session.downloadTaskWithResumeData(resumeData) - } - } - - let request = Request(session: session, task: downloadTask) - - if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate { - downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in - return destination(URL, downloadTask.response as! NSHTTPURLResponse) - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: Request - - /** - Creates a download request for the specified method, URL string, parameters, parameter encoding, headers - and destination. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil, - destination: Request.DownloadFileDestination) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - - return download(encodedURLRequest, destination: destination) - } - - /** - Creates a request for downloading from the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { - return download(.Request(URLRequest.URLRequest), destination: destination) - } - - // MARK: Resume Data - - /** - Creates a request for downloading from the resume data produced from a previous request cancellation. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` - when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for - additional information. - - parameter destination: The closure used to determine the destination of the downloaded file. - - - returns: The created download request. - */ - public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request { - return download(.ResumeData(resumeData), destination: destination) - } -} - -// MARK: - - -extension Request { - /** - A closure executed once a request has successfully completed in order to determine where to move the temporary - file written to during the download process. The closure takes two arguments: the temporary file URL and the URL - response, and returns a single argument: the file URL where the temporary file should be moved. - */ - public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL - - /** - Creates a download file destination closure which uses the default file manager to move the temporary file to a - file URL in the first available directory with the specified search path directory and search path domain mask. - - - parameter directory: The search path directory. `.DocumentDirectory` by default. - - parameter domain: The search path domain mask. `.UserDomainMask` by default. - - - returns: A download file destination closure. - */ - public class func suggestedDownloadDestination( - directory directory: NSSearchPathDirectory = .DocumentDirectory, - domain: NSSearchPathDomainMask = .UserDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response -> NSURL in - let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) - - if !directoryURLs.isEmpty { - return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!) - } - - return temporaryURL - } - } - - /// The resume data of the underlying download task if available after a failure. - public var resumeData: NSData? { - var data: NSData? - - if let delegate = delegate as? DownloadTaskDelegate { - data = delegate.resumeData - } - - return data - } - - // MARK: - DownloadTaskDelegate - - class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate { - var downloadTask: NSURLSessionDownloadTask? { return task as? NSURLSessionDownloadTask } - var downloadProgress: ((Int64, Int64, Int64) -> Void)? - - var resumeData: NSData? - override var data: NSData? { return resumeData } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)? - var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - do { - let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - try NSFileManager.defaultManager().moveItemAtURL(location, toURL: destination) - } catch { - self.error = error as NSError - } - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - downloadProgress?(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } - } - - func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift deleted file mode 100644 index cbfb5c77bff5..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift +++ /dev/null @@ -1,779 +0,0 @@ -// -// Manager.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/** - Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -*/ -public class Manager { - - // MARK: - Properties - - /** - A shared instance of `Manager`, used by top-level Alamofire request methods, and suitable for use directly - for any ad hoc requests. - */ - public static let sharedInstance: Manager = { - let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() - configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders - - return Manager(configuration: configuration) - }() - - /** - Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - */ - public static let defaultHTTPHeaders: [String: String] = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = NSLocale.preferredLanguages().prefix(6).enumerate().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joinWithSeparator(", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - let userAgent: String = { - if let info = NSBundle.mainBundle().infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let versionString: String - - if #available(OSX 10.10, *) { - let version = NSProcessInfo.processInfo().operatingSystemVersion - versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - } else { - versionString = "10.9" - } - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(OSX) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - return "\(executable)/\(bundle) (\(appVersion)/\(appBuild)); \(osNameVersion))" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL) - - /// The underlying session. - public let session: NSURLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - public var startRequestsImmediately: Bool = true - - /** - The background completion handler closure provided by the UIApplicationDelegate - `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - will automatically call the handler. - - If you need to handle your own events before the handler is called, then you need to override the - SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - - `nil` by default. - */ - public var backgroundCompletionHandler: (() -> Void)? - - // MARK: - Lifecycle - - /** - Initializes the `Manager` instance with the specified configuration, delegate and server trust policy. - - - parameter configuration: The configuration used to construct the managed session. - `NSURLSessionConfiguration.defaultSessionConfiguration()` by default. - - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - default. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance. - */ - public init( - configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration(), - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = NSURLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /** - Initializes the `Manager` instance with the specified session, delegate and server trust policy. - - - parameter session: The URL session. - - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - challenges. `nil` by default. - - - returns: The new `Manager` instance if the URL session's delegate matches the delegate parameter. - */ - public init?( - session: NSURLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Request - - /** - Creates a request for the specified method, URL string, parameters, parameter encoding and headers. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter parameters: The parameters. `nil` by default. - - parameter encoding: The parameter encoding. `.URL` by default. - - parameter headers: The HTTP headers. `nil` by default. - - - returns: The created request. - */ - public func request( - method: Method, - _ URLString: URLStringConvertible, - parameters: [String: AnyObject]? = nil, - encoding: ParameterEncoding = .URL, - headers: [String: String]? = nil) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 - return request(encodedURLRequest) - } - - /** - Creates a request for the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - - returns: The created request. - */ - public func request(URLRequest: URLRequestConvertible) -> Request { - var dataTask: NSURLSessionDataTask! - dispatch_sync(queue) { dataTask = self.session.dataTaskWithRequest(URLRequest.URLRequest) } - - let request = Request(session: session, task: dataTask) - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: - SessionDelegate - - /** - Responsible for handling all delegate callbacks for the underlying session. - */ - public class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate { - private var subdelegates: [Int: Request.TaskDelegate] = [:] - private let subdelegateQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT) - - /// Access the task delegate for the specified task in a thread-safe manner. - public subscript(task: NSURLSessionTask) -> Request.TaskDelegate? { - get { - var subdelegate: Request.TaskDelegate? - dispatch_sync(subdelegateQueue) { subdelegate = self.subdelegates[task.taskIdentifier] } - - return subdelegate - } - set { - dispatch_barrier_async(subdelegateQueue) { self.subdelegates[task.taskIdentifier] = newValue } - } - } - - /** - Initializes the `SessionDelegate` instance. - - - returns: The new `SessionDelegate` instance. - */ - public override init() { - super.init() - } - - // MARK: - NSURLSessionDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didBecomeInvalidWithError:`. - public var sessionDidBecomeInvalidWithError: ((NSURLSession, NSError?) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. - public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides all behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:` and requires the caller to call the `completionHandler`. - public var sessionDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. - public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the session has been invalidated. - - - parameter session: The session object that was invalidated. - - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - */ - public func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - /** - Requests credentials from the delegate in response to a session-level authentication request from the remote server. - - - parameter session: The session containing the task that requested authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return - } - - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } - - completionHandler(disposition, credential) - } - - /** - Tells the delegate that all messages enqueued for a session have been delivered. - - - parameter session: The session that no longer has any outstanding requests. - */ - public func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. - public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:` and - /// requires the caller to call the `completionHandler`. - public var taskWillPerformHTTPRedirectionWithCompletion: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, NSURLRequest? -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`. - public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:` and - /// requires the caller to call the `completionHandler`. - public var taskDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`. - public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - - /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:` and - /// requires the caller to call the `completionHandler`. - public var taskNeedNewBodyStreamWithCompletion: ((NSURLSession, NSURLSessionTask, NSInputStream? -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. - public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didCompleteWithError:`. - public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the remote server requested an HTTP redirect. - - - parameter session: The session containing the task whose request resulted in a redirect. - - parameter task: The task whose request resulted in a redirect. - - parameter response: An object containing the server’s response to the original request. - - parameter request: A URL request object filled out with the new location. - - parameter completionHandler: A closure that your handler should call with either the value of the request - parameter, a modified URL request object, or NULL to refuse the redirect and - return the body of the redirect response. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: NSURLRequest? -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - /** - Requests credentials from the delegate in response to an authentication request from the remote server. - - - parameter session: The session containing the task whose request requires authentication. - - parameter task: The task whose request requires authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task] { - delegate.URLSession( - session, - task: task, - didReceiveChallenge: challenge, - completionHandler: completionHandler - ) - } else { - URLSession(session, didReceiveChallenge: challenge, completionHandler: completionHandler) - } - } - - /** - Tells the delegate when a task requires a new request body stream to send to the remote server. - - - parameter session: The session containing the task that needs a new body stream. - - parameter task: The task that needs a new body stream. - - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: NSInputStream? -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /** - Periodically informs the delegate of the progress of sending body content to the server. - - - parameter session: The session containing the data task. - - parameter task: The data task. - - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - - parameter totalBytesSent: The total number of bytes sent so far. - - parameter totalBytesExpectedToSend: The expected length of the body data. - */ - public func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task] as? Request.UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } - - /** - Tells the delegate that the task finished transferring data. - - - parameter session: The session containing the task whose request finished transferring data. - - parameter task: The task whose request finished transferring data. - - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. - */ - public func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidComplete = taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = self[task] { - delegate.URLSession(session, task: task, didCompleteWithError: error) - } - - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidComplete, object: task) - - self[task] = nil - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`. - public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - - /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:` and - /// requires caller to call the `completionHandler`. - public var dataTaskDidReceiveResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSURLResponse, NSURLSessionResponseDisposition -> Void) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`. - public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveData:`. - public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - - /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. - public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? - - /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:` and - /// requires caller to call the `completionHandler`. - public var dataTaskWillCacheResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, NSCachedURLResponse? -> Void) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that the data task received the initial reply (headers) from the server. - - - parameter session: The session containing the data task that received an initial reply. - - parameter dataTask: The data task that received an initial reply. - - parameter response: A URL response object populated with headers. - - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - constant to indicate whether the transfer should continue as a data task or - should become a download task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: NSURLSessionResponseDisposition -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } - - var disposition: NSURLSessionResponseDisposition = .Allow - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - /** - Tells the delegate that the data task was changed to a download task. - - - parameter session: The session containing the task that was replaced by a download task. - - parameter dataTask: The data task that was replaced by a download task. - - parameter downloadTask: The new download task that replaced the data task. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - let downloadDelegate = Request.DownloadTaskDelegate(task: downloadTask) - self[downloadTask] = downloadDelegate - } - } - - /** - Tells the delegate that the data task has received some of the expected data. - - - parameter session: The session containing the data task that provided data. - - parameter dataTask: The data task that provided data. - - parameter data: A data object containing the transferred data. - */ - public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession(session, dataTask: dataTask, didReceiveData: data) - } - } - - /** - Asks the delegate whether the data (or upload) task should store the response in the cache. - - - parameter session: The session containing the data (or upload) task. - - parameter dataTask: The data (or upload) task. - - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - caching policy and the values of certain received headers, such as the Pragma - and Cache-Control headers. - - parameter completionHandler: A block that your handler must call, providing either the original proposed - response, a modified version of that response, or NULL to prevent caching the - response. If your delegate implements this method, it must call this completion - handler; otherwise, your app leaks memory. - */ - public func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: NSCachedURLResponse? -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return - } - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { - delegate.URLSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } - } - - // MARK: - NSURLSessionDownloadDelegate - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didFinishDownloadingToURL:`. - public var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. - public var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. - public var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - /** - Tells the delegate that a download task has finished downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that finished. - - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - open the file for reading or move it to a permanent location in your app’s sandbox - container directory before returning from this delegate method. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession(session, downloadTask: downloadTask, didFinishDownloadingToURL: location) - } - } - - /** - Periodically informs the delegate about the download’s progress. - - - parameter session: The session containing the download task. - - parameter downloadTask: The download task. - - parameter bytesWritten: The number of bytes transferred since the last time this delegate - method was called. - - parameter totalBytesWritten: The total number of bytes transferred so far. - - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - header. If this header was not provided, the value is - `NSURLSessionTransferSizeUnknown`. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) - } - } - - /** - Tells the delegate that the download task has resumed downloading. - - - parameter session: The session containing the download task that finished. - - parameter downloadTask: The download task that resumed. See explanation in the discussion. - - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - existing content, then this value is zero. Otherwise, this value is an - integer representing the number of bytes on disk that do not need to be - retrieved again. - - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - */ - public func URLSession( - session: NSURLSession, - downloadTask: NSURLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { - delegate.URLSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) - } - } - - // MARK: - NSURLSessionStreamDelegate - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - - // MARK: - NSObject - - public override func respondsToSelector(selector: Selector) -> Bool { - #if !os(OSX) - if selector == #selector(NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession(_:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil - } - #endif - - switch selector { - case #selector(NSURLSessionDelegate.URLSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(NSURLSessionDelegate.URLSession(_:didReceiveChallenge:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(NSURLSessionTaskDelegate.URLSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(NSURLSessionDataDelegate.URLSession(_:dataTask:didReceiveResponse:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return self.dynamicType.instancesRespondToSelector(selector) - } - } - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index 5a7ef09c82ed..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,659 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(OSX) -import CoreServices -#endif - -/** - Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode - multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead - to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the - data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for - larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. - - For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well - and the w3 form documentation. - - - https://www.ietf.org/rfc/rfc2388.txt - - https://www.ietf.org/rfc/rfc2045.txt - - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -*/ -public class MultipartFormData { - - // MARK: - Helper Types - - struct EncodingCharacters { - static let CRLF = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case Initial, Encapsulated, Final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(boundaryType boundaryType: BoundaryType, boundary: String) -> NSData { - let boundaryText: String - - switch boundaryType { - case .Initial: - boundaryText = "--\(boundary)\(EncodingCharacters.CRLF)" - case .Encapsulated: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)\(EncodingCharacters.CRLF)" - case .Final: - boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)--\(EncodingCharacters.CRLF)" - } - - return boundaryText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! - } - } - - class BodyPart { - let headers: [String: String] - let bodyStream: NSInputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: [String: String], bodyStream: NSInputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - public var contentType: String { return "multipart/form-data; boundary=\(boundary)" } - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public let boundary: String - - private var bodyParts: [BodyPart] - private var bodyPartError: NSError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /** - Creates a multipart form data object. - - - returns: The multipart form data object. - */ - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /** - * The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - * information, please refer to the following article: - * - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - */ - - self.streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String) { - let headers = contentHeaders(name: name) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, mimeType: String) { - let headers = contentHeaders(name: name, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the data and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter data: The data to encode into the multipart form data. - - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - */ - public func appendBodyPart(data data: NSData, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - let stream = NSInputStream(data: data) - let length = UInt64(data.length) - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - - `Content-Type: #{generated mimeType}` (HTTP Header) - - Encoded file data - - Multipart form boundary - - The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - system associated MIME type. - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String) { - if let - fileName = fileURL.lastPathComponent, - pathExtension = fileURL.pathExtension - { - let mimeType = mimeTypeForPathExtension(pathExtension) - appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) - } else { - let failureReason = "Failed to extract the fileName of the provided URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) - } - } - - /** - Creates a body part from the file and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - - Content-Type: #{mimeType} (HTTP Header) - - Encoded file data - - Multipart form boundary - - - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. - */ - public func appendBodyPart(fileURL fileURL: NSURL, name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.fileURL else { - let failureReason = "The file URL does not point to a file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - var isReachable = true - - if #available(OSX 10.10, *) { - isReachable = fileURL.checkPromisedItemIsReachableAndReturnError(nil) - } - - guard isReachable else { - setBodyPartError(code: NSURLErrorBadURL, failureReason: "The file URL is not reachable: \(fileURL)") - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - - guard let - path = fileURL.path - where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else - { - let failureReason = "The file URL is a directory, not a file: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - var bodyContentLength: UInt64? - - do { - if let - path = fileURL.path, - fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber - { - bodyContentLength = fileSize.unsignedLongLongValue - } - } catch { - // No-op - } - - guard let length = bodyContentLength else { - let failureReason = "Could not fetch attributes from the file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = NSInputStream(URL: fileURL) else { - let failureReason = "Failed to create an input stream from the file URL: \(fileURL)" - setBodyPartError(code: NSURLErrorCannotOpenFile, failureReason: failureReason) - return - } - - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part from the stream and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - - `Content-Type: #{mimeType}` (HTTP Header) - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - */ - public func appendBodyPart( - stream stream: NSInputStream, - length: UInt64, - name: String, - fileName: String, - mimeType: String) - { - let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) - appendBodyPart(stream: stream, length: length, headers: headers) - } - - /** - Creates a body part with the headers, stream and length and appends it to the multipart form data object. - - The body part data will be encoded using the following format: - - - HTTP headers - - Encoded stream data - - Multipart form boundary - - - parameter stream: The input stream to encode in the multipart form data. - - parameter length: The content length of the stream. - - parameter headers: The HTTP headers for the body part. - */ - public func appendBodyPart(stream stream: NSInputStream, length: UInt64, headers: [String: String]) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /** - Encodes all the appended body parts into a single `NSData` object. - - It is important to note that this method will load all the appended body parts into memory all at the same - time. This method should only be used when the encoded data will have a small memory footprint. For large data - cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. - - - throws: An `NSError` if encoding encounters an error. - - - returns: The encoded `NSData` if encoding is successful. - */ - public func encode() throws -> NSData { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - let encoded = NSMutableData() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encodeBodyPart(bodyPart) - encoded.appendData(encodedData) - } - - return encoded - } - - /** - Writes the appended body parts into the given file URL. - - This process is facilitated by reading and writing with input and output streams, respectively. Thus, - this approach is very memory efficient and should be used for large body part data. - - - parameter fileURL: The file URL to write the multipart form data into. - - - throws: An `NSError` if encoding encounters an error. - */ - public func writeEncodedDataToDisk(fileURL: NSURL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if let path = fileURL.path where NSFileManager.defaultManager().fileExistsAtPath(path) { - let failureReason = "A file already exists at the given file URL: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) - } else if !fileURL.fileURL { - let failureReason = "The URL does not point to a valid file: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) - } - - let outputStream: NSOutputStream - - if let possibleOutputStream = NSOutputStream(URL: fileURL, append: false) { - outputStream = possibleOutputStream - } else { - let failureReason = "Failed to create an output stream with the given URL: \(fileURL)" - throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorCannotOpenFile, failureReason: failureReason) - } - - outputStream.open() - - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true - - for bodyPart in self.bodyParts { - try writeBodyPart(bodyPart, toOutputStream: outputStream) - } - - outputStream.close() - } - - // MARK: - Private - Body Part Encoding - - private func encodeBodyPart(bodyPart: BodyPart) throws -> NSData { - let encoded = NSMutableData() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.appendData(initialData) - - let headerData = encodeHeaderDataForBodyPart(bodyPart) - encoded.appendData(headerData) - - let bodyStreamData = try encodeBodyStreamDataForBodyPart(bodyPart) - encoded.appendData(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.appendData(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaderDataForBodyPart(bodyPart: BodyPart) -> NSData { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.CRLF)" - } - headerText += EncodingCharacters.CRLF - - return headerText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! - } - - private func encodeBodyStreamDataForBodyPart(bodyPart: BodyPart) throws -> NSData { - let inputStream = bodyPart.bodyStream - inputStream.open() - - var error: NSError? - let encoded = NSMutableData() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if inputStream.streamError != nil { - error = inputStream.streamError - break - } - - if bytesRead > 0 { - encoded.appendBytes(buffer, length: bytesRead) - } else if bytesRead < 0 { - let failureReason = "Failed to read from input stream: \(inputStream)" - error = Error.error(domain: NSURLErrorDomain, code: .InputStreamReadFailed, failureReason: failureReason) - break - } else { - break - } - } - - inputStream.close() - - if let error = error { - throw error - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func writeBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - try writeInitialBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeHeaderDataForBodyPart(bodyPart, toOutputStream: outputStream) - try writeBodyStreamForBodyPart(bodyPart, toOutputStream: outputStream) - try writeFinalBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) - } - - private func writeInitialBoundaryDataForBodyPart( - bodyPart: BodyPart, - toOutputStream outputStream: NSOutputStream) - throws - { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try writeData(initialData, toOutputStream: outputStream) - } - - private func writeHeaderDataForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let headerData = encodeHeaderDataForBodyPart(bodyPart) - return try writeData(headerData, toOutputStream: outputStream) - } - - private func writeBodyStreamForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { - let inputStream = bodyPart.bodyStream - inputStream.open() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw streamError - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0 { - if outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let streamError = outputStream.streamError { - throw streamError - } - - if bytesWritten < 0 { - let failureReason = "Failed to write to output stream: \(outputStream)" - throw Error.error(domain: NSURLErrorDomain, code: .OutputStreamWriteFailed, failureReason: failureReason) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if let - id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), - contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(name name: String) -> [String: String] { - return ["Content-Disposition": "form-data; name=\"\(name)\""] - } - - private func contentHeaders(name name: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"", - "Content-Type": "\(mimeType)" - ] - } - - private func contentHeaders(name name: String, fileName: String, mimeType: String) -> [String: String] { - return [ - "Content-Disposition": "form-data; name=\"\(name)\"; filename=\"\(fileName)\"", - "Content-Type": "\(mimeType)" - ] - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> NSData { - return BoundaryGenerator.boundaryData(boundaryType: .Final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(code code: Int, failureReason: String) { - guard bodyPartError == nil else { return } - bodyPartError = Error.error(domain: NSURLErrorDomain, code: code, failureReason: failureReason) - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index d5e00ae70051..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,244 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if !os(watchOS) - -import Foundation -import SystemConfiguration - -/** - The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and - WiFi network interfaces. - - Reachability can be used to determine background information about why a network operation failed, or to retry - network requests when a connection is established. It should not be used to prevent a user from initiating a network - request, as it's possible that an initial request may be required to establish reachability. -*/ -public class NetworkReachabilityManager { - /** - Defines the various states of network reachability. - - - Unknown: It is unknown whether the network is reachable. - - NotReachable: The network is not reachable. - - ReachableOnWWAN: The network is reachable over the WWAN connection. - - ReachableOnWiFi: The network is reachable over the WiFi connection. - */ - public enum NetworkReachabilityStatus { - case Unknown - case NotReachable - case Reachable(ConnectionType) - } - - /** - Defines the various connection types detected by reachability flags. - - - EthernetOrWiFi: The connection type is either over Ethernet or WiFi. - - WWAN: The connection type is a WWAN connection. - */ - public enum ConnectionType { - case EthernetOrWiFi - case WWAN - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = NetworkReachabilityStatus -> Void - - // MARK: - Properties - - /// Whether the network is currently reachable. - public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the WWAN interface. - public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .Reachable(.WWAN) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .Reachable(.EthernetOrWiFi) } - - /// The current network reachability status. - public var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .Unknown } - return networkReachabilityStatusForFlags(flags) - } - - /// The dispatch queue to execute the `listener` closure on. - public var listenerQueue: dispatch_queue_t = dispatch_get_main_queue() - - /// A closure executed when the network reachability status changes. - public var listener: Listener? - - private var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - if SCNetworkReachabilityGetFlags(reachability, &flags) { - return flags - } - - return nil - } - - private let reachability: SCNetworkReachability - private var previousFlags: SCNetworkReachabilityFlags - - // MARK: - Initialization - - /** - Creates a `NetworkReachabilityManager` instance with the specified host. - - - parameter host: The host used to evaluate network reachability. - - - returns: The new `NetworkReachabilityManager` instance. - */ - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - self.init(reachability: reachability) - } - - /** - Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. - - Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - status of the device, both IPv4 and IPv6. - - - returns: The new `NetworkReachabilityManager` instance. - */ - public convenience init?() { - var address = sockaddr_in() - address.sin_len = UInt8(sizeofValue(address)) - address.sin_family = sa_family_t(AF_INET) - - guard let reachability = withUnsafePointer(&address, { - SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0)) - }) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - self.previousFlags = SCNetworkReachabilityFlags() - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /** - Starts listening for changes in network reachability status. - - - returns: `true` if listening was started successfully, `false` otherwise. - */ - public func startListening() -> Bool { - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = UnsafeMutablePointer(Unmanaged.passUnretained(self).toOpaque()) - - let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(COpaquePointer(info)).takeUnretainedValue() - reachability.notifyListener(flags) - }, - &context - ) - - let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - - dispatch_async(listenerQueue) { - self.previousFlags = SCNetworkReachabilityFlags() - self.notifyListener(self.flags ?? SCNetworkReachabilityFlags()) - } - - return callbackEnabled && queueEnabled - } - - /** - Stops listening for changes in network reachability status. - */ - public func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - } - - // MARK: - Internal - Listener Notification - - func notifyListener(flags: SCNetworkReachabilityFlags) { - guard previousFlags != flags else { return } - previousFlags = flags - - listener?(networkReachabilityStatusForFlags(flags)) - } - - // MARK: - Internal - Network Reachability Status - - func networkReachabilityStatusForFlags(flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard flags.contains(.Reachable) else { return .NotReachable } - - var networkStatus: NetworkReachabilityStatus = .NotReachable - - if !flags.contains(.ConnectionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } - - if flags.contains(.ConnectionOnDemand) || flags.contains(.ConnectionOnTraffic) { - if !flags.contains(.InterventionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } - } - - #if os(iOS) - if flags.contains(.IsWWAN) { networkStatus = .Reachable(.WWAN) } - #endif - - return networkStatus - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -/** - Returns whether the two network reachability status values are equal. - - - parameter lhs: The left-hand side value to compare. - - parameter rhs: The right-hand side value to compare. - - - returns: `true` if the two values are equal, `false` otherwise. -*/ -public func ==( - lhs: NetworkReachabilityManager.NetworkReachabilityStatus, - rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ - switch (lhs, rhs) { - case (.Unknown, .Unknown): - return true - case (.NotReachable, .NotReachable): - return true - case let (.Reachable(lhsConnectionType), .Reachable(rhsConnectionType)): - return lhsConnectionType == rhsConnectionType - default: - return false - } -} - -#endif diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index a7dbcfeffaa3..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Contains all the `NSNotification` names posted by Alamofire with descriptions of each notification's payload. -public struct Notifications { - /// Used as a namespace for all `NSURLSessionTask` related notifications. - public struct Task { - /// Notification posted when an `NSURLSessionTask` is resumed. The notification `object` contains the resumed - /// `NSURLSessionTask`. - public static let DidResume = "com.alamofire.notifications.task.didResume" - - /// Notification posted when an `NSURLSessionTask` is suspended. The notification `object` contains the - /// suspended `NSURLSessionTask`. - public static let DidSuspend = "com.alamofire.notifications.task.didSuspend" - - /// Notification posted when an `NSURLSessionTask` is cancelled. The notification `object` contains the - /// cancelled `NSURLSessionTask`. - public static let DidCancel = "com.alamofire.notifications.task.didCancel" - - /// Notification posted when an `NSURLSessionTask` is completed. The notification `object` contains the - /// completed `NSURLSessionTask`. - public static let DidComplete = "com.alamofire.notifications.task.didComplete" - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index c54e58b32d6f..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,261 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/** - HTTP method definitions. - - See https://tools.ietf.org/html/rfc7231#section-4.3 -*/ -public enum Method: String { - case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT -} - -// MARK: ParameterEncoding - -/** - Used to specify the way in which a set of parameters are applied to a URL request. - - - `URL`: Creates a query string to be set as or appended to any existing URL query for `GET`, `HEAD`, - and `DELETE` requests, or set as the body for requests with any other HTTP method. The - `Content-Type` HTTP header field of an encoded request with HTTP body is set to - `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification - for how to encode collection types, the convention of appending `[]` to the key for array - values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested - dictionary values (`foo[bar]=baz`). - - - `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same - implementation as the `.URL` case, but always applies the encoded result to the URL. - - - `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is - set as the body of the request. The `Content-Type` HTTP header field of an encoded request is - set to `application/json`. - - - `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, - according to the associated format and write options values, which is set as the body of the - request. The `Content-Type` HTTP header field of an encoded request is set to - `application/x-plist`. - - - `Custom`: Uses the associated closure value to construct a new request given an existing request and - parameters. -*/ -public enum ParameterEncoding { - case URL - case URLEncodedInURL - case JSON - case PropertyList(NSPropertyListFormat, NSPropertyListWriteOptions) - case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) - - /** - Creates a URL request by encoding parameters and applying them onto an existing request. - - - parameter URLRequest: The request to have parameters applied. - - parameter parameters: The parameters to apply. - - - returns: A tuple containing the constructed request and the error that occurred during parameter encoding, - if any. - */ - public func encode( - URLRequest: URLRequestConvertible, - parameters: [String: AnyObject]?) - -> (NSMutableURLRequest, NSError?) - { - var mutableURLRequest = URLRequest.URLRequest - - guard let parameters = parameters else { return (mutableURLRequest, nil) } - - var encodingError: NSError? = nil - - switch self { - case .URL, .URLEncodedInURL: - func query(parameters: [String: AnyObject]) -> String { - var components: [(String, String)] = [] - - for key in parameters.keys.sort(<) { - let value = parameters[key]! - components += queryComponents(key, value) - } - - return (components.map { "\($0)=\($1)" } as [String]).joinWithSeparator("&") - } - - func encodesParametersInURL(method: Method) -> Bool { - switch self { - case .URLEncodedInURL: - return true - default: - break - } - - switch method { - case .GET, .HEAD, .DELETE: - return true - default: - return false - } - } - - if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { - if let - URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) - where !parameters.isEmpty - { - let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - URLComponents.percentEncodedQuery = percentEncodedQuery - mutableURLRequest.URL = URLComponents.URL - } - } else { - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue( - "application/x-www-form-urlencoded; charset=utf-8", - forHTTPHeaderField: "Content-Type" - ) - } - - mutableURLRequest.HTTPBody = query(parameters).dataUsingEncoding( - NSUTF8StringEncoding, - allowLossyConversion: false - ) - } - case .JSON: - do { - let options = NSJSONWritingOptions() - let data = try NSJSONSerialization.dataWithJSONObject(parameters, options: options) - - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError - } - case .PropertyList(let format, let options): - do { - let data = try NSPropertyListSerialization.dataWithPropertyList( - parameters, - format: format, - options: options - ) - - if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { - mutableURLRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - mutableURLRequest.HTTPBody = data - } catch { - encodingError = error as NSError - } - case .Custom(let closure): - (mutableURLRequest, encodingError) = closure(mutableURLRequest, parameters) - } - - return (mutableURLRequest, encodingError) - } - - /** - Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. - - - parameter key: The key of the query component. - - parameter value: The value of the query component. - - - returns: The percent-escaped, URL encoded query string components. - */ - public func queryComponents(key: String, _ value: AnyObject) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: AnyObject] { - for (nestedKey, value) in dictionary { - components += queryComponents("\(key)[\(nestedKey)]", value) - } - } else if let array = value as? [AnyObject] { - for value in array { - components += queryComponents("\(key)[]", value) - } - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /** - Returns a percent-escaped string following RFC 3986 for a query string key or value. - - RFC 3986 states that the following characters are "reserved" characters. - - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - should be percent-escaped in the query string. - - - parameter string: The string to be percent-escaped. - - - returns: The percent-escaped string. - */ - public func escape(string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet - allowedCharacterSet.removeCharactersInString(generalDelimitersToEncode + subDelimitersToEncode) - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, OSX 10.10, *) { - escaped = string.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = index.advancedBy(batchSize, limit: string.endIndex) - let range = startIndex.. Self - { - let credential = NSURLCredential(user: user, password: password, persistence: persistence) - - return authenticate(usingCredential: credential) - } - - /** - Associates a specified credential with the request. - - - parameter credential: The credential. - - - returns: The request. - */ - public func authenticate(usingCredential credential: NSURLCredential) -> Self { - delegate.credential = credential - - return self - } - - /** - Returns a base64 encoded basic authentication credential as an authorization header dictionary. - - - parameter user: The user. - - parameter password: The password. - - - returns: A dictionary with Authorization key and credential value or empty dictionary if encoding fails. - */ - public static func authorizationHeader(user user: String, password: String) -> [String: String] { - guard let data = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding) else { return [:] } - - let credential = data.base64EncodedStringWithOptions([]) - - return ["Authorization": "Basic \(credential)"] - } - - // MARK: - Progress - - /** - Sets a closure to be called periodically during the lifecycle of the request as data is written to or read - from the server. - - - For uploads, the progress closure returns the bytes written, total bytes written, and total bytes expected - to write. - - For downloads and data tasks, the progress closure returns the bytes read, total bytes read, and total bytes - expected to read. - - - parameter closure: The code to be executed periodically during the lifecycle of the request. - - - returns: The request. - */ - public func progress(closure: ((Int64, Int64, Int64) -> Void)? = nil) -> Self { - if let uploadDelegate = delegate as? UploadTaskDelegate { - uploadDelegate.uploadProgress = closure - } else if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataProgress = closure - } else if let downloadDelegate = delegate as? DownloadTaskDelegate { - downloadDelegate.downloadProgress = closure - } - - return self - } - - /** - Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. - - This closure returns the bytes most recently received from the server, not including data from previous calls. - If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - also important to note that the `response` closure will be called with nil `responseData`. - - - parameter closure: The code to be executed periodically during the lifecycle of the request. - - - returns: The request. - */ - public func stream(closure: (NSData -> Void)? = nil) -> Self { - if let dataDelegate = delegate as? DataTaskDelegate { - dataDelegate.dataStream = closure - } - - return self - } - - // MARK: - State - - /** - Resumes the request. - */ - public func resume() { - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } - - task.resume() - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidResume, object: task) - } - - /** - Suspends the request. - */ - public func suspend() { - task.suspend() - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidSuspend, object: task) - } - - /** - Cancels the request. - */ - public func cancel() { - if let - downloadDelegate = delegate as? DownloadTaskDelegate, - downloadTask = downloadDelegate.downloadTask - { - downloadTask.cancelByProducingResumeData { data in - downloadDelegate.resumeData = data - } - } else { - task.cancel() - } - - NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidCancel, object: task) - } - - // MARK: - TaskDelegate - - /** - The task delegate is responsible for handling all delegate callbacks for the underlying task as well as - executing all operations attached to the serial operation queue upon task completion. - */ - public class TaskDelegate: NSObject { - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: NSOperationQueue - - let task: NSURLSessionTask - let progress: NSProgress - - var data: NSData? { return nil } - var error: NSError? - - var initialResponseTime: CFAbsoluteTime? - var credential: NSURLCredential? - - init(task: NSURLSessionTask) { - self.task = task - self.progress = NSProgress(totalUnitCount: 0) - self.queue = { - let operationQueue = NSOperationQueue() - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.suspended = true - - if #available(OSX 10.10, *) { - operationQueue.qualityOfService = NSQualityOfService.Utility - } - - return operationQueue - }() - } - - deinit { - queue.cancelAllOperations() - queue.suspended = false - } - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? - var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? - var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? - var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - willPerformHTTPRedirection response: NSHTTPURLResponse, - newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { - var redirectRequest: NSURLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { - var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling - var credential: NSURLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if let - serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { - disposition = .UseCredential - credential = NSURLCredential(forTrust: serverTrust) - } else { - disposition = .CancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .RejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace) - - if credential != nil { - disposition = .UseCredential - } - } - } - - completionHandler(disposition, credential) - } - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { - var bodyStream: NSInputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - self.error = error - - if let - downloadDelegate = self as? DownloadTaskDelegate, - userInfo = error.userInfo as? [String: AnyObject], - resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData - { - downloadDelegate.resumeData = resumeData - } - } - - queue.suspended = false - } - } - } - - // MARK: - DataTaskDelegate - - class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate { - var dataTask: NSURLSessionDataTask? { return task as? NSURLSessionDataTask } - - private var totalBytesReceived: Int64 = 0 - private var mutableData: NSMutableData - override var data: NSData? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - private var expectedContentLength: Int64? - private var dataProgress: ((bytesReceived: Int64, totalBytesReceived: Int64, totalBytesExpectedToReceive: Int64) -> Void)? - private var dataStream: ((data: NSData) -> Void)? - - override init(task: NSURLSessionTask) { - mutableData = NSMutableData() - super.init(task: task) - } - - // MARK: - NSURLSessionDataDelegate - - // MARK: Override Closures - - var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? - var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didReceiveResponse response: NSURLResponse, - completionHandler: (NSURLSessionResponseDisposition -> Void)) - { - var disposition: NSURLSessionResponseDisposition = .Allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data: data) - } else { - mutableData.appendData(data) - } - - totalBytesReceived += data.length - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - dataProgress?( - bytesReceived: Int64(data.length), - totalBytesReceived: totalBytesReceived, - totalBytesExpectedToReceive: totalBytesExpected - ) - } - } - - func URLSession( - session: NSURLSession, - dataTask: NSURLSessionDataTask, - willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { - var cachedResponse: NSCachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } - } -} - -// MARK: - CustomStringConvertible - -extension Request: CustomStringConvertible { - - /** - The textual representation used when written to an output stream, which includes the HTTP method and URL, as - well as the response status code if a response has been received. - */ - public var description: String { - var components: [String] = [] - - if let HTTPMethod = request?.HTTPMethod { - components.append(HTTPMethod) - } - - if let URLString = request?.URL?.absoluteString { - components.append(URLString) - } - - if let response = response { - components.append("(\(response.statusCode))") - } - - return components.joinWithSeparator(" ") - } -} - -// MARK: - CustomDebugStringConvertible - -extension Request: CustomDebugStringConvertible { - func cURLRepresentation() -> String { - var components = ["$ curl -i"] - - guard let - request = self.request, - URL = request.URL, - host = URL.host - else { - return "$ curl command could not be created" - } - - if let HTTPMethod = request.HTTPMethod where HTTPMethod != "GET" { - components.append("-X \(HTTPMethod)") - } - - if let credentialStorage = self.session.configuration.URLCredentialStorage { - let protectionSpace = NSURLProtectionSpace( - host: host, - port: URL.port?.integerValue ?? 0, - protocol: URL.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) - - if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values { - for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") - } - } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") - } - } - } - - if session.configuration.HTTPShouldSetCookies { - if let - cookieStorage = session.configuration.HTTPCookieStorage, - cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } - components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") - } - } - - var headers: [NSObject: AnyObject] = [:] - - if let additionalHeaders = session.configuration.HTTPAdditionalHeaders { - for (field, value) in additionalHeaders where field != "Cookie" { - headers[field] = value - } - } - - if let headerFields = request.allHTTPHeaderFields { - for (field, value) in headerFields where field != "Cookie" { - headers[field] = value - } - } - - for (field, value) in headers { - components.append("-H \"\(field): \(value)\"") - } - - if let - HTTPBodyData = request.HTTPBody, - HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) - { - var escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\\\"", withString: "\\\\\"") - escapedBody = escapedBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") - - components.append("-d \"\(escapedBody)\"") - } - - components.append("\"\(URL.absoluteString)\"") - - return components.joinWithSeparator(" \\\n\t") - } - - /// The textual representation used when written to an output stream, in the form of a cURL command. - public var debugDescription: String { - return cURLRepresentation() - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 9c437ff6e416..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Used to store all response data returned from a completed `Request`. -public struct Response { - /// The URL request sent to the server. - public let request: NSURLRequest? - - /// The server's response to the URL request. - public let response: NSHTTPURLResponse? - - /// The data returned by the server. - public let data: NSData? - - /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the `Request`. - public let timeline: Timeline - - /** - Initializes the `Response` instance with the specified URL request, URL response, server data and response - serialization result. - - - parameter request: The URL request sent to the server. - - parameter response: The server's response to the URL request. - - parameter data: The data returned by the server. - - parameter result: The result of response serialization. - - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - - - returns: the new `Response` instance. - */ - public init( - request: NSURLRequest?, - response: NSHTTPURLResponse?, - data: NSData?, - result: Result, - timeline: Timeline = Timeline()) - { - self.request = request - self.response = response - self.data = data - self.result = result - self.timeline = timeline - } -} - -// MARK: - CustomStringConvertible - -extension Response: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return result.debugDescription - } -} - -// MARK: - CustomDebugStringConvertible - -extension Response: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data and the response serialization result. - public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.length ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joinWithSeparator("\n") - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 89e39544b8c9..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,378 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -// MARK: ResponseSerializer - -/** - The type in which all response serializers must conform to in order to serialize a response. -*/ -public protocol ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializerType`. - associatedtype SerializedObject - - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - associatedtype ErrorObject: ErrorType - - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result { get } -} - -// MARK: - - -/** - A generic `ResponseSerializerType` used to serialize a request, response, and data into a serialized object. -*/ -public struct ResponseSerializer: ResponseSerializerType { - /// The type of serialized object to be created by this `ResponseSerializer`. - public typealias SerializedObject = Value - - /// The type of error to be created by this `ResponseSerializer` if serialization fails. - public typealias ErrorObject = Error - - /** - A closure used by response handlers that takes a request, response, data and error and returns a result. - */ - public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result - - /** - Initializes the `ResponseSerializer` instance with the given serialize response closure. - - - parameter serializeResponse: The closure used to serialize the response. - - - returns: The new generic response serializer instance. - */ - public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result) { - self.serializeResponse = serializeResponse - } -} - -// MARK: - Default - -extension Request { - - /** - Adds a handler to be called once the request has finished. - - - parameter queue: The queue on which the completion handler is dispatched. - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Void) - -> Self - { - delegate.queue.addOperationWithBlock { - dispatch_async(queue ?? dispatch_get_main_queue()) { - completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) - } - } - - return self - } - - /** - Adds a handler to be called once the request has finished. - - - parameter queue: The queue on which the completion handler is dispatched. - - parameter responseSerializer: The response serializer responsible for serializing the request, response, - and data. - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func response( - queue queue: dispatch_queue_t? = nil, - responseSerializer: T, - completionHandler: Response -> Void) - -> Self - { - delegate.queue.addOperationWithBlock { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime - - let timeline = Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) - - let response = Response( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result, - timeline: timeline - ) - - dispatch_async(queue ?? dispatch_get_main_queue()) { completionHandler(response) } - } - - return self - } -} - -// MARK: - Data - -extension Request { - - /** - Creates a response serializer that returns the associated data as-is. - - - returns: A data response serializer. - */ - public static func dataResponseSerializer() -> ResponseSerializer { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSData()) } - - guard let validData = data else { - let failureReason = "Data could not be serialized. Input data was nil." - let error = Error.error(code: .DataSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - return .Success(validData) - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter completionHandler: The code to be executed once the request has finished. - - - returns: The request. - */ - public func responseData( - queue queue: dispatch_queue_t? = nil, - completionHandler: Response -> Void) - -> Self - { - return response(queue: queue, responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) - } -} - -// MARK: - String - -extension Request { - - /** - Creates a response serializer that returns a string initialized from the response data with the specified - string encoding. - - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - response, falling back to the default HTTP default character set, ISO-8859-1. - - - returns: A string response serializer. - */ - public static func stringResponseSerializer( - encoding encoding: NSStringEncoding? = nil) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success("") } - - guard let validData = data else { - let failureReason = "String could not be serialized. Input data was nil." - let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName where convertedEncoding == nil { - convertedEncoding = CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName) - ) - } - - let actualEncoding = convertedEncoding ?? NSISOLatin1StringEncoding - - if let string = String(data: validData, encoding: actualEncoding) { - return .Success(string) - } else { - let failureReason = "String could not be serialized with encoding: \(actualEncoding)" - let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - server response, falling back to the default HTTP default character set, - ISO-8859-1. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ - public func responseString( - queue queue: dispatch_queue_t? = nil, - encoding: NSStringEncoding? = nil, - completionHandler: Response -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: Request.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) - } -} - -// MARK: - JSON - -extension Request { - - /** - Creates a response serializer that returns a JSON object constructed from the response data using - `NSJSONSerialization` with the specified reading options. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - - returns: A JSON object response serializer. - */ - public static func JSONResponseSerializer( - options options: NSJSONReadingOptions = .AllowFragments) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } - - guard let validData = data where validData.length > 0 else { - let failureReason = "JSON could not be serialized. Input data was nil or zero length." - let error = Error.error(code: .JSONSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - do { - let JSON = try NSJSONSerialization.JSONObjectWithData(validData, options: options) - return .Success(JSON) - } catch { - return .Failure(error as NSError) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter options: The JSON serialization reading options. `.AllowFragments` by default. - - parameter completionHandler: A closure to be executed once the request has finished. - - - returns: The request. - */ - public func responseJSON( - queue queue: dispatch_queue_t? = nil, - options: NSJSONReadingOptions = .AllowFragments, - completionHandler: Response -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: Request.JSONResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -// MARK: - Property List - -extension Request { - - /** - Creates a response serializer that returns an object constructed from the response data using - `NSPropertyListSerialization` with the specified reading options. - - - parameter options: The property list reading options. `NSPropertyListReadOptions()` by default. - - - returns: A property list object response serializer. - */ - public static func propertyListResponseSerializer( - options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) - -> ResponseSerializer - { - return ResponseSerializer { _, response, data, error in - guard error == nil else { return .Failure(error!) } - - if let response = response where response.statusCode == 204 { return .Success(NSNull()) } - - guard let validData = data where validData.length > 0 else { - let failureReason = "Property list could not be serialized. Input data was nil or zero length." - let error = Error.error(code: .PropertyListSerializationFailed, failureReason: failureReason) - return .Failure(error) - } - - do { - let plist = try NSPropertyListSerialization.propertyListWithData(validData, options: options, format: nil) - return .Success(plist) - } catch { - return .Failure(error as NSError) - } - } - } - - /** - Adds a handler to be called once the request has finished. - - - parameter options: The property list reading options. `0` by default. - - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 - arguments: the URL request, the URL response, the server data and the result - produced while creating the property list. - - - returns: The request. - */ - public func responsePropertyList( - queue queue: dispatch_queue_t? = nil, - options: NSPropertyListReadOptions = NSPropertyListReadOptions(), - completionHandler: Response -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: Request.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index 4aabf08bf8b4..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// Result.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/** - Used to represent whether a request was successful or encountered an error. - - - Success: The request and all post processing operations were successful resulting in the serialization of the - provided associated value. - - Failure: The request encountered an error resulting in a failure. The associated values are the original data - provided by the server as well as the error that caused the failure. -*/ -public enum Result { - case Success(Value) - case Failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .Success: - return true - case .Failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .Success(let value): - return value - case .Failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .Success: - return nil - case .Failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .Success: - return "SUCCESS" - case .Failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .Success(let value): - return "SUCCESS: \(value)" - case .Failure(let error): - return "FAILURE: \(error)" - } - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index 7da516e8038e..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,304 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -public class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /** - Initializes the `ServerTrustPolicyManager` instance with the given policies. - - Since different servers and web services can have different leaf certificates, intermediate and even root - certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - pinning for host3 and disabling evaluation for host4. - - - parameter policies: A dictionary of all policies mapped to a particular host. - - - returns: The new `ServerTrustPolicyManager` instance. - */ - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /** - Returns the `ServerTrustPolicy` for the given host if applicable. - - By default, this method will return the policy that perfectly matches the given host. Subclasses could override - this method and implement more complex mapping implementations such as wildcards. - - - parameter host: The host to use when searching for a matching policy. - - - returns: The server trust policy for the given host if found. - */ - public func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension NSURLSession { - private struct AssociatedKeys { - static var ManagerKey = "NSURLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.ManagerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.ManagerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/** - The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when - connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust - with a given set of criteria to determine whether the server trust is valid and the connection should be made. - - Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other - vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged - to route all communication over an HTTPS connection with pinning enabled. - - - PerformDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to - validate the host provided by the challenge. Applications are encouraged to always - validate the host in production environments to guarantee the validity of the server's - certificate chain. - - - PinCertificates: Uses the pinned certificates to validate the server trust. The server trust is - considered valid if one of the pinned certificates match one of the server certificates. - By validating both the certificate chain and host, certificate pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - PinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered - valid if one of the pinned public keys match one of the server certificate public keys. - By validating both the certificate chain and host, public key pinning provides a very - secure form of server trust validation mitigating most, if not all, MITM attacks. - Applications are encouraged to always validate the host and require a valid certificate - chain in production environments. - - - DisableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. - - - CustomEvaluation: Uses the associated closure to evaluate the validity of the server trust. -*/ -public enum ServerTrustPolicy { - case PerformDefaultEvaluation(validateHost: Bool) - case PinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case PinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case DisableEvaluation - case CustomEvaluation((serverTrust: SecTrust, host: String) -> Bool) - - // MARK: - Bundle Location - - /** - Returns all certificates within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `.cer` files. - - - returns: All certificates within the given bundle. - */ - public static func certificatesInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.pathsForResourcesOfType(fileExtension, inDirectory: nil) - }.flatten()) - - for path in paths { - if let - certificateData = NSData(contentsOfFile: path), - certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /** - Returns all public keys within the given bundle with a `.cer` file extension. - - - parameter bundle: The bundle to search for all `*.cer` files. - - - returns: All public keys within the given bundle. - */ - public static func publicKeysInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificatesInBundle(bundle) { - if let publicKey = publicKeyForCertificate(certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /** - Evaluates whether the server trust is valid for the given host. - - - parameter serverTrust: The server trust to evaluate. - - parameter host: The host of the challenge protection space. - - - returns: Whether the server trust is valid. - */ - public func evaluateServerTrust(serverTrust: SecTrust, isValidForHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .PerformDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .PinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateDataForTrust(serverTrust) - let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData.isEqualToData(pinnedCertificateData) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .PinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, [policy]) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeysForTrust(serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .DisableEvaluation: - serverTrustIsValid = true - case let .CustomEvaluation(closure): - serverTrustIsValid = closure(serverTrust: serverTrust, host: host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType(kSecTrustResultInvalid) - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType(kSecTrustResultUnspecified) - let proceed = SecTrustResultType(kSecTrustResultProceed) - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateDataForTrust(trust: SecTrust) -> [NSData] { - var certificates: [SecCertificate] = [] - - for index in 0.. [NSData] { - return certificates.map { SecCertificateCopyData($0) as NSData } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeysForTrust(trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust where trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift deleted file mode 100644 index e463d9b2f818..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Stream.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if !os(watchOS) - -@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) -extension Manager { - private enum Streamable { - case Stream(String, Int) - case NetService(NSNetService) - } - - private func stream(streamable: Streamable) -> Request { - var streamTask: NSURLSessionStreamTask! - - switch streamable { - case .Stream(let hostName, let port): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithHostName(hostName, port: port) - } - case .NetService(let netService): - dispatch_sync(queue) { - streamTask = self.session.streamTaskWithNetService(netService) - } - } - - let request = Request(session: session, task: streamTask) - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - /** - Creates a request for bidirectional streaming with the given hostname and port. - - - parameter hostName: The hostname of the server to connect to. - - parameter port: The port of the server to connect to. - - - returns: The created stream request. - */ - public func stream(hostName hostName: String, port: Int) -> Request { - return stream(.Stream(hostName, port)) - } - - /** - Creates a request for bidirectional streaming with the given `NSNetService`. - - - parameter netService: The net service used to identify the endpoint. - - - returns: The created stream request. - */ - public func stream(netService netService: NSNetService) -> Request { - return stream(.NetService(netService)) - } -} - -// MARK: - - -@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) -extension Manager.SessionDelegate: NSURLSessionStreamDelegate { - - // MARK: Override Closures - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:readClosedForStreamTask:`. - public var streamTaskReadClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:writeClosedForStreamTask:`. - public var streamTaskWriteClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:betterRouteDiscoveredForStreamTask:`. - public var streamTaskBetterRouteDiscovered: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (NSURLSession, NSURLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue - } - } - - /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:streamTask:didBecomeInputStream:outputStream:`. - public var streamTaskDidBecomeInputStream: ((NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue - } - } - - // MARK: Delegate Methods - - /** - Tells the delegate that the read side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } - - /** - Tells the delegate that the write side of the connection has been closed. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } - - /** - Tells the delegate that the system has determined that a better route to the host is available. - - - parameter session: The session. - - parameter streamTask: The stream task. - */ - public func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } - - /** - Tells the delegate that the stream task has been completed and provides the unopened stream objects. - - - parameter session: The session. - - parameter streamTask: The stream task. - - parameter inputStream: The new input stream. - - parameter outputStream: The new output stream. - */ - public func URLSession( - session: NSURLSession, - streamTask: NSURLSessionStreamTask, - didBecomeInputStream inputStream: NSInputStream, - outputStream: NSOutputStream) - { - streamTaskDidBecomeInputStream?(session, streamTask, inputStream, outputStream) - } -} - -#endif diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift deleted file mode 100644 index f34770579877..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// Timeline.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. -public struct Timeline { - /// The time the request was initialized. - public let requestStartTime: CFAbsoluteTime - - /// The time the first bytes were received from or sent to the server. - public let initialResponseTime: CFAbsoluteTime - - /// The time when the request was completed. - public let requestCompletedTime: CFAbsoluteTime - - /// The time when the response serialization was completed. - public let serializationCompletedTime: CFAbsoluteTime - - /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: NSTimeInterval - - /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: NSTimeInterval - - /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: NSTimeInterval - - /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: NSTimeInterval - - /** - Creates a new `Timeline` instance with the specified request times. - - - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - Defaults to `0.0`. - - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - to `0.0`. - - - returns: The new `Timeline` instance. - */ - public init( - requestStartTime: CFAbsoluteTime = 0.0, - initialResponseTime: CFAbsoluteTime = 0.0, - requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { - self.requestStartTime = requestStartTime - self.initialResponseTime = initialResponseTime - self.requestCompletedTime = requestCompletedTime - self.serializationCompletedTime = serializationCompletedTime - - self.latency = initialResponseTime - requestStartTime - self.requestDuration = requestCompletedTime - requestStartTime - self.serializationDuration = serializationCompletedTime - requestCompletedTime - self.totalDuration = serializationCompletedTime - requestStartTime - } -} - -// MARK: - CustomStringConvertible - -extension Timeline: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the latency, the request - /// duration and the total duration. - public var description: String { - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joinWithSeparator(", ") + " }" - } -} - -// MARK: - CustomDebugStringConvertible - -extension Timeline: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes the request start time, the - /// initial response time, the request completed time, the serialization completed time, the latency, the request - /// duration and the total duration. - public var debugDescription: String { - let requestStartTime = String(format: "%.3f", self.requestStartTime) - let initialResponseTime = String(format: "%.3f", self.initialResponseTime) - let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) - let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Request Start Time\": " + requestStartTime, - "\"Initial Response Time\": " + initialResponseTime, - "\"Request Completed Time\": " + requestCompletedTime, - "\"Serialization Completed Time\": " + serializationCompletedTime, - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joinWithSeparator(", ") + " }" - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift deleted file mode 100644 index 21971e6e4657..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift +++ /dev/null @@ -1,376 +0,0 @@ -// -// Upload.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Manager { - private enum Uploadable { - case Data(NSURLRequest, NSData) - case File(NSURLRequest, NSURL) - case Stream(NSURLRequest, NSInputStream) - } - - private func upload(uploadable: Uploadable) -> Request { - var uploadTask: NSURLSessionUploadTask! - var HTTPBodyStream: NSInputStream? - - switch uploadable { - case .Data(let request, let data): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromData: data) - } - case .File(let request, let fileURL): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithRequest(request, fromFile: fileURL) - } - case .Stream(let request, let stream): - dispatch_sync(queue) { - uploadTask = self.session.uploadTaskWithStreamedRequest(request) - } - - HTTPBodyStream = stream - } - - let request = Request(session: session, task: uploadTask) - - if HTTPBodyStream != nil { - request.delegate.taskNeedNewBodyStream = { _, _ in - return HTTPBodyStream - } - } - - delegate[request.delegate.task] = request.delegate - - if startRequestsImmediately { - request.resume() - } - - return request - } - - // MARK: File - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { - return upload(.File(URLRequest.URLRequest, file)) - } - - /** - Creates a request for uploading a file to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter file: The file to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - file: NSURL) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - return upload(mutableURLRequest, file: file) - } - - // MARK: Data - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter data: The data to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { - return upload(.Data(URLRequest.URLRequest, data)) - } - - /** - Creates a request for uploading data to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter data: The data to upload - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - data: NSData) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, data: data) - } - - // MARK: Stream - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { - return upload(.Stream(URLRequest.URLRequest, stream)) - } - - /** - Creates a request for uploading a stream to the specified URL request. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter stream: The stream to upload. - - - returns: The created upload request. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - stream: NSInputStream) - -> Request - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload(mutableURLRequest, stream: stream) - } - - // MARK: MultipartFormData - - /// Default memory threshold used when encoding `MultipartFormData`. - public static let MultipartFormDataEncodingMemoryThreshold: UInt64 = 10 * 1024 * 1024 - - /** - Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - associated values. - - - Success: Represents a successful `MultipartFormData` encoding and contains the new `Request` along with - streaming information. - - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - error. - */ - public enum MultipartFormDataEncodingResult { - case Success(request: Request, streamingFromDisk: Bool, streamFileURL: NSURL?) - case Failure(ErrorType) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter method: The HTTP method. - - parameter URLString: The URL string. - - parameter headers: The HTTP headers. `nil` by default. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - method: Method, - _ URLString: URLStringConvertible, - headers: [String: String]? = nil, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - let mutableURLRequest = URLRequest(method, URLString, headers: headers) - - return upload( - mutableURLRequest, - multipartFormData: multipartFormData, - encodingMemoryThreshold: encodingMemoryThreshold, - encodingCompletion: encodingCompletion - ) - } - - /** - Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. - - It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - used for larger payloads such as video content. - - The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - technique was used. - - If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - - - parameter URLRequest: The URL request. - - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - `MultipartFormDataEncodingMemoryThreshold` by default. - - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - */ - public func upload( - URLRequest: URLRequestConvertible, - multipartFormData: MultipartFormData -> Void, - encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { - let formData = MultipartFormData() - multipartFormData(formData) - - let URLRequestWithContentType = URLRequest.URLRequest - URLRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - do { - let data = try formData.encode() - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, data: data), - streamingFromDisk: false, - streamFileURL: nil - ) - - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } else { - let fileManager = NSFileManager.defaultManager() - let tempDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data") - let fileName = NSUUID().UUIDString - let fileURL = directoryURL.URLByAppendingPathComponent(fileName) - - do { - try fileManager.createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) - try formData.writeEncodedDataToDisk(fileURL) - - dispatch_async(dispatch_get_main_queue()) { - let encodingResult = MultipartFormDataEncodingResult.Success( - request: self.upload(URLRequestWithContentType, file: fileURL), - streamingFromDisk: true, - streamFileURL: fileURL - ) - encodingCompletion?(encodingResult) - } - } catch { - dispatch_async(dispatch_get_main_queue()) { - encodingCompletion?(.Failure(error as NSError)) - } - } - } - } - } -} - -// MARK: - - -extension Request { - - // MARK: - UploadTaskDelegate - - class UploadTaskDelegate: DataTaskDelegate { - var uploadTask: NSURLSessionUploadTask? { return task as? NSURLSessionUploadTask } - var uploadProgress: ((Int64, Int64, Int64) -> Void)! - - // MARK: - NSURLSessionTaskDelegate - - // MARK: Override Closures - - var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? - - // MARK: Delegate Methods - - func URLSession( - session: NSURLSession, - task: NSURLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - progress.totalUnitCount = totalBytesExpectedToSend - progress.completedUnitCount = totalBytesSent - - uploadProgress?(bytesSent, totalBytesSent, totalBytesExpectedToSend) - } - } - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index b94e07d1e4eb..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,214 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - - /** - Used to represent whether validation was successful or encountered an error resulting in a failure. - - - Success: The validation was successful. - - Failure: The validation failed encountering the provided error. - */ - public enum ValidationResult { - case Success - case Failure(NSError) - } - - /** - A closure used to validate a request that takes a URL request and URL response, and returns whether the - request was valid. - */ - public typealias Validation = (NSURLRequest?, NSHTTPURLResponse) -> ValidationResult - - /** - Validates the request, using the specified closure. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter validation: A closure to validate the request. - - - returns: The request. - */ - public func validate(validation: Validation) -> Self { - delegate.queue.addOperationWithBlock { - if let - response = self.response where self.delegate.error == nil, - case let .Failure(error) = validation(self.request, response) - { - self.delegate.error = error - } - } - - return self - } - - // MARK: - Status Code - - /** - Validates that the response has a status code in the specified range. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter range: The range of acceptable status codes. - - - returns: The request. - */ - public func validate(statusCode acceptableStatusCode: S) -> Self { - return validate { _, response in - if acceptableStatusCode.contains(response.statusCode) { - return .Success - } else { - let failureReason = "Response status code was unacceptable: \(response.statusCode)" - - let error = NSError( - domain: Error.Domain, - code: Error.Code.StatusCodeValidationFailed.rawValue, - userInfo: [ - NSLocalizedFailureReasonErrorKey: failureReason, - Error.UserInfoKeys.StatusCode: response.statusCode - ] - ) - - return .Failure(error) - } - } - } - - // MARK: - Content-Type - - private struct MIMEType { - let type: String - let subtype: String - - init?(_ string: String) { - let components: [String] = { - let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) - let split = stripped.substringToIndex(stripped.rangeOfString(";")?.startIndex ?? stripped.endIndex) - return split.componentsSeparatedByString("/") - }() - - if let - type = components.first, - subtype = components.last - { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(MIME: MIMEType) -> Bool { - switch (type, subtype) { - case (MIME.type, MIME.subtype), (MIME.type, "*"), ("*", MIME.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - /** - Validates that the response has a content type in the specified array. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - - - returns: The request. - */ - public func validate(contentType acceptableContentTypes: S) -> Self { - return validate { _, response in - guard let validData = self.delegate.data where validData.length > 0 else { return .Success } - - if let - responseContentType = response.MIMEType, - responseMIMEType = MIMEType(responseContentType) - { - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { - return .Success - } - } - } else { - for contentType in acceptableContentTypes { - if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" { - return .Success - } - } - } - - let contentType: String - let failureReason: String - - if let responseContentType = response.MIMEType { - contentType = responseContentType - - failureReason = ( - "Response content type \"\(responseContentType)\" does not match any acceptable " + - "content types: \(acceptableContentTypes)" - ) - } else { - contentType = "" - failureReason = "Response content type was missing and acceptable content type does not match \"*/*\"" - } - - let error = NSError( - domain: Error.Domain, - code: Error.Code.ContentTypeValidationFailed.rawValue, - userInfo: [ - NSLocalizedFailureReasonErrorKey: failureReason, - Error.UserInfoKeys.ContentType: contentType - ] - ) - - return .Failure(error) - } - } - - // MARK: - Automatic - - /** - Validates that the response has a status code in the default acceptable range of 200...299, and that the content - type matches any specified in the Accept HTTP header field. - - If validation fails, subsequent calls to response handlers will have an associated error. - - - returns: The request. - */ - public func validate() -> Self { - let acceptableStatusCodes: Range = 200..<300 - let acceptableContentTypes: [String] = { - if let accept = request?.valueForHTTPHeaderField("Accept") { - return accept.componentsSeparatedByString(",") - } - - return ["*/*"] - }() - - return validate(statusCode: acceptableStatusCodes).validate(contentType: acceptableContentTypes) - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json deleted file mode 100644 index b0f254bb81c2..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "PetstoreClient", - "platforms": { - "ios": "8.0", - "osx": "10.9" - }, - "version": "0.0.1", - "source": { - "git": "git@github.com:swagger-api/swagger-mustache.git", - "tag": "v1.0.0" - }, - "authors": "", - "license": "Proprietary", - "homepage": "https://github.com/swagger-api/swagger-codegen", - "summary": "PetstoreClient", - "source_files": "PetstoreClient/Classes/Swaggers/**/*.swift", - "dependencies": { - "PromiseKit": [ - "~> 3.1.1" - ], - "Alamofire": [ - "~> 3.4.1" - ] - } -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock deleted file mode 100644 index f63b50721dde..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock +++ /dev/null @@ -1,41 +0,0 @@ -PODS: - - Alamofire (3.4.2) - - OMGHTTPURLRQ (3.1.3): - - OMGHTTPURLRQ/RQ (= 3.1.3) - - OMGHTTPURLRQ/FormURLEncode (3.1.3) - - OMGHTTPURLRQ/RQ (3.1.3): - - OMGHTTPURLRQ/FormURLEncode - - OMGHTTPURLRQ/UserAgent - - OMGHTTPURLRQ/UserAgent (3.1.3) - - PetstoreClient (0.0.1): - - Alamofire (~> 3.4.1) - - PromiseKit (~> 3.1.1) - - PromiseKit (3.1.1): - - PromiseKit/Foundation (= 3.1.1) - - PromiseKit/QuartzCore (= 3.1.1) - - PromiseKit/UIKit (= 3.1.1) - - PromiseKit/CorePromise (3.1.1) - - PromiseKit/Foundation (3.1.1): - - OMGHTTPURLRQ (~> 3.1.0) - - PromiseKit/CorePromise - - PromiseKit/QuartzCore (3.1.1): - - PromiseKit/CorePromise - - PromiseKit/UIKit (3.1.1): - - PromiseKit/CorePromise - -DEPENDENCIES: - - PetstoreClient (from `../`) - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: 6aa33201d20d069e1598891cf928883ff1888c7a - OMGHTTPURLRQ: a547be1b9721ddfbf9d08aab56ab72dc4c1cc417 - PetstoreClient: c1836ff59f46bfeae155be0b53bc9ba55b827bc9 - PromiseKit: 4e8127c22a9b29d1b44958ab2ec762ea6115cbfb - -PODFILE CHECKSUM: 84472aca2a88b7f7ed9fcd63e9f5fdb5ad4aab94 - -COCOAPODS: 1.1.1 diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 0428f9c6d062..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1662 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 009A705EB41A7BD11E77200CD1FB65CC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */; }; - 029AC3390FBF6FE9A66FC3D937065ED8 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 061D9A45538674253A809E070A8A089D /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */; }; - 086EF9C01D071D88D853A11539D42B9F /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F0266C5AE0B23A436291F6647902086 /* Models.swift */; }; - 0DB7734F8CD7D40D922F73C1C9146EE4 /* OMGFormURLEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 13C8FE870121B96B85458487D176292A /* OMGUserAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 162CFCD9335EB4583A6247A6116FEB0D /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 19481BE7602C732E16A4C1FDE7D800DA /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */; }; - 1B3395001A4E5AB2E7EEEFE9964348B5 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E49ED544745AD479AFA0B6766F441CE /* after.swift */; }; - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2192B0DEE9028936168890C1D6EB0259 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = 770621722C3B98D9380F76F3310EAA7F /* Download.swift */; }; - 21B837E7DB2A98D7B3E2D64AABA828F2 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */; }; - 23FFDF15FBA1EC26909CB3BC5CCEB3A8 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; }; - 258F28EA87BCDBE2307CD728D6847F44 /* OMGHTTPURLRQ.h in Headers */ = {isa = PBXBuildFile; fileRef = 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 28AF3FD0C6798D6A36A13C2AB39F8239 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F60254382C7024DDFD16533FB81750A /* Result.swift */; }; - 2A926E5EA0483C43023F396648F31100 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */; }; - 2C65AE47419BA083958A5D9F760F7150 /* OMGHTTPURLRQ-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */; }; - 2E3A55DBE5D58E6E6B3068D0BF84BA42 /* OMGUserAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2FF723F26615EB2ACAE54BDA6E3707DC /* Pods-SwaggerClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */; }; - 31D35FA0B2173504DBA8E2F450CAC665 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */; }; - 31F8B86E3672D0B828B6352C875649C4 /* Pods-SwaggerClientTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 32A893A9FE628EDBC482D40F753699F9 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */; }; - 3360421DE3672EDEC5D92072E5FB3DEA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - 33D7D29D9E53DA84337D305017107505 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3FE36566EFBFEFABC46589686A7ADCD2 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435721889B71489503A007D233559DF /* Validation.swift */; }; - 4CDF7F31FC91171478EC0A2E2AB4E758 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */; }; - 5344CCD94F668BD41A0417B3A3CDF4F2 /* OMGFormURLEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 54BAF231DB704DB87968C54637AF9551 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; }; - 55F5CB213AA2AE0675636AC73B7D7FB1 /* OMGHTTPURLRQ.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 563431FCE9268B58BFD2F32E358673C6 /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */; }; - 57BFFADED3A561DB8420A8B74A5A57BB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */; }; - 58597FACD9B948EB5E4EB1A96E84F9DE /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */; }; - 5919AA12FFE36B8D4D60D7032547A2B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - 5C067F2478F7DD077A0496925F57CE8C /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5ECBDDFA4329B4AB812B4A10DBD2EB1A /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */; }; - 5F193AFDA8E41A904D4B657769F49A93 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */; }; - 629C5CA00E2A6A40D7AEF34A7FD7772F /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66130A4C8A83C11558EC154FA1C9D191 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 4765491FCD8E096D84D4E57E005B8B49 /* after.m */; }; - 689CD9721F90D45A57369D76461CA5E2 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */; }; - 68B6B55AA10FA42481892FE79996D4F0 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */; }; - 6ADCA5D4BB1C66A8FC959C38CAEA4488 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6FA4548F5D2921C78F45295A21147A04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - 74231A47F9018E69CB8390B3BD9815B8 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 955F5499BB7496155FBF443B524F1D50 /* hang.m */; }; - 7519B50597E2DC5B47FC6927BA94D3A7 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7546CDAE72452E874E5DB53099BF3E70 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */; }; - 7892B90D39A86C32BD7ECFF8F6C52A38 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3192434754120C2AAF44818AEE054B /* Request.swift */; }; - 7A2A45654491E53EA0DF0C7749C7D6BB /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; }; - 7EC6F570997E9A0CC65AD7E7E319C0EF /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */; }; - 7F89336AE817C0C79287405B01352B8F /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; }; - 8179D1D51A9219B01C0C007F96F02F33 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */; }; - 897985FA042CD12B825C3032898FAB26 /* Pods-SwaggerClientTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */; }; - 8A858C9291A59130A4A3AE2FB193E480 /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */; }; - 8ADEA58D7C48EC4973D667F87C5AE948 /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */; }; - 8BC2037248D2FA8B2E2475AC2E466494 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */; }; - 98971D531D9D7138ED04B55FE458D66D /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */; }; - 989ED6D4ECDEF446FB68EFF07F0CBEF5 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */; }; - 98C216E54478D7F70674111361A4DB7E /* Pods-SwaggerClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9B70D1F82BB1FA9EAEF67815AB211B47 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */; }; - 9C88873949B0DCF8A580D0F65A43A482 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */; }; - 9E16513086BC96F16B7F73065AE84AC4 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */; }; - A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - A3C3B39CE3715B4260DC6FF0B621C142 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */; }; - A3D61ED4990E52E06A3315F2A9A00C6D /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */; }; - AF02896B7B6B213C98324CD75871275A /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */; }; - AF1AE4A9DCBCD5BEA4818AB39C73F2FB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */; }; - B067653C1D7B7214CD0079A279326610 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */; }; - B1A09AAC19DAB39B1C7F172CEBF0AAAD /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */; }; - B924DB98A633A09B12A6226F75261F83 /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */; }; - BF43C103A91BDDC98FA10577CBA76D8B /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C2249D68F55536B774806E6ED01D3431 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */; }; - C3EC2C7BE760D6CEE606445A1AE2E071 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */; }; - C5938D7FB0EC73BE33F4A6B31BE937B9 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */; }; - C884C9ADEA7330CF670815C9689FBBD9 /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */; }; - CEE2E4C0A2875A6C0CA9BB46572D6224 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */; }; - CEF24FA13891DB5422B2DAF72DE83A9A /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */; }; - D02588110E13C2C2F223EAE690848951 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */; }; - D13DFBC6575E7DB809A1420CB9F920B5 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */; }; - D2230D11A1EE4A48E9EC72EA44D09EAC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */; }; - D32130A2C8AC5B1FF21AF43BCC2B5217 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - D3A23B867EBFCD3AC86370D26250C290 /* OMGHTTPURLRQ-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D509E607CAE14D8848E2BBAC478BEED5 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB573F3C977C55072704AA24EC06164 /* Promise.swift */; }; - D5ECD91CE99A115543BEC3B993C11BD3 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */; }; - D733EB627BBBA34769C0CDEF5ABE0E41 /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */; }; - DB9ED067DD1525127DFBE4B5647E502C /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */; }; - E5E62E286336AB2FBB84501E1ACEEE7C /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */; }; - E7D7EF4C9B8164062D3C5E6EA7C534C2 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */; }; - E968D568838BC789817F6009838349A3 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */; }; - EC284D0372D446702CC9585351E4027D /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */; }; - ECD1DE9F631F8BCD514213BF97385BAE /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */; }; - EECED5D6A7CD41D58DF352339C8C4844 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; - EF45D47D7EBC09983C83946F2BB75C92 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EF4BCB7BBAB19687FAD3A5A71C859A7F /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */; }; - EF9B6103AC1A233089E5317B1E2D8031 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8072E1108951F272C003553FC8926C7 /* APIs.swift */; }; - F38E53627E8AD5C92AF674C15A3A2493 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C307C0A58A490D3080DB4C1E745C973 /* when.m */; }; - F6BC9BD76DB32C32BFDAD6582DC9F9B0 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */; }; - F84E18C37A7B3B8A338E817574491335 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */; }; - F986101B7E81C6AABC67FF43C958D54A /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */; }; - FADE7DCB53BC63ECC585A5192BC15843 /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FC438D87EC736F347E1068A05360974E /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FCA5211A7610129D1EAFC03D5F5351D2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */; }; - FCB8ADBF2A01486B7D575EA3326A70BD /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */; }; - FCDEC7CF7180ECD18CA73EB08EA4624D /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */; }; - FF2BDB83CB6FE636673DD089D26FBCB8 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 094864AE73DBB274F1E39300864E9C62 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1FCDFB2162BF49E98CC34F69A4EB87B9; - remoteInfo = PromiseKit; - }; - 1F4208A7D556EA95487DDE364B0345D5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6AA38233456D5A22BF4E286D26DBBC53; - remoteInfo = PetstoreClient; - }; - 26F113882698B5132DB9F4537EF58E9A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; - remoteInfo = Alamofire; - }; - 65851406A9AA058E6966942F3A75BEFB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5AD1507205D908987C216D989FDDD0CD; - remoteInfo = OMGHTTPURLRQ; - }; - CC71B8F089BD4B650825DDAA5DB71E07 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; - remoteInfo = Alamofire; - }; - E66AC3FE6854646CAC1BEA7B966F17B0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1FCDFB2162BF49E98CC34F69A4EB87B9; - remoteInfo = PromiseKit; - }; - FB51D93BE6962BF86154BCCE6C6161E9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5AD1507205D908987C216D989FDDD0CD; - remoteInfo = OMGHTTPURLRQ; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = ""; }; - 02F28E719AA874BE9213D6CF8CE7E36B /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = ""; }; - 0435721889B71489503A007D233559DF /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PMKAlertController.swift; path = Categories/UIKit/PMKAlertController.swift; sourceTree = ""; }; - 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLDataPromise.swift; path = Sources/URLDataPromise.swift; sourceTree = ""; }; - 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 11683764D40FE241FCEEB379EE92E817 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; - 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Categories/UIKit/UIView+AnyPromise.h"; sourceTree = ""; }; - 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Categories/Foundation/afterlife.swift; sourceTree = ""; }; - 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; - 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - 1F60254382C7024DDFD16533FB81750A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; - 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = ""; }; - 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; - 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSError+Cancellation.h"; path = "Sources/NSError+Cancellation.h"; sourceTree = ""; }; - 2FF17440CCD2E1A69791A4AA23325AD5 /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = ""; }; - 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OMGHTTPURLRQ-umbrella.h"; sourceTree = ""; }; - 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = ""; }; - 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = State.swift; path = Sources/State.swift; sourceTree = ""; }; - 3E49ED544745AD479AFA0B6766F441CE /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClient-umbrella.h"; sourceTree = ""; }; - 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/OMGHTTPURLRQ.m; sourceTree = ""; }; - 3F16B43ABD2C8CD4A311AA1AB3B6C02F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 43FC49AA70D3E2A84CAED9C37BE9C4B5 /* Pods-SwaggerClientTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClientTests-frameworks.sh"; sourceTree = ""; }; - 467F288FF1A023115720F192FD4D9297 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; - 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PetstoreClient-dummy.m"; sourceTree = ""; }; - 4765491FCD8E096D84D4E57E005B8B49 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AnyPromise.h"; path = "Categories/UIKit/UIAlertView+AnyPromise.h"; sourceTree = ""; }; - 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = ""; }; - 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Categories/UIKit/UIViewController+AnyPromise.m"; sourceTree = ""; }; - 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/OMGFormURLEncode.m; sourceTree = ""; }; - 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActionSheet+AnyPromise.h"; path = "Categories/UIKit/UIActionSheet+AnyPromise.h"; sourceTree = ""; }; - 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Categories/Foundation/NSURLSession+Promise.swift"; sourceTree = ""; }; - 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Categories/UIKit/UIView+Promise.swift"; sourceTree = ""; }; - 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Categories/Foundation/NSObject+Promise.swift"; sourceTree = ""; }; - 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = ""; }; - 705D1370384B46A3E5A39B39E7B4D181 /* OMGHTTPURLRQ-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OMGHTTPURLRQ-prefix.pch"; sourceTree = ""; }; - 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Source/Error.swift; sourceTree = ""; }; - 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 770621722C3B98D9380F76F3310EAA7F /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; - 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Categories/Foundation/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; - 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Categories/UIKit/UIViewController+AnyPromise.h"; sourceTree = ""; }; - 7C8E63660D346FD8ED2A97242E74EA09 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7D3192434754120C2AAF44818AEE054B /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 835E52C658674D7A44ED95B966432726 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; - 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/OMGHTTPURLRQ.h; sourceTree = ""; }; - 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = dispatch_promise.swift; path = Sources/dispatch_promise.swift; sourceTree = ""; }; - 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIAlertView+Promise.swift"; path = "Categories/UIKit/UIAlertView+Promise.swift"; sourceTree = ""; }; - 8F0266C5AE0B23A436291F6647902086 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 8F8078A9DEC41CD886A8676D889912A4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OMGHTTPURLRQ-dummy.m"; sourceTree = ""; }; - 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLConnection+Promise.swift"; path = "Categories/Foundation/NSURLConnection+Promise.swift"; sourceTree = ""; }; - 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/OMGUserAgent.m; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 94F9363EEBC7855FA6B9A6B7485D5170 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 955F5499BB7496155FBF443B524F1D50 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OMGHTTPURLRQ.framework; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9C307C0A58A490D3080DB4C1E745C973 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; - 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AnyPromise.m"; path = "Categories/UIKit/UIAlertView+AnyPromise.m"; sourceTree = ""; }; - A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; - AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; - B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Umbrella.h; path = Sources/Umbrella.h; sourceTree = ""; }; - B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Properties.swift"; path = "Sources/Promise+Properties.swift"; sourceTree = ""; }; - B349821C1F2B2C5F593BC228C462C99D /* OMGHTTPURLRQ.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OMGHTTPURLRQ.modulemap; sourceTree = ""; }; - B3A144887C8B13FD888B76AB096B0CA1 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; - B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewController+Promise.swift"; path = "Categories/UIKit/UIViewController+Promise.swift"; sourceTree = ""; }; - BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stream.swift; path = Source/Stream.swift; sourceTree = ""; }; - BCF2D4DFF08D2A18E8C8FE4C4B4633FB /* Pods-SwaggerClient-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-frameworks.sh"; sourceTree = ""; }; - BDEAF9E48610133B23BB992381D0E22B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = join.swift; path = Sources/join.swift; sourceTree = ""; }; - CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActionSheet+AnyPromise.m"; path = "Categories/UIKit/UIActionSheet+AnyPromise.m"; sourceTree = ""; }; - CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - D2841E5E2183846280B97F6E660DA26C /* Pods-SwaggerClient-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-resources.sh"; sourceTree = ""; }; - D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - D3A577E7C7DF4A2157D9001CA0D40A72 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PromiseKit.modulemap; sourceTree = ""; }; - D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - D8072E1108951F272C003553FC8926C7 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLConnection+AnyPromise.m"; path = "Categories/Foundation/NSURLConnection+AnyPromise.m"; sourceTree = ""; }; - DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; - DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; - DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Categories/Foundation/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; - DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CALayer+AnyPromise.m"; path = "Categories/QuartzCore/CALayer+AnyPromise.m"; sourceTree = ""; }; - DDB573F3C977C55072704AA24EC06164 /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIActionSheet+Promise.swift"; path = "Categories/UIKit/UIActionSheet+Promise.swift"; sourceTree = ""; }; - DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClient.modulemap"; sourceTree = ""; }; - DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLConnection+AnyPromise.h"; path = "Categories/Foundation/NSURLConnection+AnyPromise.h"; sourceTree = ""; }; - E1E4BCB344D3C100253B24B79421F00A /* Pods-SwaggerClient-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-acknowledgements.plist"; sourceTree = ""; }; - E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - E3D1141B63DF38660CD6F3AC588A782B /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PetstoreClient.modulemap; sourceTree = ""; }; - E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CALayer+AnyPromise.h"; path = "Categories/QuartzCore/CALayer+AnyPromise.h"; sourceTree = ""; }; - E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - E4E6F4A58FE7868CA2177D3AC79AD2FA /* Pods-SwaggerClientTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClientTests-resources.sh"; sourceTree = ""; }; - E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OMGHTTPURLRQ.xcconfig; sourceTree = ""; }; - EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Categories/UIKit/UIView+AnyPromise.m"; sourceTree = ""; }; - EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Categories/Foundation/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; - F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - F0D4E00A8974E74325E9E53D456F9AD4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClientTests-umbrella.h"; sourceTree = ""; }; - F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FB170EFD14935F121CDE3211DB4C5CA3 /* Pods-SwaggerClientTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClientTests-acknowledgements.markdown"; sourceTree = ""; }; - FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 364E2313E2B201E3BBE0ED3C8DDF7812 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6FA4548F5D2921C78F45295A21147A04 /* Foundation.framework in Frameworks */, - 7F89336AE817C0C79287405B01352B8F /* OMGHTTPURLRQ.framework in Frameworks */, - 57BFFADED3A561DB8420A8B74A5A57BB /* QuartzCore.framework in Frameworks */, - AF1AE4A9DCBCD5BEA4818AB39C73F2FB /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 87AF7EC7404199AC8C5D22375A6059BF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D32130A2C8AC5B1FF21AF43BCC2B5217 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 93A52D8380E47350C27ABFF726B0EE7D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3360421DE3672EDEC5D92072E5FB3DEA /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 99195E4207764744AEC07ECCBCD550EB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BC1E0CC70F02685289292200DADFB7F0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7A2A45654491E53EA0DF0C7749C7D6BB /* Alamofire.framework in Frameworks */, - 5919AA12FFE36B8D4D60D7032547A2B5 /* Foundation.framework in Frameworks */, - 23FFDF15FBA1EC26909CB3BC5CCEB3A8 /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BCD2EA67C3EE2725B5C1EEADB0F66AF4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - EECED5D6A7CD41D58DF352339C8C4844 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00ED77B3FFE891B16DC5B4DD2FCC0408 /* UserAgent */ = { - isa = PBXGroup; - children = ( - 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */, - 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */, - ); - name = UserAgent; - sourceTree = ""; - }; - 01A9CB10E1E9A90B6A796034AF093E8C /* Products */ = { - isa = PBXGroup; - children = ( - F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */, - 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */, - FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */, - CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */, - FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */, - 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */, - ); - name = Products; - sourceTree = ""; - }; - 1322FED69118C64DAD026CAF7F4C38C6 /* Models */ = { - isa = PBXGroup; - children = ( - D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */, - 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */, - 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */, - 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */, - 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */, - ); - name = Models; - path = Models; - sourceTree = ""; - }; - 188F1582EFF9CD3E8AB3A7470820B51F /* PromiseKit */ = { - isa = PBXGroup; - children = ( - 72B5E9FE2F2C23CD28C86A837D09964A /* CorePromise */, - 79A7166061336F6A7FF214DB285A9584 /* Foundation */, - 2115C8F445286DAD6754A21C2ABE2E78 /* QuartzCore */, - 977CD7DB18C38452FB8DCFCEC690CBDE /* Support Files */, - 933F0A2EBD44D53190D1E9FAF3F54AFB /* UIKit */, - ); - name = PromiseKit; - path = PromiseKit; - sourceTree = ""; - }; - 2115C8F445286DAD6754A21C2ABE2E78 /* QuartzCore */ = { - isa = PBXGroup; - children = ( - E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */, - DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */, - ); - name = QuartzCore; - sourceTree = ""; - }; - 22F52349E1BE90FC6E064DAAC9EA9612 /* Development Pods */ = { - isa = PBXGroup; - children = ( - E9F8459055B900A58FB97600A53E5D1C /* PetstoreClient */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 27098387544928716460DD8F5024EE8A /* Pods */ = { - isa = PBXGroup; - children = ( - 41488276780D879BE61AA0617BDC29A0 /* Alamofire */, - 6C55196C7E1A0F95D0BEFD790EA1450C /* OMGHTTPURLRQ */, - 188F1582EFF9CD3E8AB3A7470820B51F /* PromiseKit */, - ); - name = Pods; - sourceTree = ""; - }; - 41488276780D879BE61AA0617BDC29A0 /* Alamofire */ = { - isa = PBXGroup; - children = ( - FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */, - 770621722C3B98D9380F76F3310EAA7F /* Download.swift */, - 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */, - 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */, - CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */, - FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */, - 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */, - E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */, - 7D3192434754120C2AAF44818AEE054B /* Request.swift */, - 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */, - DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */, - 1F60254382C7024DDFD16533FB81750A /* Result.swift */, - 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */, - BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */, - 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */, - A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */, - 0435721889B71489503A007D233559DF /* Validation.swift */, - DFFDACE0170FB00C7ECFDA52A87A7665 /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - 45199ED47CEA398ADDDFDE8F9D0A591D /* Support Files */ = { - isa = PBXGroup; - children = ( - 8F8078A9DEC41CD886A8676D889912A4 /* Info.plist */, - B349821C1F2B2C5F593BC228C462C99D /* OMGHTTPURLRQ.modulemap */, - E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */, - 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */, - 705D1370384B46A3E5A39B39E7B4D181 /* OMGHTTPURLRQ-prefix.pch */, - 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/OMGHTTPURLRQ"; - sourceTree = ""; - }; - 4EE5FA0111D74A644A1CAA11AE22251D /* iOS */ = { - isa = PBXGroup; - children = ( - AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */, - DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */, - 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 6C55196C7E1A0F95D0BEFD790EA1450C /* OMGHTTPURLRQ */ = { - isa = PBXGroup; - children = ( - B00B1E51F2524127FFF78DB52869057E /* FormURLEncode */, - 9466970616DD9491B9B80845EBAF6997 /* RQ */, - 45199ED47CEA398ADDDFDE8F9D0A591D /* Support Files */, - 00ED77B3FFE891B16DC5B4DD2FCC0408 /* UserAgent */, - ); - name = OMGHTTPURLRQ; - path = OMGHTTPURLRQ; - sourceTree = ""; - }; - 72B5E9FE2F2C23CD28C86A837D09964A /* CorePromise */ = { - isa = PBXGroup; - children = ( - 4765491FCD8E096D84D4E57E005B8B49 /* after.m */, - 3E49ED544745AD479AFA0B6766F441CE /* after.swift */, - D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */, - EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */, - 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */, - 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */, - 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */, - DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */, - 955F5499BB7496155FBF443B524F1D50 /* hang.m */, - E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */, - BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */, - 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */, - DDB573F3C977C55072704AA24EC06164 /* Promise.swift */, - B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */, - 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */, - 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */, - 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */, - B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */, - 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */, - 9C307C0A58A490D3080DB4C1E745C973 /* when.m */, - DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */, - ); - name = CorePromise; - sourceTree = ""; - }; - 79A7166061336F6A7FF214DB285A9584 /* Foundation */ = { - isa = PBXGroup; - children = ( - 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */, - EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */, - DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */, - 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */, - 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */, - E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */, - D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */, - 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */, - 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */, - ); - name = Foundation; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 22F52349E1BE90FC6E064DAAC9EA9612 /* Development Pods */, - E85F5154C248966A1EC7B7B6EACB20CF /* Frameworks */, - 27098387544928716460DD8F5024EE8A /* Pods */, - 01A9CB10E1E9A90B6A796034AF093E8C /* Products */, - C1A60D10CED0E61146591438999C7502 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 88CE2B3F08C34DDB098AD8A5DCC1DF1E /* Pods-SwaggerClient */ = { - isa = PBXGroup; - children = ( - 7C8E63660D346FD8ED2A97242E74EA09 /* Info.plist */, - DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */, - 2FF17440CCD2E1A69791A4AA23325AD5 /* Pods-SwaggerClient-acknowledgements.markdown */, - E1E4BCB344D3C100253B24B79421F00A /* Pods-SwaggerClient-acknowledgements.plist */, - 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */, - BCF2D4DFF08D2A18E8C8FE4C4B4633FB /* Pods-SwaggerClient-frameworks.sh */, - D2841E5E2183846280B97F6E660DA26C /* Pods-SwaggerClient-resources.sh */, - 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */, - 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */, - 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */, - ); - name = "Pods-SwaggerClient"; - path = "Target Support Files/Pods-SwaggerClient"; - sourceTree = ""; - }; - 8F6D133867EE63820DFB7E83F4C51252 /* Support Files */ = { - isa = PBXGroup; - children = ( - F0D4E00A8974E74325E9E53D456F9AD4 /* Info.plist */, - E3D1141B63DF38660CD6F3AC588A782B /* PetstoreClient.modulemap */, - DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */, - 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */, - B3A144887C8B13FD888B76AB096B0CA1 /* PetstoreClient-prefix.pch */, - 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */, - ); - name = "Support Files"; - path = "SwaggerClientTests/Pods/Target Support Files/PetstoreClient"; - sourceTree = ""; - }; - 933F0A2EBD44D53190D1E9FAF3F54AFB /* UIKit */ = { - isa = PBXGroup; - children = ( - 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */, - 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */, - CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */, - DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */, - 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */, - 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */, - 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */, - 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */, - EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */, - 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */, - 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */, - 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */, - B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */, - ); - name = UIKit; - sourceTree = ""; - }; - 9466970616DD9491B9B80845EBAF6997 /* RQ */ = { - isa = PBXGroup; - children = ( - 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */, - 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */, - ); - name = RQ; - sourceTree = ""; - }; - 977CD7DB18C38452FB8DCFCEC690CBDE /* Support Files */ = { - isa = PBXGroup; - children = ( - 94F9363EEBC7855FA6B9A6B7485D5170 /* Info.plist */, - D3A577E7C7DF4A2157D9001CA0D40A72 /* PromiseKit.modulemap */, - 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */, - B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */, - 11683764D40FE241FCEEB379EE92E817 /* PromiseKit-prefix.pch */, - ); - name = "Support Files"; - path = "../Target Support Files/PromiseKit"; - sourceTree = ""; - }; - AD94092456F8ABCB18F74CAC75AD85DE /* Classes */ = { - isa = PBXGroup; - children = ( - F64549CFCC17C7AC6479508BE180B18D /* Swaggers */, - ); - name = Classes; - path = Classes; - sourceTree = ""; - }; - B00B1E51F2524127FFF78DB52869057E /* FormURLEncode */ = { - isa = PBXGroup; - children = ( - 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */, - 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */, - ); - name = FormURLEncode; - sourceTree = ""; - }; - C1A60D10CED0E61146591438999C7502 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 88CE2B3F08C34DDB098AD8A5DCC1DF1E /* Pods-SwaggerClient */, - D6D0CD30E3EAF2ED10AE0CBC07506C5A /* Pods-SwaggerClientTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - D6D0CD30E3EAF2ED10AE0CBC07506C5A /* Pods-SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - 3F16B43ABD2C8CD4A311AA1AB3B6C02F /* Info.plist */, - 00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */, - FB170EFD14935F121CDE3211DB4C5CA3 /* Pods-SwaggerClientTests-acknowledgements.markdown */, - 02F28E719AA874BE9213D6CF8CE7E36B /* Pods-SwaggerClientTests-acknowledgements.plist */, - 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */, - 43FC49AA70D3E2A84CAED9C37BE9C4B5 /* Pods-SwaggerClientTests-frameworks.sh */, - E4E6F4A58FE7868CA2177D3AC79AD2FA /* Pods-SwaggerClientTests-resources.sh */, - F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */, - 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */, - 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = "Pods-SwaggerClientTests"; - path = "Target Support Files/Pods-SwaggerClientTests"; - sourceTree = ""; - }; - DFFDACE0170FB00C7ECFDA52A87A7665 /* Support Files */ = { - isa = PBXGroup; - children = ( - 467F288FF1A023115720F192FD4D9297 /* Alamofire.modulemap */, - 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */, - F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */, - 835E52C658674D7A44ED95B966432726 /* Alamofire-prefix.pch */, - 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */, - BDEAF9E48610133B23BB992381D0E22B /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - E73D9BF152C59F341559DE62A3143721 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - AD94092456F8ABCB18F74CAC75AD85DE /* Classes */, - ); - name = PetstoreClient; - path = PetstoreClient; - sourceTree = ""; - }; - E85F5154C248966A1EC7B7B6EACB20CF /* Frameworks */ = { - isa = PBXGroup; - children = ( - A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */, - 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */, - A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */, - 4EE5FA0111D74A644A1CAA11AE22251D /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - E9F8459055B900A58FB97600A53E5D1C /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - E73D9BF152C59F341559DE62A3143721 /* PetstoreClient */, - 8F6D133867EE63820DFB7E83F4C51252 /* Support Files */, - ); - name = PetstoreClient; - path = ../..; - sourceTree = ""; - }; - F64549CFCC17C7AC6479508BE180B18D /* Swaggers */ = { - isa = PBXGroup; - children = ( - 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */, - D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */, - D8072E1108951F272C003553FC8926C7 /* APIs.swift */, - 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */, - 8F0266C5AE0B23A436291F6647902086 /* Models.swift */, - F92EFB558CBA923AB1CFA22F708E315A /* APIs */, - 1322FED69118C64DAD026CAF7F4C38C6 /* Models */, - ); - name = Swaggers; - path = Swaggers; - sourceTree = ""; - }; - F92EFB558CBA923AB1CFA22F708E315A /* APIs */ = { - isa = PBXGroup; - children = ( - 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */, - 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */, - 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */, - ); - name = APIs; - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 06355A827899CB5DF1AEC2B7AE5343A2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - BF43C103A91BDDC98FA10577CBA76D8B /* AnyPromise.h in Headers */, - FF2BDB83CB6FE636673DD089D26FBCB8 /* CALayer+AnyPromise.h in Headers */, - 7519B50597E2DC5B47FC6927BA94D3A7 /* NSError+Cancellation.h in Headers */, - 6ADCA5D4BB1C66A8FC959C38CAEA4488 /* NSNotificationCenter+AnyPromise.h in Headers */, - 162CFCD9335EB4583A6247A6116FEB0D /* NSURLConnection+AnyPromise.h in Headers */, - EF45D47D7EBC09983C83946F2BB75C92 /* PromiseKit.h in Headers */, - 029AC3390FBF6FE9A66FC3D937065ED8 /* UIActionSheet+AnyPromise.h in Headers */, - FC438D87EC736F347E1068A05360974E /* UIAlertView+AnyPromise.h in Headers */, - 629C5CA00E2A6A40D7AEF34A7FD7772F /* UIView+AnyPromise.h in Headers */, - 5C067F2478F7DD077A0496925F57CE8C /* UIViewController+AnyPromise.h in Headers */, - FADE7DCB53BC63ECC585A5192BC15843 /* Umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1353AC7A6419F876B294A55E5550D1E4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 31F8B86E3672D0B828B6352C875649C4 /* Pods-SwaggerClientTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C894FFAF7CC3AB5A548AF1B61F8FA548 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0DB7734F8CD7D40D922F73C1C9146EE4 /* OMGFormURLEncode.h in Headers */, - D3A23B867EBFCD3AC86370D26250C290 /* OMGHTTPURLRQ-umbrella.h in Headers */, - 258F28EA87BCDBE2307CD728D6847F44 /* OMGHTTPURLRQ.h in Headers */, - 2E3A55DBE5D58E6E6B3068D0BF84BA42 /* OMGUserAgent.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CC52385505985AE1C33D731864E5D615 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 98C216E54478D7F70674111361A4DB7E /* Pods-SwaggerClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F2A4B8C726CEA196EABADDBEF5345846 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 33D7D29D9E53DA84337D305017107505 /* PetstoreClient-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = C3A6D0B1F2716E6C57E728BE318F35F2 /* Build configuration list for PBXNativeTarget "PromiseKit" */; - buildPhases = ( - 80CA432D5B71DB2B28AD6FF75E7D4F37 /* Sources */, - 364E2313E2B201E3BBE0ED3C8DDF7812 /* Frameworks */, - 06355A827899CB5DF1AEC2B7AE5343A2 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - E1CA092FD90F43E3E462BC6A412B1C74 /* PBXTargetDependency */, - ); - name = PromiseKit; - productName = PromiseKit; - productReference = 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 2CD30C6ABD3A18ABB3C4BE6D88151D89 /* Pods-SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC6C838E5FD0AA55D4D19AF5445C3BDC /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */; - buildPhases = ( - B6FCB0C9137B17D4C8594118B6E09C6D /* Sources */, - 93A52D8380E47350C27ABFF726B0EE7D /* Frameworks */, - CC52385505985AE1C33D731864E5D615 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - 2A8AB7B6B910ACA4A4CFA5F59BC763C1 /* PBXTargetDependency */, - 8379AE2AD3B7EFAEA32EECB166A69A35 /* PBXTargetDependency */, - 685342E14A1D26CC3D02B797F78CCC17 /* PBXTargetDependency */, - 014BBBC4434EB1A54BF32C7358BE0426 /* PBXTargetDependency */, - ); - name = "Pods-SwaggerClient"; - productName = "Pods-SwaggerClient"; - productReference = CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */ = { - isa = PBXNativeTarget; - buildConfigurationList = CD74B5CE2C2265348D1B613B9368C079 /* Build configuration list for PBXNativeTarget "OMGHTTPURLRQ" */; - buildPhases = ( - F80308E9C89F9A33F945AB69CA1EEAEB /* Sources */, - BCD2EA67C3EE2725B5C1EEADB0F66AF4 /* Frameworks */, - C894FFAF7CC3AB5A548AF1B61F8FA548 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OMGHTTPURLRQ; - productName = OMGHTTPURLRQ; - productReference = 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */; - productType = "com.apple.product-type.framework"; - }; - 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F11F7876E9302E80161D33223E3D230 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - 4EB24B8C43007B6C21D7481167C1F9CF /* Sources */, - BC1E0CC70F02685289292200DADFB7F0 /* Frameworks */, - F2A4B8C726CEA196EABADDBEF5345846 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - 59FB04A6684D0690467260C91518EC03 /* PBXTargetDependency */, - 24C8C29561020566F8E06E1180327058 /* PBXTargetDependency */, - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; - 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - 3792E88F656464AEB17FE4EF5FA2887A /* Sources */, - 99195E4207764744AEC07ECCBCD550EB /* Frameworks */, - B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - F3DF8DD6DBDCB07B04D7B1CC8A462562 /* Pods-SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = B462F7329881FF6565EF44016BE2B959 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */; - buildPhases = ( - BDFDEE831A91E115AA482B4E9E9B5CC8 /* Sources */, - 87AF7EC7404199AC8C5D22375A6059BF /* Frameworks */, - 1353AC7A6419F876B294A55E5550D1E4 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Pods-SwaggerClientTests"; - productName = "Pods-SwaggerClientTests"; - productReference = FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 01A9CB10E1E9A90B6A796034AF093E8C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */, - 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */, - 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */, - 2CD30C6ABD3A18ABB3C4BE6D88151D89 /* Pods-SwaggerClient */, - F3DF8DD6DBDCB07B04D7B1CC8A462562 /* Pods-SwaggerClientTests */, - 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 3792E88F656464AEB17FE4EF5FA2887A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8BC2037248D2FA8B2E2475AC2E466494 /* Alamofire-dummy.m in Sources */, - 9B70D1F82BB1FA9EAEF67815AB211B47 /* Alamofire.swift in Sources */, - 2192B0DEE9028936168890C1D6EB0259 /* Download.swift in Sources */, - E7D7EF4C9B8164062D3C5E6EA7C534C2 /* Error.swift in Sources */, - 9C88873949B0DCF8A580D0F65A43A482 /* Manager.swift in Sources */, - 5F193AFDA8E41A904D4B657769F49A93 /* MultipartFormData.swift in Sources */, - 58597FACD9B948EB5E4EB1A96E84F9DE /* NetworkReachabilityManager.swift in Sources */, - 8179D1D51A9219B01C0C007F96F02F33 /* Notifications.swift in Sources */, - E968D568838BC789817F6009838349A3 /* ParameterEncoding.swift in Sources */, - 7892B90D39A86C32BD7ECFF8F6C52A38 /* Request.swift in Sources */, - 4CDF7F31FC91171478EC0A2E2AB4E758 /* Response.swift in Sources */, - A3D61ED4990E52E06A3315F2A9A00C6D /* ResponseSerialization.swift in Sources */, - 28AF3FD0C6798D6A36A13C2AB39F8239 /* Result.swift in Sources */, - 31D35FA0B2173504DBA8E2F450CAC665 /* ServerTrustPolicy.swift in Sources */, - B924DB98A633A09B12A6226F75261F83 /* Stream.swift in Sources */, - CEE2E4C0A2875A6C0CA9BB46572D6224 /* Timeline.swift in Sources */, - CEF24FA13891DB5422B2DAF72DE83A9A /* Upload.swift in Sources */, - 3FE36566EFBFEFABC46589686A7ADCD2 /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4EB24B8C43007B6C21D7481167C1F9CF /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F84E18C37A7B3B8A338E817574491335 /* AlamofireImplementations.swift in Sources */, - 2A926E5EA0483C43023F396648F31100 /* APIHelper.swift in Sources */, - EF9B6103AC1A233089E5317B1E2D8031 /* APIs.swift in Sources */, - A3C3B39CE3715B4260DC6FF0B621C142 /* Category.swift in Sources */, - FCB8ADBF2A01486B7D575EA3326A70BD /* Extensions.swift in Sources */, - 086EF9C01D071D88D853A11539D42B9F /* Models.swift in Sources */, - EF4BCB7BBAB19687FAD3A5A71C859A7F /* Order.swift in Sources */, - D5ECD91CE99A115543BEC3B993C11BD3 /* Pet.swift in Sources */, - 21B837E7DB2A98D7B3E2D64AABA828F2 /* PetAPI.swift in Sources */, - 54BAF231DB704DB87968C54637AF9551 /* PetstoreClient-dummy.m in Sources */, - F986101B7E81C6AABC67FF43C958D54A /* StoreAPI.swift in Sources */, - ECD1DE9F631F8BCD514213BF97385BAE /* Tag.swift in Sources */, - FCA5211A7610129D1EAFC03D5F5351D2 /* User.swift in Sources */, - D02588110E13C2C2F223EAE690848951 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 80CA432D5B71DB2B28AD6FF75E7D4F37 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 66130A4C8A83C11558EC154FA1C9D191 /* after.m in Sources */, - 1B3395001A4E5AB2E7EEEFE9964348B5 /* after.swift in Sources */, - DB9ED067DD1525127DFBE4B5647E502C /* afterlife.swift in Sources */, - 009A705EB41A7BD11E77200CD1FB65CC /* AnyPromise.m in Sources */, - B067653C1D7B7214CD0079A279326610 /* AnyPromise.swift in Sources */, - AF02896B7B6B213C98324CD75871275A /* CALayer+AnyPromise.m in Sources */, - D13DFBC6575E7DB809A1420CB9F920B5 /* dispatch_promise.m in Sources */, - C3EC2C7BE760D6CEE606445A1AE2E071 /* dispatch_promise.swift in Sources */, - D2230D11A1EE4A48E9EC72EA44D09EAC /* Error.swift in Sources */, - 74231A47F9018E69CB8390B3BD9815B8 /* hang.m in Sources */, - 5ECBDDFA4329B4AB812B4A10DBD2EB1A /* join.m in Sources */, - C5938D7FB0EC73BE33F4A6B31BE937B9 /* join.swift in Sources */, - 689CD9721F90D45A57369D76461CA5E2 /* NSNotificationCenter+AnyPromise.m in Sources */, - 9E16513086BC96F16B7F73065AE84AC4 /* NSNotificationCenter+Promise.swift in Sources */, - F6BC9BD76DB32C32BFDAD6582DC9F9B0 /* NSObject+Promise.swift in Sources */, - 98971D531D9D7138ED04B55FE458D66D /* NSURLConnection+AnyPromise.m in Sources */, - 19481BE7602C732E16A4C1FDE7D800DA /* NSURLConnection+Promise.swift in Sources */, - C2249D68F55536B774806E6ED01D3431 /* NSURLSession+Promise.swift in Sources */, - FCDEC7CF7180ECD18CA73EB08EA4624D /* PMKAlertController.swift in Sources */, - 7EC6F570997E9A0CC65AD7E7E319C0EF /* Promise+Properties.swift in Sources */, - D509E607CAE14D8848E2BBAC478BEED5 /* Promise.swift in Sources */, - 989ED6D4ECDEF446FB68EFF07F0CBEF5 /* PromiseKit-dummy.m in Sources */, - 32A893A9FE628EDBC482D40F753699F9 /* race.swift in Sources */, - E5E62E286336AB2FBB84501E1ACEEE7C /* State.swift in Sources */, - D733EB627BBBA34769C0CDEF5ABE0E41 /* UIActionSheet+AnyPromise.m in Sources */, - C884C9ADEA7330CF670815C9689FBBD9 /* UIActionSheet+Promise.swift in Sources */, - 563431FCE9268B58BFD2F32E358673C6 /* UIAlertView+AnyPromise.m in Sources */, - 8A858C9291A59130A4A3AE2FB193E480 /* UIAlertView+Promise.swift in Sources */, - EC284D0372D446702CC9585351E4027D /* UIView+AnyPromise.m in Sources */, - 68B6B55AA10FA42481892FE79996D4F0 /* UIView+Promise.swift in Sources */, - 7546CDAE72452E874E5DB53099BF3E70 /* UIViewController+AnyPromise.m in Sources */, - 061D9A45538674253A809E070A8A089D /* UIViewController+Promise.swift in Sources */, - 8ADEA58D7C48EC4973D667F87C5AE948 /* URLDataPromise.swift in Sources */, - F38E53627E8AD5C92AF674C15A3A2493 /* when.m in Sources */, - B1A09AAC19DAB39B1C7F172CEBF0AAAD /* when.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B6FCB0C9137B17D4C8594118B6E09C6D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2FF723F26615EB2ACAE54BDA6E3707DC /* Pods-SwaggerClient-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BDFDEE831A91E115AA482B4E9E9B5CC8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 897985FA042CD12B825C3032898FAB26 /* Pods-SwaggerClientTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F80308E9C89F9A33F945AB69CA1EEAEB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5344CCD94F668BD41A0417B3A3CDF4F2 /* OMGFormURLEncode.m in Sources */, - 2C65AE47419BA083958A5D9F760F7150 /* OMGHTTPURLRQ-dummy.m in Sources */, - 55F5CB213AA2AE0675636AC73B7D7FB1 /* OMGHTTPURLRQ.m in Sources */, - 13C8FE870121B96B85458487D176292A /* OMGUserAgent.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 014BBBC4434EB1A54BF32C7358BE0426 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PromiseKit; - target = 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */; - targetProxy = 094864AE73DBB274F1E39300864E9C62 /* PBXContainerItemProxy */; - }; - 24C8C29561020566F8E06E1180327058 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PromiseKit; - target = 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */; - targetProxy = E66AC3FE6854646CAC1BEA7B966F17B0 /* PBXContainerItemProxy */; - }; - 2A8AB7B6B910ACA4A4CFA5F59BC763C1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = 26F113882698B5132DB9F4537EF58E9A /* PBXContainerItemProxy */; - }; - 59FB04A6684D0690467260C91518EC03 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = CC71B8F089BD4B650825DDAA5DB71E07 /* PBXContainerItemProxy */; - }; - 685342E14A1D26CC3D02B797F78CCC17 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PetstoreClient; - target = 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */; - targetProxy = 1F4208A7D556EA95487DDE364B0345D5 /* PBXContainerItemProxy */; - }; - 8379AE2AD3B7EFAEA32EECB166A69A35 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OMGHTTPURLRQ; - target = 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */; - targetProxy = FB51D93BE6962BF86154BCCE6C6161E9 /* PBXContainerItemProxy */; - }; - E1CA092FD90F43E3E462BC6A412B1C74 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OMGHTTPURLRQ; - target = 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */; - targetProxy = 65851406A9AA058E6966942F3A75BEFB /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 37A6D3ECFEC1FCED0CAA398BE3B7CBB7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 507820EAC09E90412FDF1F737638B0D4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwaggerClientTests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 61067068269EECAA2F1CB7DE4AF96F2F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwaggerClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 6F3A3A099BF6DB77A326F9CDFA4FA550 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = PetstoreClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - AADB9822762AD81BBAE83335B2AB1EB0 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - B1B5EB0850F98CB5AECDB015B690777F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - B6E8E8BCFD17BC4CC5B002AB5B2DF697 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OMGHTTPURLRQ/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = OMGHTTPURLRQ; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - BDB92B86F05A6E1B01A06399F6A57A01 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - C7A5906C8108C4163D0ED41985878B78 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwaggerClientTests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - CF5DD5054942688BADBDB2E2EBB88C61 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OMGHTTPURLRQ/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = OMGHTTPURLRQ; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - DC06B8741A907E0921F8314D215543AB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = PromiseKit; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - E14528B983F58350151EE2B619628CAB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwaggerClient; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - EE004CEA3EB3656D1EBF14311F29CE18 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - FD1D1987A0C5BBBFA02B72B6A1908057 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PromiseKit/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = PromiseKit; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B1B5EB0850F98CB5AECDB015B690777F /* Debug */, - AADB9822762AD81BBAE83335B2AB1EB0 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EE004CEA3EB3656D1EBF14311F29CE18 /* Debug */, - BDB92B86F05A6E1B01A06399F6A57A01 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F11F7876E9302E80161D33223E3D230 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 37A6D3ECFEC1FCED0CAA398BE3B7CBB7 /* Debug */, - 6F3A3A099BF6DB77A326F9CDFA4FA550 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B462F7329881FF6565EF44016BE2B959 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 507820EAC09E90412FDF1F737638B0D4 /* Debug */, - C7A5906C8108C4163D0ED41985878B78 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C3A6D0B1F2716E6C57E728BE318F35F2 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FD1D1987A0C5BBBFA02B72B6A1908057 /* Debug */, - DC06B8741A907E0921F8314D215543AB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CD74B5CE2C2265348D1B613B9368C079 /* Build configuration list for PBXNativeTarget "OMGHTTPURLRQ" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B6E8E8BCFD17BC4CC5B002AB5B2DF697 /* Debug */, - CF5DD5054942688BADBDB2E2EBB88C61 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC6C838E5FD0AA55D4D19AF5445C3BDC /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 61067068269EECAA2F1CB7DE4AF96F2F /* Debug */, - E14528B983F58350151EE2B619628CAB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 02327b85e884..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist deleted file mode 100644 index 152c333e4414..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.4.2 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h deleted file mode 100644 index cef2f3bb5b33..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - -#import "OMGFormURLEncode.h" -#import "OMGHTTPURLRQ.h" -#import "OMGUserAgent.h" - -FOUNDATION_EXPORT double OMGHTTPURLRQVersionNumber; -FOUNDATION_EXPORT const unsigned char OMGHTTPURLRQVersionString[]; - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h deleted file mode 100644 index 435b682a1068..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double PetstoreClientVersionNumber; -FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown deleted file mode 100644 index bb7c5a67fc4b..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown +++ /dev/null @@ -1,11 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## OMGHTTPURLRQ - -https://github.com/mxcl/OMGHTTPURLRQ/blob/master/README.markdown - -## PromiseKit - -@see README -Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist deleted file mode 100644 index 476c1044a32d..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - https://github.com/mxcl/OMGHTTPURLRQ/blob/master/README.markdown - License - MIT - Title - OMGHTTPURLRQ - Type - PSGroupSpecifier - - - FooterText - @see README - License - MIT - Title - PromiseKit - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh deleted file mode 100755 index 25e9d37757fc..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h deleted file mode 100644 index 2bdb03cd9399..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig deleted file mode 100644 index 4b678f396a68..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "OMGHTTPURLRQ" -framework "PetstoreClient" -framework "PromiseKit" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods -SWIFT_INSTALL_OBJC_HEADER = NO diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig deleted file mode 100644 index 4b678f396a68..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "OMGHTTPURLRQ" -framework "PetstoreClient" -framework "PromiseKit" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods -SWIFT_INSTALL_OBJC_HEADER = NO diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh deleted file mode 100755 index 25e9d37757fc..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h deleted file mode 100644 index 950bb19ca7a1..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - - -FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig deleted file mode 100644 index 85fcf66813e6..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig deleted file mode 100644 index 85fcf66813e6..000000000000 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/default/.openapi-generator/VERSION b/samples/client/petstore/swift3/default/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift3/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock deleted file mode 100644 index 187218299fbe..000000000000 --- a/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,19 +0,0 @@ -PODS: - - Alamofire (4.5.0) - - PetstoreClient (0.0.1): - - Alamofire (~> 4.5.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -EXTERNAL SOURCES: - PetstoreClient: - :path: ../ - -SPEC CHECKSUMS: - Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 - PetstoreClient: bbb95cd0adc059bbdbe541b384f8294f4e241226 - -PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418 - -COCOAPODS: 1.3.1 diff --git a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock deleted file mode 100644 index 3add4cf9b4a2..000000000000 --- a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - Alamofire (4.5.0) - - PetstoreClient (0.0.1): - - Alamofire (~> 4.5.0) - - PromiseKit/CorePromise (~> 4.4.0) - - PromiseKit/CorePromise (4.4.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -EXTERNAL SOURCES: - PetstoreClient: - :path: ../ - -SPEC CHECKSUMS: - Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 - PetstoreClient: 529644d7d853d985a2748d43c7d4848db0fd62bb - PromiseKit: ecf5fe92275d57ee77c9ede858af47a162e9b97e - -PODFILE CHECKSUM: da9f5a7ad6086f2c7abb73cf2c35cefce04a9a30 - -COCOAPODS: 1.3.1 diff --git a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock deleted file mode 100644 index 56a6c42e699d..000000000000 --- a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - Alamofire (4.5.0) - - PetstoreClient (0.0.1): - - Alamofire (~> 4.5.0) - - RxSwift (~> 3.4.1) - - RxSwift (3.4.1) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -EXTERNAL SOURCES: - PetstoreClient: - :path: ../ - -SPEC CHECKSUMS: - Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 - PetstoreClient: 89ba1ed13b6653200cc34a2248644e7e6a142b60 - RxSwift: 656f8fbeca5bc372121a72d9ebdd3cd3bc0ffade - -PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418 - -COCOAPODS: 1.3.1 diff --git a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift3/unwraprequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 0a4b6a97a796..c525e66cce58 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,51 +355,4 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - uploads an image - - POST /pet/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String:Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - } diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 0a4b6a97a796..c525e66cce58 100644 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,51 +355,4 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - uploads an image - - POST /pet/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String:Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - } diff --git a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/promisekit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 835e55920c37..6cab307e02b1 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -497,70 +497,4 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: Promise - */ - open class func uploadFileWithRequiredFile( petId: Int64, file: URL, additionalMetadata: String? = nil) -> Promise { - let deferred = Promise.pending() - uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in - if let error = error { - deferred.reject(error) - } else { - deferred.fulfill(data!) - } - } - return deferred.promise - } - - /** - uploads an image - - POST /pet/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String:Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - } diff --git a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/rxswift/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index ad53a5e668f4..d7cd99d687a2 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -513,72 +513,4 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: Observable - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - uploadFileWithRequiredFile(petId: petId, file: file, additionalMetadata: additionalMetadata) { data, error in - if let error = error { - observer.on(.error(error)) - } else { - observer.on(.next(data!)) - } - observer.on(.completed) - } - return Disposables.create() - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String:Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - } diff --git a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION +++ b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 0a4b6a97a796..c525e66cce58 100644 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -355,51 +355,4 @@ open class PetAPI { return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, file: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, file: file, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - uploads an image - - POST /pet/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter file: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, file: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(petId)" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String:Any?] = [ - "additionalMetadata": additionalMetadata, - "file": file - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - } diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md index 596c10f39374..8c00e0668339 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md @@ -1,4 +1,4 @@ -## @ +## @swagger/angular2-typescript-petstore@0.0.1 ### Building @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands. _published:_ ``` -npm install @ --save +npm install @swagger/angular2-typescript-petstore@0.0.1 --save ``` _without publishing (not recommended):_ @@ -37,7 +37,7 @@ npm link In your project: ``` -npm link +npm link @swagger/angular2-typescript-petstore ``` __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. @@ -52,7 +52,7 @@ In your Angular project: ``` // without configuring providers -import { ApiModule } from ''; +import { ApiModule } from '@swagger/angular2-typescript-petstore'; import { HttpModule } from '@angular/http'; @@ -70,7 +70,7 @@ export class AppModule {} ``` // configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from ''; +import { ApiModule, Configuration, ConfigurationParameters } from '@swagger/angular2-typescript-petstore'; export function apiConfigFactory (): Configuration => { const params: ConfigurationParameters = { @@ -89,7 +89,7 @@ export class AppModule {} ``` ``` -import { DefaultApi } from ''; +import { DefaultApi } from '@swagger/angular2-typescript-petstore'; export class AppComponent { constructor(private apiGateway: DefaultApi) { } @@ -126,7 +126,7 @@ export class AppModule { If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` -import { BASE_PATH } from ''; +import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, @@ -135,7 +135,7 @@ bootstrap(AppComponent, [ or ``` -import { BASE_PATH } from ''; +import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; @NgModule({ imports: [], @@ -159,7 +159,7 @@ export const environment = { In the src/app/app.module.ts: ``` -import { BASE_PATH } from ''; +import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; import { environment } from '../environments/environment'; @NgModule({ diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md index 5467261eaafe..5e33f07adc5b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/README.md +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build and compile the typescript sources to javascript use: +To build an compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md index 5467261eaafe..5e33f07adc5b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build and compile the typescript sources to javascript use: +To build an compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 82602aa4190d..855ff9501eb8 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts index 8e16438c5e2d..68203071fd8c 100644 --- a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class PetApi { /** * * @summary Add a new pet to the store - * @param pet Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store */ - public addPet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public addPet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'pet' is not null or undefined - if (pet === null || pet === undefined) { - throw new Error('Required parameter pet was null or undefined when calling addPet.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addPet.'); } @@ -71,6 +71,8 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; // authentication (petstore_auth) required @@ -92,7 +94,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(pet); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -141,6 +143,8 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; // authentication (petstore_auth) required @@ -385,16 +389,16 @@ export class PetApi { /** * * @summary Update an existing pet - * @param pet Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store */ - public updatePet(pet: models.models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updatePet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'pet' is not null or undefined - if (pet === null || pet === undefined) { - throw new Error('Required parameter pet was null or undefined when calling updatePet.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updatePet.'); } @@ -407,6 +411,8 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; // authentication (petstore_auth) required @@ -428,7 +434,7 @@ export class PetApi { processData: false }; - requestOptions.data = JSON.stringify(pet); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -486,6 +492,8 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; // authentication (petstore_auth) required diff --git a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts index ed50edd97ab4..1a7b91c282ec 100644 --- a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -69,6 +69,8 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -216,16 +218,16 @@ export class StoreApi { /** * * @summary Place an order for a pet - * @param order order placed for purchasing the pet + * @param body order placed for purchasing the pet */ - public placeOrder(order: models.models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { + public placeOrder(body: models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { let localVarPath = this.basePath + '/store/order'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'order' is not null or undefined - if (order === null || order === undefined) { - throw new Error('Required parameter order was null or undefined when calling placeOrder.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } @@ -250,7 +252,7 @@ export class StoreApi { processData: false }; - requestOptions.data = JSON.stringify(order); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts index 044bd54c9c71..3e8308dac354 100644 --- a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -49,16 +49,16 @@ export class UserApi { /** * This can only be done by the logged in user. * @summary Create user - * @param user Created user object + * @param body Created user object */ - public createUser(user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUser(body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'user' is not null or undefined - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling createUser.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUser.'); } @@ -69,6 +69,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -81,7 +83,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(user); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -107,16 +109,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param modelsUser List of user object + * @param body List of user object */ - public createUsersWithArrayInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithArrayInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithArray'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'modelsUser' is not null or undefined - if (modelsUser === null || modelsUser === undefined) { - throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithArrayInput.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } @@ -127,6 +129,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -139,7 +143,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(modelsUser); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -165,16 +169,16 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param modelsUser List of user object + * @param body List of user object */ - public createUsersWithListInput(modelsUser: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithListInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/createWithList'; let queryParameters: any = {}; let headerParams: any = {}; - // verify required parameter 'modelsUser' is not null or undefined - if (modelsUser === null || modelsUser === undefined) { - throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithListInput.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } @@ -185,6 +189,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -197,7 +203,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(modelsUser); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } @@ -243,6 +249,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -278,7 +286,7 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.User; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); @@ -418,6 +426,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -454,9 +464,9 @@ export class UserApi { * This can only be done by the logged in user. * @summary Updated user * @param username name that need to be deleted - * @param user Updated user object + * @param body Updated user object */ - public updateUser(username: string, user: models.models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updateUser(username: string, body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -466,9 +476,9 @@ export class UserApi { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - // verify required parameter 'user' is not null or undefined - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling updateUser.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateUser.'); } @@ -479,6 +489,8 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ + 'application/xml', + 'application/json' ]; @@ -491,7 +503,7 @@ export class UserApi { processData: false }; - requestOptions.data = JSON.stringify(user); + requestOptions.data = JSON.stringify(body); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } diff --git a/samples/client/petstore/typescript-jquery/default/git_push.sh b/samples/client/petstore/typescript-jquery/default/git_push.sh index 8442b80bb445..ae01b182ae9e 100644 --- a/samples/client/petstore/typescript-jquery/default/git_push.sh +++ b/samples/client/petstore/typescript-jquery/default/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts index f55509ae2ba7..f86e84f93a3a 100644 --- a/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts +++ b/samples/client/petstore/typescript-jquery/default/model/ApiResponse.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Category.ts b/samples/client/petstore/typescript-jquery/default/model/Category.ts index 7def6ebb648f..254c3003c89a 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Category.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Category.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Order.ts b/samples/client/petstore/typescript-jquery/default/model/Order.ts index 122efb30a437..2b6c7aeebd66 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Order.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Order.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Pet.ts b/samples/client/petstore/typescript-jquery/default/model/Pet.ts index 92925560af98..b878cadb9058 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Pet.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Pet.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/Tag.ts b/samples/client/petstore/typescript-jquery/default/model/Tag.ts index 9ab112007cea..8cbdc4fa145e 100644 --- a/samples/client/petstore/typescript-jquery/default/model/Tag.ts +++ b/samples/client/petstore/typescript-jquery/default/model/Tag.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/default/model/User.ts b/samples/client/petstore/typescript-jquery/default/model/User.ts index 8e1f9d817b32..fbf75dfe28e3 100644 --- a/samples/client/petstore/typescript-jquery/default/model/User.ts +++ b/samples/client/petstore/typescript-jquery/default/model/User.ts @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/README.md b/samples/client/petstore/typescript-jquery/npm/README.md index 7a4d336b17cd..6b1105e1d49c 100644 --- a/samples/client/petstore/typescript-jquery/npm/README.md +++ b/samples/client/petstore/typescript-jquery/npm/README.md @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition ### Building -To build and compile the typescript sources to javascript use: +To build an compile the typescript sources to javascript use: ``` npm install npm run build diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index a6e6c97eb340..13b8db92be6f 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -56,12 +56,7 @@ class ObjectSerializer { return expectedType; // the type does not have a discriminator. use it. } else { if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } + return data[discriminatorProperty]; // use the type given in the discriminator } else { return expectedType; // discriminator was not present (or an empty string) } @@ -92,9 +87,6 @@ class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - - // Get the actual type of this object - type = this.findCorrectType(data, type); // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); @@ -152,7 +144,7 @@ export class ApiResponse { 'type'?: string; 'message'?: string; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -183,7 +175,7 @@ export class Category { 'id'?: number; 'name'?: string; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -216,7 +208,7 @@ export class Order { 'status'?: Order.StatusEnum; 'complete'?: boolean; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -276,7 +268,7 @@ export class Pet { */ 'status'?: Pet.StatusEnum; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -329,7 +321,7 @@ export class Tag { 'id'?: number; 'name'?: string; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -364,7 +356,7 @@ export class User { */ 'userStatus'?: number; - static discriminator: string | undefined = undefined; + static discriminator = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index 48691faac6da..2005298bd9bb 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -16,12 +16,13 @@ "bluebird": "^3.5.0", "request": "^2.81.0", "@types/bluebird": "*", - "@types/request": "*" + "@types/request": "*", + "rewire": "^3.0.2" }, "devDependencies": { "typescript": "^2.4.2" }, - "publishConfig":{ - "registry":"https://skimdb.npmjs.com/registry" + "publishConfig": { + "registry": "https://skimdb.npmjs.com/registry" } } diff --git a/samples/client/test/swift4/default/.openapi-generator/VERSION b/samples/client/test/swift4/default/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/client/test/swift4/default/.openapi-generator/VERSION +++ b/samples/client/test/swift4/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient.podspec b/samples/client/test/swift4/default/TestClient.podspec index 83aee4c5d052..1c434b30306c 100644 --- a/samples/client/test/swift4/default/TestClient.podspec +++ b/samples/client/test/swift4/default/TestClient.podspec @@ -4,10 +4,10 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' s.version = '0.0.1' - s.source = { :git => 'git@github.com:openapitools/openapi-generator.git', :tag => 'v1.0.0' } + s.source = { :git => 'git@github.com:swagger-api/swagger-mustache.git', :tag => 'v1.0.0' } s.authors = '' s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' + s.homepage = 'https://github.com/swagger-api/swagger-codegen' s.summary = 'TestClient' s.source_files = 'TestClient/Classes/**/*.swift' s.dependency 'Alamofire', '~> 4.5.0' diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 3c7b53f81496..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,65 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? Array { - result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - - public static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? Array { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 6835520c9904..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,61 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class TestClientAPI { - open static var basePath = "http://api.example.com/basePath" - open static var credential: URLCredential? - open static var customHeaders: [String:String] = [:] - open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String:String] - public let parameters: [String:Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> ())? - - required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(TestClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders:[String:String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = TestClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift deleted file mode 100644 index 537b874f2621..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Swift4TestAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - - - -open class Swift4TestAPI { - /** - Get all of the models - - - parameter clientId: (query) id that represent the Api client - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getAllModels(clientId: String, completion: @escaping ((_ data: GetAllModelsResult?,_ error: Error?) -> Void)) { - getAllModelsWithRequestBuilder(clientId: clientId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - - /** - Get all of the models - - GET /allModels - - This endpoint tests get a dictionary which contains examples of all of the models. - - parameter clientId: (query) id that represent the Api client - - returns: RequestBuilder - */ - open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { - let path = "/allModels" - let URLString = TestClientAPI.basePath + path - let parameters: [String:Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "client_id": clientId - ]) - - let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 280b4e53389d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,413 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -// Store manager to retain its reference -private var managerStore: [String: Alamofire.SessionManager] = [:] - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId:String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } - else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - _ = managerStore.removeValue(forKey: managerId) - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename : String? = nil - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with:"") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url : URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -fileprivate enum DownloadException : Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - _ = managerStore.removeValue(forKey: managerId) - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? = nil - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 2d50e463ae11..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - open static var dateformatter: DateFormatter? - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { - var returnedDecodable: T? = nil - var returnedError: Error? = nil - - let decoder = JSONDecoder() - if let df = self.dateformatter { - decoder.dateDecodingStrategy = .formatted(df) - } else { - decoder.dataDecodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" - decoder.dateDecodingStrategy = .formatted(formatter) - } - - do { - returnedDecodable = try decoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T, prettyPrint: Bool = false) -> EncodeResult where T : Encodable { - var returnedData: Data? - var returnedError: Error? = nil - - let encoder = JSONEncoder() - if prettyPrint { - encoder.outputFormatting = .prettyPrinted - } - encoder.dataEncodingStrategy = .base64 - let formatter = DateFormatter() - formatter.calendar = Calendar(identifier: .iso8601) - formatter.locale = Locale(identifier: "en_US_POSIX") - formatter.timeZone = TimeZone(secondsFromGMT: 0) - formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" - encoder.dateEncodingStrategy = .formatted(formatter) - - do { - returnedData = try encoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index f8180752b67b..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index abe218b4e7ac..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -private let dateFormatter: DateFormatter = { - let fmt = DateFormatter() - fmt.dateFormat = Configuration.dateFormat - fmt.locale = Locale(identifier: "en_US_POSIX") - return fmt -}() - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return dateFormatter.string(from: self) as Any - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { - var tmpArray: [T]? = nil - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { - var map: [Self.Key : T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index ca05906d4206..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? = nil - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 70449515842d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? = nil - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? = nil - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 42f8186ae4af..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse : Error { - case error(Int, Data?, Error) -} - -open class Response { - open let statusCode: Int - open let header: [String: String] - open let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String:String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift deleted file mode 100644 index 3ce27fcd98f5..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// AllPrimitives.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** Object which contains lots of different primitive Swagger types */ - -public struct AllPrimitives: Codable { - - public enum MyInlineStringEnum: String, Codable { - case inlinestringenumvalue1 = "inlineStringEnumValue1" - case inlinestringenumvalue2 = "inlineStringEnumValue2" - case inlinestringenumvalue3 = "inlineStringEnumValue3" - } - public var myInteger: Int? - public var myIntegerArray: [Int]? - public var myLong: Int64? - public var myLongArray: [Int64]? - public var myFloat: Float? - public var myFloatArray: [Float]? - public var myDouble: Double? - public var myDoubleArray: [Double]? - public var myString: String? - public var myStringArray: [String]? - public var myBytes: Data? - public var myBytesArray: [Data]? - public var myBoolean: Bool? - public var myBooleanArray: [Bool]? - public var myDate: Date? - public var myDateArray: [Date]? - public var myDateTime: Date? - public var myDateTimeArray: [Date]? - public var myFile: URL? - public var myFileArray: [URL]? - public var myUUID: UUID? - public var myUUIDArray: [UUID]? - public var myStringEnum: StringEnum? - public var myStringEnumArray: [StringEnum]? - public var myInlineStringEnum: MyInlineStringEnum? - - public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { - self.myInteger = myInteger - self.myIntegerArray = myIntegerArray - self.myLong = myLong - self.myLongArray = myLongArray - self.myFloat = myFloat - self.myFloatArray = myFloatArray - self.myDouble = myDouble - self.myDoubleArray = myDoubleArray - self.myString = myString - self.myStringArray = myStringArray - self.myBytes = myBytes - self.myBytesArray = myBytesArray - self.myBoolean = myBoolean - self.myBooleanArray = myBooleanArray - self.myDate = myDate - self.myDateArray = myDateArray - self.myDateTime = myDateTime - self.myDateTimeArray = myDateTimeArray - self.myFile = myFile - self.myFileArray = myFileArray - self.myUUID = myUUID - self.myUUIDArray = myUUIDArray - self.myStringEnum = myStringEnum - self.myStringEnumArray = myStringEnumArray - self.myInlineStringEnum = myInlineStringEnum - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift deleted file mode 100644 index 7e4bb2c0cd5a..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// BaseCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This is a base card object which uses a 'cardType' discriminator. */ - -public struct BaseCard: Codable { - - public var cardType: String - - public init(cardType: String) { - self.cardType = cardType - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift deleted file mode 100644 index ae5327eda329..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// ErrorInfo.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** Example Error object */ - -public struct ErrorInfo: Codable { - - public var code: Int? - public var message: String? - public var details: [String]? - - public init(code: Int?, message: String?, details: [String]?) { - self.code = code - self.message = message - self.details = details - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift deleted file mode 100644 index 286c5a7a35be..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// GetAllModelsResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** Response object containing AllPrimitives object */ - -public struct GetAllModelsResult: Codable { - - public var myPrimitiveArray: [AllPrimitives]? - public var myPrimitive: AllPrimitives? - public var myVariableNameTest: VariableNameTest? - - public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { - self.myPrimitiveArray = myPrimitiveArray - self.myPrimitive = myPrimitive - self.myVariableNameTest = myVariableNameTest - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift deleted file mode 100644 index e6e986dce61d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// ModelDoubleArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This defines an array of doubles. */ -public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift deleted file mode 100644 index 6656e6abe8c8..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// ModelErrorInfoArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This defines an array of ErrorInfo objects. */ -public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift deleted file mode 100644 index 7f0e0cbd1357..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// ModelStringArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This defines an array of strings. */ -public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift deleted file mode 100644 index 9ce70e0b95e6..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// PersonCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This is a card object for a Person derived from BaseCard. */ - -public struct PersonCard: Codable { - - public var cardType: String - public var firstName: String? - public var lastName: String? - - public init(cardType: String, firstName: String?, lastName: String?) { - self.cardType = cardType - self.firstName = firstName - self.lastName = lastName - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift deleted file mode 100644 index 905b80ae5241..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// PlaceCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This is a card object for a Person derived from BaseCard. */ - -public struct PlaceCard: Codable { - - public var cardType: String - public var placeName: String? - public var placeAddress: String? - - public init(cardType: String, placeName: String?, placeAddress: String?) { - self.cardType = cardType - self.placeName = placeName - self.placeAddress = placeAddress - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift deleted file mode 100644 index 77f8897cdf3f..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// SampleBase.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This is a base class object from which other classes will derive. */ - -public struct SampleBase: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift deleted file mode 100644 index d53cd948fe76..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// SampleSubClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This is a subclass defived from the SampleBase class. */ - -public struct SampleSubClass: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - public var subClassStringProp: String? - public var subClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - self.subClassStringProp = subClassStringProp - self.subClassIntegerProp = subClassIntegerProp - } - - -} - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift deleted file mode 100644 index d4cce19e6d6d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// StringEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -public enum StringEnum: String, Codable { - case stringenumvalue1 = "stringEnumValue1" - case stringenumvalue2 = "stringEnumValue2" - case stringenumvalue3 = "stringEnumValue3" -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift deleted file mode 100644 index 1248e645c609..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// VariableNameTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - - -/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ - -public struct VariableNameTest: Codable { - - /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ - public var exampleName: String? - /** This property name is a reserved word in most languages, including Swift 4. */ - public var _for: String? - /** This model object property name should be unchanged from the JSON property name. */ - public var normalName: String? - - public init(exampleName: String?, _for: String?, normalName: String?) { - self.exampleName = exampleName - self._for = _for - self.normalName = normalName - } - - public enum CodingKeys: String, CodingKey { - case exampleName = "example_name" - case _for = "for" - case normalName - } - - -} - diff --git a/samples/config/petstore/apache2/.openapi-generator/VERSION b/samples/config/petstore/apache2/.openapi-generator/VERSION index 82602aa4190d..7fea99011a6f 100644 --- a/samples/config/petstore/apache2/.openapi-generator/VERSION +++ b/samples/config/petstore/apache2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/apache2/PetApi.conf b/samples/config/petstore/apache2/PetApi.conf index 2d28dcdaa61b..c92843e2610f 100644 --- a/samples/config/petstore/apache2/PetApi.conf +++ b/samples/config/petstore/apache2/PetApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -16,7 +16,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -34,7 +34,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -48,7 +48,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -62,7 +62,7 @@ Require group read:pets - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/StoreApi.conf b/samples/config/petstore/apache2/StoreApi.conf index b223a8816ba6..f0fb742f55ac 100644 --- a/samples/config/petstore/apache2/StoreApi.conf +++ b/samples/config/petstore/apache2/StoreApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -14,7 +14,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/config/petstore/apache2/UserApi.conf b/samples/config/petstore/apache2/UserApi.conf index 699b2b72c16c..b01bb509728a 100644 --- a/samples/config/petstore/apache2/UserApi.conf +++ b/samples/config/petstore/apache2/UserApi.conf @@ -1,4 +1,4 @@ - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -11,7 +11,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -24,7 +24,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -37,7 +37,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -56,7 +56,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" @@ -69,7 +69,7 @@ Require valid-user - + AuthBasicProvider file AuthUserFile "/var/www/html/htpwd" AuthGroupFile "/var/www/html/groups" diff --git a/samples/documentation/cwiki/.openapi-generator/VERSION b/samples/documentation/cwiki/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/documentation/cwiki/.openapi-generator/VERSION +++ b/samples/documentation/cwiki/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/dynamic-html/.openapi-generator/VERSION b/samples/dynamic-html/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/dynamic-html/.openapi-generator/VERSION +++ b/samples/dynamic-html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/html.md/.openapi-generator/VERSION b/samples/html.md/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/html.md/.openapi-generator/VERSION +++ b/samples/html.md/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/html/.openapi-generator/VERSION b/samples/html/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/html/.openapi-generator/VERSION +++ b/samples/html/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/.openapi-generator/VERSION b/samples/html2/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/html2/.openapi-generator/VERSION +++ b/samples/html2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 37e85ee61853..dd8dcf14fea7 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -116,7 +116,7 @@ UTF-8 - 3.0.3-SNAPSHOT + 3.0.0-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 1c668d963da4..5892fe3245c9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 688afee7396b..45e354ed6432 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index ffe6a623b71f..69df7f8229e1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index ff3961e0974f..be184f05d706 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index b4ba21addf78..8a1dc94b0fb8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index bb8db0f4c31b..df814eeaef21 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index a0a5b4d1caf9..068489bf3f4a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index b58313a42200..f6f11acaecca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index dcf3363c78b8..956e562e07d3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index ae5f3dc3de83..24d099ae9f10 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 16aef52de050..8cfaeb0339fc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 78c16fa1bb60..6ab8fb874bc0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index b8764bf3724b..530b447626fe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 1fdcfffbeedc..140a4f65936a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 392af57b47e7..4220ab9f4068 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 2a11f3de6e1d..b2b0c4e2d7ee 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index ff26cc123c08..1afa94edbe40 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 665cc61a838e..3a67d13acdb8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index e90f161fe02e..6055eacb00af 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 2dd300ddc45c..be2145fd847a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 82e0ee402985..138823eb93d2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index c404888a0eb9..a53c8c10e22e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index f12665f5e842..4af4453992ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index e44e9eb161df..997deb17631c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 561f5593bcfe..f676cf2e7fde 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 07005c3df409..30e31911c96b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index ba3d46a72385..5950e75f499c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index e0c38408559a..2785e00ef118 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 920dbcf94212..2483418c5cd6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index d4d0d61eab42..78dd064c91b9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index c0d21323450c..f77147b51d0d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8798057ca349..8f98802b36dc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 9c1d061f252f..7bed78ef1176 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 50f2f974d95c..f0f632339690 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 4a7c1fcc7eba..3999135c65e0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index a88c4e6313a1..ca3bb50cc9b3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index c2a7377ffa0f..007d98995d4a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 59c373db531c..656697e8c3d3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 031a73710ef1..ff148524cd8b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index ff00acc3059f..41a2cd355e75 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 4ed4aac61c8c..58e20910a618 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index bb725bce935f..0511bd8584af 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index ec4001d71821..e2e89e4dfd77 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 52fc6524d173..a7760c6c3bce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index efb1f5fcc4fd..86dda5841001 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 831c2c685f6e..32b60cb7858b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index d45a51364a67..b22c8952fce7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 691be928897c..38768c8cc22d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 668501cbf5d1..60d3ba37641a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 38b46ff60d2e..6d46e33d3f7d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 367699196e60..53fb98b6f8fe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index 9a79dce72cb9..bad9a4ff7a21 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 087bf5139b94..77cf8d8c377c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index aa4ec27b52cc..3d7897cb6f77 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 6e82cd038de0..86f6e08d5922 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index da50230be508..9af38b98cd6d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index 6ffa97a2f5eb..ad347c5a3955 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 27415e821364..bf4a244db51d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 1f8efed8125a..3d602e2afdb5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 36e5c38b5c43..74744243a388 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index fb437b3b8c0d..367a01281dbe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 77efed5cb06d..97b2fe4b3137 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index e6f29e2cec7d..95caf5749fd1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 9a8f9d10ef35..97a411bf54ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index a9d6cd7fac6f..c361a07c2abe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index eefd2eb83f52..2d221b46b692 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index c5161755b52b..23c6cda8037b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index bb698360fff2..97d9ff1d26ca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index c3f347e1bdaa..59b0439fd2b7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 35d7a9f5205c..63a65ea552f7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 532d82516998..d305c67d1074 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 66650ee5bf57..239ac38847a2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 226a12786fe0..ac28f1b19099 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 978ee08944b9..8569ae423f22 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 479ed393069c..28f3046abad7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 953fe0a76540..5626620b2117 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 736bcebb1c72..451224e892d4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index fd20e51d581e..6474554c55ec 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index e6b5d5e97420..a136d3003ec4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 226fb97b0608..c974fb9c8f68 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 17baa78ef02d..9081228bc6b5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 68734c49de25..1a49a5d3971a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 3e4a4822df6d..70f353f41f02 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3-SNAPSHOT + * OpenAPI Generator version: 3.0.3 */ /** diff --git a/samples/server/petstore-security-test/slim/composer.lock b/samples/server/petstore-security-test/slim/composer.lock deleted file mode 100644 index c31fb841c9b8..000000000000 --- a/samples/server/petstore-security-test/slim/composer.lock +++ /dev/null @@ -1,315 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "913417690829da41975a473b88f30f64", - "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "nikic/fast-route", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "time": "2018-02-13T20:26:39+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.2.3", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2018-01-21T07:42:36+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "slim/slim", - "version": "3.10.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "nikic/fast-route": "^1.0", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", - "psr/container": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "time": "2018-04-19T19:29:08+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "RC", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 82d674b55753..34eb757240dd 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -104,7 +104,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -158,7 +157,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/api/PetApi.cpp index b0fab3b042d6..af068a3422fa 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/PetApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.h b/samples/server/petstore/cpp-restbed/api/PetApi.h index 20aee014fe98..83607a10bcb3 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/api/PetApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp index 3448b2800571..97f38c052072 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.h b/samples/server/petstore/cpp-restbed/api/StoreApi.h index 309dae22fb4c..0f0f34d91445 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/api/UserApi.cpp index 30825e5f5ab3..158e5e8472b8 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/UserApi.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.h b/samples/server/petstore/cpp-restbed/api/UserApi.h index 2bcd51778518..9c638e11c5e7 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/api/UserApi.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp index dc816c8ca28b..0ad763742285 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/model/ApiResponse.h index 3032ad6d3445..704fade4a1c3 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.cpp b/samples/server/petstore/cpp-restbed/model/Category.cpp index 39e77a10fd80..4156dc195fc6 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/model/Category.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.h b/samples/server/petstore/cpp-restbed/model/Category.h index e67a3cf8fe3f..cd514f3d33dc 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.h +++ b/samples/server/petstore/cpp-restbed/model/Category.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.cpp b/samples/server/petstore/cpp-restbed/model/Order.cpp index 1b30130bad8b..a82a0bb34665 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/model/Order.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.h b/samples/server/petstore/cpp-restbed/model/Order.h index 463aa5fa3bf7..e66688973006 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.h +++ b/samples/server/petstore/cpp-restbed/model/Order.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.cpp b/samples/server/petstore/cpp-restbed/model/Pet.cpp index ba0a73c08b17..5fbecd6bc915 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/model/Pet.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.h b/samples/server/petstore/cpp-restbed/model/Pet.h index e97a8ae269f6..96e9fba3c73b 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/model/Pet.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.cpp b/samples/server/petstore/cpp-restbed/model/Tag.cpp index 42e4618af2c8..ccefa0e8c757 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/model/Tag.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.h b/samples/server/petstore/cpp-restbed/model/Tag.h index ca0615a97374..29b9a90e79e3 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/model/Tag.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.cpp b/samples/server/petstore/cpp-restbed/model/User.cpp index 9079c0392a07..637e5826c0bc 100644 --- a/samples/server/petstore/cpp-restbed/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/model/User.cpp @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.h b/samples/server/petstore/cpp-restbed/model/User.h index d66f50f94c8f..054b31c534e3 100644 --- a/samples/server/petstore/cpp-restbed/model/User.h +++ b/samples/server/petstore/cpp-restbed/model/User.h @@ -5,7 +5,7 @@ * OpenAPI spec version: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 3.0.3-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index 82d674b55753..34eb757240dd 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -104,7 +104,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -158,7 +157,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/finch/.openapi-generator/VERSION b/samples/server/petstore/finch/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/finch/.openapi-generator/VERSION +++ b/samples/server/petstore/finch/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion-python2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml index dca523e5557c..cc02c545f9a5 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/openapi/openapi.yaml @@ -1,202 +1,163 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: + title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: add_pet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - 405: - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store + put: tags: - pet - x-openapi-router-controller: openapi_server.controllers.pet_controller - put: + summary: Update an existing pet operationId: update_pet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found 405: - content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: tags: - pet + summary: Add a new pet to the store + operationId: add_pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 405: + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + style: form + explode: false schema: + type: array items: + type: string default: available enum: - available - pending - sold - type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + style: form + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by tags - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - delete: - operationId: delete_pet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet + get: tags: - pet - x-openapi-router-controller: openapi_server.controllers.pet_controller - get: + summary: Find pet by ID description: Returns a single pet operationId: get_pet_by_id parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -204,122 +165,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found security: - api_key: [] - summary: Find pet by ID - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller post: + tags: + - pet + summary: Updates a pet in the store with form data operationId: update_pet_with_form parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string + $ref: '#/components/schemas/body' responses: 405: - content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + delete: tags: - pet + summary: Deletes a pet + operationId: delete_pet + parameters: + - name: api_key + in: header + required: false + style: simple + explode: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + style: simple + explode: false + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: + tags: + - pet + summary: uploads an image operationId: upload_file parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string + $ref: '#/components/schemas/body_1' responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: place_order requestBody: + description: order placed for purchasing the pet content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -327,51 +306,31 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - description: ID of the order that needs to be deleted - in: path - name: orderId - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Order not found - summary: Delete purchase order by ID + get: tags: - store - x-openapi-router-controller: openapi_server.controllers.store_controller - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - description: ID of pet that needs to be fetched + - name: orderId in: path - name: orderId + description: ID of pet that needs to be fetched required: true + style: simple + explode: false schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -379,164 +338,153 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Order not found - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + delete: tags: - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid ID supplied + 404: + description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: + description: Created user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: + tags: + - user + summary: Logs user into the system operationId: login_user parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true + style: form + explode: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true + style: form + explode: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user + style: simple + explode: false schema: - format: int32 type: integer + format: int32 X-Expires-After: description: date in UTC when toekn expires + style: simple + explode: false schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logout_user responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: - content: {} - description: User not found - summary: Delete user + get: tags: - user - x-openapi-router-controller: openapi_server.controllers.user_controller - get: + summary: Get user by user name operationId: get_user_by_name parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true + style: simple + explode: false schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -544,113 +492,120 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found - summary: Get user by user name - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller put: + tags: + - user + summary: Updated user description: This can only be done by the logged in user. operationId: update_user parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true + style: simple + explode: false schema: type: string requestBody: + description: Updated user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied 404: - content: {} description: User not found - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + delete: tags: - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid username supplied + 404: + description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + title: Pet Order + type: object properties: id: - format: int64 type: integer - petId: format: int64 + petId: type: integer + format: int64 quantity: - format: int32 type: integer + format: int32 shipDate: - format: date-time type: string + format: date-time status: + type: string description: Order Status enum: - placed - approved - delivered - type: string complete: - default: false type: boolean - title: Pet Order - type: object + default: false + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed xml: name: Order Category: - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 xml: name: Category User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + title: a User + type: object properties: id: - format: int64 type: integer + format: int64 username: type: string firstName: @@ -664,108 +619,155 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User Tag: - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 xml: name: Tag Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + title: a Pet + required: + - name + - photoUrls + type: object properties: id: - format: int64 type: integer + format: int64 category: $ref: '#/components/schemas/Category' name: - example: doggie type: string + example: doggie photoUrls: - items: - type: string type: array xml: name: photoUrl wrapped: true - tags: items: - $ref: '#/components/schemas/Tag' + type: string + tags: type: array xml: name: tag wrapped: true + items: + $ref: '#/components/schemas/Tag' status: + type: string description: pet status in the store enum: - available - pending - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available xml: name: Pet ApiResponse: + title: An uploaded response + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message + body: + type: object properties: - code: - format: int32 - type: integer - type: + name: type: string - message: + description: Updated name of the pet + status: type: string - title: An uploaded response + description: Updated status of the pet + body_1: type: object + properties: + additionalMetadata: + type: string + description: Additional data to pass to server + file: + type: string + description: file to upload + format: binary + requestBodies: + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header diff --git a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py index c7340cd00059..4321570d5a0e 100644 --- a/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion-python2/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return an original value. + """Return a original value. :return: object. """ diff --git a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION +++ b/samples/server/petstore/flaskConnexion/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml index dca523e5557c..cc02c545f9a5 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/flaskConnexion/openapi_server/openapi/openapi.yaml @@ -1,202 +1,163 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: + title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: add_pet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - 405: - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store + put: tags: - pet - x-openapi-router-controller: openapi_server.controllers.pet_controller - put: + summary: Update an existing pet operationId: update_pet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found 405: - content: {} description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet + x-openapi-router-controller: openapi_server.controllers.pet_controller + post: tags: - pet + summary: Add a new pet to the store + operationId: add_pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 405: + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: find_pets_by_status parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + style: form + explode: false schema: + type: array items: + type: string default: available enum: - available - pending - sold - type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: find_pets_by_tags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + style: form + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by tags - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}: - delete: - operationId: delete_pet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet + get: tags: - pet - x-openapi-router-controller: openapi_server.controllers.pet_controller - get: + summary: Find pet by ID description: Returns a single pet operationId: get_pet_by_id parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -204,122 +165,140 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Pet not found security: - api_key: [] - summary: Find pet by ID - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller post: + tags: + - pet + summary: Updates a pet in the store with form data operationId: update_pet_with_form parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string + $ref: '#/components/schemas/body' responses: 405: - content: {} description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + x-openapi-router-controller: openapi_server.controllers.pet_controller + delete: tags: - pet + summary: Deletes a pet + operationId: delete_pet + parameters: + - name: api_key + in: header + required: false + style: simple + explode: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + style: simple + explode: false + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets x-openapi-router-controller: openapi_server.controllers.pet_controller /pet/{petId}/uploadImage: post: + tags: + - pet + summary: uploads an image operationId: upload_file parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true + style: simple + explode: false schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string + $ref: '#/components/schemas/body_1' responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet x-openapi-router-controller: openapi_server.controllers.pet_controller /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: get_inventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: place_order requestBody: + description: order placed for purchasing the pet content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -327,51 +306,31 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store x-openapi-router-controller: openapi_server.controllers.store_controller /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: delete_order - parameters: - - description: ID of the order that needs to be deleted - in: path - name: orderId - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Order not found - summary: Delete purchase order by ID + get: tags: - store - x-openapi-router-controller: openapi_server.controllers.store_controller - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: get_order_by_id parameters: - - description: ID of pet that needs to be fetched + - name: orderId in: path - name: orderId + description: ID of pet that needs to be fetched required: true + style: simple + explode: false schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -379,164 +338,153 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied 404: - content: {} description: Order not found - summary: Find purchase order by ID + x-openapi-router-controller: openapi_server.controllers.store_controller + delete: tags: - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: delete_order + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid ID supplied + 404: + description: Order not found x-openapi-router-controller: openapi_server.controllers.store_controller /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: create_user requestBody: + description: Created user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: create_users_with_array_input requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: create_users_with_list_input requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/login: get: + tags: + - user + summary: Logs user into the system operationId: login_user parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true + style: form + explode: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true + style: form + explode: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user + style: simple + explode: false schema: - format: int32 type: integer + format: int32 X-Expires-After: description: date in UTC when toekn expires + style: simple + explode: false schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logout_user responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: delete_user - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: - content: {} - description: User not found - summary: Delete user + get: tags: - user - x-openapi-router-controller: openapi_server.controllers.user_controller - get: + summary: Get user by user name operationId: get_user_by_name parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true + style: simple + explode: false schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -544,113 +492,120 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied 404: - content: {} description: User not found - summary: Get user by user name - tags: - - user x-openapi-router-controller: openapi_server.controllers.user_controller put: + tags: + - user + summary: Updated user description: This can only be done by the logged in user. operationId: update_user parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true + style: simple + explode: false schema: type: string requestBody: + description: Updated user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied 404: - content: {} description: User not found - summary: Updated user + x-openapi-router-controller: openapi_server.controllers.user_controller + delete: tags: - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: delete_user + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + 400: + description: Invalid username supplied + 404: + description: User not found x-openapi-router-controller: openapi_server.controllers.user_controller components: schemas: Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + title: Pet Order + type: object properties: id: - format: int64 type: integer - petId: format: int64 + petId: type: integer + format: int64 quantity: - format: int32 type: integer + format: int32 shipDate: - format: date-time type: string + format: date-time status: + type: string description: Order Status enum: - placed - approved - delivered - type: string complete: - default: false type: boolean - title: Pet Order - type: object + default: false + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed xml: name: Order Category: - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 xml: name: Category User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + title: a User + type: object properties: id: - format: int64 type: integer + format: int64 username: type: string firstName: @@ -664,108 +619,155 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User Tag: - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 xml: name: Tag Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + title: a Pet + required: + - name + - photoUrls + type: object properties: id: - format: int64 type: integer + format: int64 category: $ref: '#/components/schemas/Category' name: - example: doggie type: string + example: doggie photoUrls: - items: - type: string type: array xml: name: photoUrl wrapped: true - tags: items: - $ref: '#/components/schemas/Tag' + type: string + tags: type: array xml: name: tag wrapped: true + items: + $ref: '#/components/schemas/Tag' status: + type: string description: pet status in the store enum: - available - pending - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available xml: name: Pet ApiResponse: + title: An uploaded response + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string description: Describes the result of uploading an image resource example: code: 0 type: type message: message + body: + type: object properties: - code: - format: int32 - type: integer - type: + name: type: string - message: + description: Updated name of the pet + status: type: string - title: An uploaded response + description: Updated status of the pet + body_1: type: object + properties: + additionalMetadata: + type: string + description: Additional data to pass to server + file: + type: string + description: file to upload + format: binary + requestBodies: + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header diff --git a/samples/server/petstore/flaskConnexion/openapi_server/util.py b/samples/server/petstore/flaskConnexion/openapi_server/util.py index c7340cd00059..4321570d5a0e 100644 --- a/samples/server/petstore/flaskConnexion/openapi_server/util.py +++ b/samples/server/petstore/flaskConnexion/openapi_server/util.py @@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass): def _deserialize_object(value): - """Return an original value. + """Return a original value. :return: object. """ diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/.openapi-generator/VERSION b/samples/server/petstore/java-inflector/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/server/petstore/java-inflector/.openapi-generator/VERSION +++ b/samples/server/petstore/java-inflector/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java index 99fd61b22a4d..cd276a634870 100644 --- a/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java +++ b/samples/server/petstore/java-inflector/src/main/java/org/openapitools/controllers/PetController.java @@ -70,11 +70,5 @@ public ResponseContext uploadFile(RequestContext request , Long petId, String ad } */ - /* - public ResponseContext uploadFileWithRequiredFile(RequestContext request , Long petId, FormDataContentDisposition fileDetail, String additionalMetadata) { - return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" ); - } - */ - } diff --git a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml index 76803fad02eb..819110c3f904 100644 --- a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml @@ -294,48 +294,6 @@ paths: - pet x-contentType: multipart/form-data x-accepts: application/json - /pet/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - required: - - file - required: true - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-contentType: multipart/form-data - x-accepts: application/json /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/java-msf4j/.openapi-generator-ignore b/samples/server/petstore/java-msf4j/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/server/petstore/java-msf4j/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index 8fa7248e2317..fd1699a7c5f9 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -43,10 +43,10 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean booleanPostBody ) throws NotFoundException { - return delegate.fakeOuterBooleanSerialize(body); + return delegate.fakeOuterBooleanSerialize(booleanPostBody); } @POST @Path("/outer/composite") @@ -120,22 +120,22 @@ public Response testClientModel(@ApiParam(value = "client model" ,required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response testEndpointParameters(@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("number") BigDecimal number -,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("double") Double _double -,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("pattern_without_delimiter") String patternWithoutDelimiter -,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("byte") byte[] _byte -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("integer") Integer integer -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int32") Integer int32 -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int64") Long int64 -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("float") Float _float -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("string") String string + public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number +,@ApiParam(value = "None", required=true) @FormParam("double") Double _double +,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter +,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte +,@ApiParam(value = "None", allowableValues="range=[10, 100]") @FormParam("integer") Integer integer +,@ApiParam(value = "None", allowableValues="range=[20, 200]") @FormParam("int32") Integer int32 +,@ApiParam(value = "None") @FormParam("int64") Long int64 +,@ApiParam(value = "None") @FormParam("float") Float _float +,@ApiParam(value = "None") @FormParam("string") String string , @FormDataParam("binary") InputStream binaryInputStream, @FormDataParam("binary") FileInfo binaryDetail -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("date") Date date -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("dateTime") Date dateTime -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("password") String password -,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("callback") String paramCallback +,@ApiParam(value = "None") @FormParam("date") Date date +,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime +,@ApiParam(value = "None") @FormParam("password") String password +,@ApiParam(value = "None") @FormParam("callback") String paramCallback ) throws NotFoundException { return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binaryInputStream, binaryDetail,date,dateTime,password,paramCallback); @@ -155,8 +155,8 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble -,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray -,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString +,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List enumFormStringArray +,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)") @FormParam("enum_form_string") String enumFormString ) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString); @@ -168,7 +168,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Map requestBody + public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) String requestBody ) throws NotFoundException { return delegate.testInlineAdditionalProperties(requestBody); @@ -180,8 +180,8 @@ public Response testInlineAdditionalProperties(@ApiParam(value = "request body" @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param") String param -,@ApiParam(value = "field2", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param2") String param2 + public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param +,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 ) throws NotFoundException { return delegate.testJsonFormData(param,param2); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java index ec6c30bb4c19..7ace08f487d9 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApiService.java @@ -24,7 +24,7 @@ public abstract class FakeApiService { - public abstract Response fakeOuterBooleanSerialize(Boolean body + public abstract Response fakeOuterBooleanSerialize(Boolean booleanPostBody ) throws NotFoundException; public abstract Response fakeOuterCompositeSerialize(OuterComposite outerComposite ) throws NotFoundException; @@ -61,7 +61,7 @@ public abstract Response testEnumParameters(List enumHeaderStringArray ,List enumFormStringArray ,String enumFormString ) throws NotFoundException; - public abstract Response testInlineAdditionalProperties(Map requestBody + public abstract Response testInlineAdditionalProperties(String requestBody ) throws NotFoundException; public abstract Response testJsonFormData(String param ,String param2 diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java index 2920fe12f984..dbce159ab076 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApi.java @@ -157,8 +157,8 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Updated name of the pet", defaultValue="null") @DefaultValue("null") @FormParam("name") String name -,@ApiParam(value = "Updated status of the pet", defaultValue="null") @DefaultValue("null") @FormParam("status") String status +,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status); @@ -176,7 +176,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata , @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FileInfo fileDetail @@ -184,25 +184,4 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true throws NotFoundException { return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail); } - @POST - @Path("/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -, - @FormDataParam("file") InputStream fileInputStream, - @FormDataParam("file") FileInfo fileDetail -,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata -) - throws NotFoundException { - return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata); - } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java index cfd59b16b0db..d7fbedc2a337 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/PetApiService.java @@ -40,9 +40,5 @@ public abstract Response updatePetWithForm(Long petId public abstract Response uploadFile(Long petId ,String additionalMetadata ,InputStream fileInputStream, FileInfo fileDetail - ) throws NotFoundException; - public abstract Response uploadFileWithRequiredFile(Long petId - ,InputStream fileInputStream, FileInfo fileDetail - ,String additionalMetadata ) throws NotFoundException; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java index 0a093d51ba92..c657b4ee3766 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java @@ -69,7 +69,7 @@ public Response getInventory() @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]") @PathParam("order_id") Long orderId ) throws NotFoundException { return delegate.getOrderById(orderId); diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index fd690d2791c0..000000000000 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java index 9c68cb335233..ad415532b6ca 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java @@ -78,7 +78,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java index e04f098c7c07..f57655fee856 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java @@ -48,7 +48,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 3f251ec15a5a..f2efccf5d1da 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -25,7 +25,7 @@ public class FakeApiServiceImpl extends FakeApiService { @Override - public Response fakeOuterBooleanSerialize(Boolean body + public Response fakeOuterBooleanSerialize(Boolean booleanPostBody ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -94,7 +94,7 @@ public Response testEnumParameters(List enumHeaderStringArray return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response testInlineAdditionalProperties(Map requestBody + public Response testInlineAdditionalProperties(String requestBody ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 4945268b9db4..c7e28596d1d7 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -69,14 +69,6 @@ public Response updatePetWithForm(Long petId public Response uploadFile(Long petId , String additionalMetadata , InputStream fileInputStream, FileInfo fileDetail - ) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - @Override - public Response uploadFileWithRequiredFile(Long petId -, InputStream fileInputStream, FileInfo fileDetail -, String additionalMetadata ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-pkmst/.openapi-generator-ignore b/samples/server/petstore/java-pkmst/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/server/petstore/java-pkmst/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-pkmst/.openapi-generator/VERSION +++ b/samples/server/petstore/java-pkmst/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/Readme.md b/samples/server/petstore/java-pkmst/Readme.md index 9867e11590b6..ebef7835e7c7 100644 --- a/samples/server/petstore/java-pkmst/Readme.md +++ b/samples/server/petstore/java-pkmst/Readme.md @@ -17,20 +17,20 @@ g)Allow you to integrate with tracing server (Example Zipkin) h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk) i)Allow you to configure Oauth2 security based authorization for your microservice - Additional Features + Additonal Features j)generate sample cucumber file and dependency to drive your Behaviour driven development. - k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc. + k)generate gatling based perfromance test , which can be excuted via build pipeline like jenkins etc. Working: -Using OpenAPI specification you can convert any definition to spring boot microservice. +Using swagger specification you can convert any definition to spring boot microservice. It has the integration with the below services: eureka registry, zipkin , spring boot admin, circuit breaker. By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and related configuration for eureka, zipkin, spring boot admin one has two options: -1) When generating from UI one has to provide vendor extensions inside the OpenAPI specification as below: +1) When generating from UI one has to provide vendor extensions inside the swagger specification as below: swagger: "2.0" info: description: "This is a sample Product Catalogue Server.\ @@ -43,11 +43,11 @@ info: springBootAdminUri: "http://localhost:8000" pkmstInterceptor: "true" -PLease note the vendor extensions are inside the info tag of the OpenAPI specification. All the tags are case sensitive. Once given all the related configuration and the dependency +PLease note the vendor extensions are inside the info tag of the swagger specification. All the tags are case sensitive. Once given all the related configuration and the dependency will be enabled. 2) When generating from the maven plugin one has to provide configuration inside pom as below: -inside the openapi generator maven plugin under the configuration section +inside the swagger codegen maven plugin under the configuration section product-openapi.yaml @@ -136,7 +136,7 @@ HttpLogging filter is provided for logging in the request and response. Can be f Spring security is also provided to secure the resources. Please modify according to your needs. First run: -Import the project in to the eclipse. Run the app as a spring boot application.The project will run on http://localhost:8008 +Import the project in to the eclipse. Run the app as an spring boot application.The project will run on http://localhost:8008 Swagger ui available on: http://localhost:8008/swagger-ui.html If all the configurations have been enabled(depending on the port) below are some of the URls to access: @@ -152,4 +152,4 @@ Pkmst examples https://github.com/ProKarma-Inc/pkmst-getting-started-examples Pkmst Extensions -https://github.com/ProKarma-Inc/pkmst-extention +https://github.com/ProKarma-Inc/pkmst-extention \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml index 8a62b880bf6c..5ca43f8a6f06 100644 --- a/samples/server/petstore/java-pkmst/pom.xml +++ b/samples/server/petstore/java-pkmst/pom.xml @@ -52,10 +52,10 @@ false - - jitpack.io - https://jitpack.io - + + jitpack.io + https://jitpack.io + @@ -83,35 +83,35 @@ + org.springframework.cloud + spring-cloud-starter-sleuth + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> + org.springframework.cloud spring-cloud-starter-sleuth + org.springframework.cloud spring-cloud-stream-binder-rabbit + --> org.springframework.boot spring-boot-starter-actuator - org.springframework.boot - spring-boot-starter-jetty + org.springframework.boot + spring-boot-starter-jetty + org.springframework.cloud + spring-cloud-netflix-hystrix-stream + + + org.springframework.cloud + spring-cloud-starter-bus-amqp + --> org.springframework.cloud spring-cloud-starter-hystrix-dashboard @@ -229,11 +229,11 @@ org.springframework spring-test - - org.threeten - threetenbp - 1.3.6 - + + org.threeten + threetenbp + 1.3.6 + @@ -263,7 +263,7 @@ **/*CucumberTest*.java + an example --> **/cucumber/*.java @@ -275,28 +275,28 @@ ${scala-maven-plugin.version} - + org.springframework.boot spring-boot-maven-plugin @@ -350,9 +350,9 @@ 2.19.1 - org.apache.maven.plugins - maven-pmd-plugin - + org.apache.maven.plugins + maven-pmd-plugin + diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java similarity index 98% rename from samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java rename to samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java index dac5a9cdd15f..67599c9bb45c 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/config/swagger/SwaggerDocumentationConfig.java @@ -20,7 +20,7 @@ */ @EnableSwagger2 @Configuration -public class OpenAPIDocumentationConfig { +public class SwaggerDocumentationConfig { public static final String DEFAULT_INCLUDE_PATTERN = "/pkmst/.*"; @Bean diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java index 18b41246f8cc..ae6b11d018f8 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). + * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -128,7 +128,7 @@ public interface PetApi { @RequestMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }, method = RequestMethod.POST) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @@ -143,6 +143,6 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" }, method = RequestMethod.POST) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java index efd55c865beb..28752172722b 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java @@ -50,48 +50,18 @@ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",requi public ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); - } - return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List tags, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity>(objectMapper.readValue("", List.class), HttpStatus.OK); - } - return new ResponseEntity>(HttpStatus.OK); } public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity(objectMapper.readValue("", Pet.class), HttpStatus.OK); - } - return new ResponseEntity(HttpStatus.OK); } @@ -102,23 +72,18 @@ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs t } public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Updated name of the pet", defaultValue="null") @RequestPart(value="name", required=false) String name, - @ApiParam(value = "Updated status of the pet", defaultValue="null") @RequestPart(value="status", required=false) String status, + @ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name, + @ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! return new ResponseEntity(HttpStatus.OK); } public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId, - @ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, + @ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata, @ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity(objectMapper.readValue("", ModelApiResponse.class), HttpStatus.OK); - } - return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index 4214fd18ff1b..be3ff14ebf64 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). + * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ package com.prokarma.pkmst.controller; @@ -58,7 +58,7 @@ public interface StoreApi { @RequestMapping(value = "/store/order/{orderId}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; + ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception; @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java index 16af6cd0225a..6c5faee23f2e 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java @@ -44,35 +44,15 @@ public ResponseEntity> getInventory(@RequestHeader(value = return new ResponseEntity>(HttpStatus.OK); } - public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, + public ResponseEntity getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="{min=1, max=5}" ) @PathVariable("orderId") Long orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); - } - return new ResponseEntity(HttpStatus.OK); } public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order order, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity(objectMapper.readValue("", Order.class), HttpStatus.OK); - } - return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java index 81230453e81c..f81441045ebb 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java @@ -1,6 +1,6 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT). + * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ package com.prokarma.pkmst.controller; diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java index 3dc6cf94c8fc..8ba2847e32e1 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java @@ -60,16 +60,6 @@ public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true ) @PathVariable("username") String username, @RequestHeader(value = "Accept", required = false) String accept) throws Exception { // do some magic! - - if (accept != null && accept.contains("application/json")) { - return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); - } - - - if (accept != null && accept.contains("application/xml")) { - return new ResponseEntity(objectMapper.readValue("", User.class), HttpStatus.OK); - } - return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml index 13ef356233ca..fecadb4b3ab2 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-dev.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: 8080 + port: -1 # Spring Actuator management: diff --git a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml index 57e184773b0d..c314f6e7a300 100644 --- a/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml +++ b/samples/server/petstore/java-pkmst/src/main/resources/application-local.yml @@ -1,6 +1,6 @@ # Discovery Server Access server: - port: 8080 + port: -1 # Spring Actuator management: diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index 5f2c63d116d3..a82c9ee422d7 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -77,7 +77,7 @@ public static ArrayEnumEnum fromValue(String text) { return null; } } - + @JsonProperty("array_enum") private List arrayEnum = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index b84a9bee2bc1..7cd05af295f7 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -47,7 +47,7 @@ public static InnerEnum fromValue(String text) { return null; } } - + @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java index 4b5720896eec..8dff19402378 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiController.java @@ -177,25 +177,4 @@ public Result uploadFile(Long petId) throws Exception { JsonNode result = mapper.valueToTree(obj); return ok(result); } - - @ApiAction - public Result uploadFileWithRequiredFile(Long petId) throws Exception { - String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; - String additionalMetadata; - if (valueadditionalMetadata != null) { - additionalMetadata = valueadditionalMetadata; - } else { - additionalMetadata = "null"; - } - Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file"); - if ((file == null || ((File) file.getFile()).length() == 0)) { - throw new IllegalArgumentException("'file' file cannot be empty"); - } - ModelApiResponse obj = imp.uploadFileWithRequiredFile(petId, file, additionalMetadata); - if (configuration.getBoolean("useOutputBeanValidation")) { - OpenAPIUtils.validate(obj); - } - JsonNode result = mapper.valueToTree(obj); - return ok(result); - } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java index 85e0c60ef6cf..2cd201c4bc35 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImp.java @@ -56,10 +56,4 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.M return new ModelApiResponse(); } - @Override - public ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception { - //Do your magic!!! - return new ModelApiResponse(); - } - } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java index 1a87f77ac02c..961632675800 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/PetApiControllerImpInterface.java @@ -29,6 +29,4 @@ public interface PetApiControllerImpInterface { ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception; - ModelApiResponse uploadFileWithRequiredFile(Long petId, Http.MultipartFormData.FilePart file, String additionalMetadata) throws Exception; - } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes index b7943a8a33d8..de7b52199cbe 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes +++ b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes @@ -32,7 +32,6 @@ GET /v2/pet/:petId controllers.PetApiController.getPetBy PUT /v2/pet controllers.PetApiController.updatePet() POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long) POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) -POST /v2/pet/:petId/uploadImageWithRequiredFile controllers.PetApiController.uploadFileWithRequiredFile(petId: Long) #Functions for Store API DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 7398708288f1..1fb6f6037ebc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -381,61 +379,6 @@ "x-accepts" : "application/json" } }, - "/pet/{petId}/uploadImageWithRequiredFile" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "operationId" : "uploadFileWithRequiredFile", - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "required" : [ "file" ], - "properties" : { - "additionalMetadata" : { - "type" : "string", - "description" : "Additional data to pass to server" - }, - "file" : { - "type" : "string", - "description" : "file to upload", - "format" : "binary" - } - } - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "description" : "successful operation", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, "/store/inventory" : { "get" : { "tags" : [ "store" ], @@ -890,8 +833,6 @@ "name" : "enum_header_string_array", "in" : "header", "description" : "Header parameter enum test (string array)", - "style" : "simple", - "explode" : false, "schema" : { "type" : "array", "items" : { @@ -913,7 +854,6 @@ "name" : "enum_query_string_array", "in" : "query", "description" : "Query parameter enum test (string array)", - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json index 01ebde2297ed..eeb13a4729fb 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json @@ -112,7 +112,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -169,7 +168,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json index 01ebde2297ed..eeb13a4729fb 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json @@ -112,7 +112,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -169,7 +168,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index 3aff71de768d..8a3df9670023 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -118,24 +118,9 @@ public interface PetApi { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet", }) + }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, @FormParam(value = "file") Attachment fileDetail); - - @POST - @Path("/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream, - @FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index caf1f17b0e27..43eafcddd2da 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -298,48 +298,6 @@ paths: - pet x-tags: - tag: pet - /pet/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - required: - - file - required: true - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-tags: - - tag: pet /store/inventory: get: description: Returns a map of status codes to quantities diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index feea3adec9d5..a2d2c5e11ab8 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 3.0.3-SNAPSHOT. +Generated by OpenAPI Generator 3.0.2-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION index 82602aa4190d..f9f7450d1359 100644 --- a/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln deleted file mode 100644 index 757078a1383c..000000000000 --- a/samples/server/petstore/nancyfx-async/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" -EndProject -Global -GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection -GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE -EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs deleted file mode 100644 index db083b73bdc7..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/ApiResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// Describes the result of uploading an image resource - /// - public sealed class ApiResponse: IEquatable - { - /// - /// Code - /// - public int? Code { get; private set; } - - /// - /// Type - /// - public string Type { get; private set; } - - /// - /// Message - /// - public string Message { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use ApiResponse.Builder() for instance creation instead. - /// - [Obsolete] - public ApiResponse() - { - } - - private ApiResponse(int? Code, string Type, string Message) - { - - this.Code = Code; - - this.Type = Type; - - this.Message = Message; - - } - - /// - /// Returns builder of ApiResponse. - /// - /// ApiResponseBuilder - public static ApiResponseBuilder Builder() - { - return new ApiResponseBuilder(); - } - - /// - /// Returns ApiResponseBuilder with properties set. - /// Use it to change properties. - /// - /// ApiResponseBuilder - public ApiResponseBuilder With() - { - return Builder() - .Code(Code) - .Type(Type) - .Message(Message); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(ApiResponse other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are equals, false otherwise - public static bool operator == (ApiResponse left, ApiResponse right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are not equals, false otherwise - public static bool operator != (ApiResponse left, ApiResponse right) - { - return !Equals(left, right); - } - - /// - /// Builder of ApiResponse. - /// - public sealed class ApiResponseBuilder - { - private int? _Code; - private string _Type; - private string _Message; - - internal ApiResponseBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for ApiResponse.Code property. - /// - /// Code - public ApiResponseBuilder Code(int? value) - { - _Code = value; - return this; - } - - /// - /// Sets value for ApiResponse.Type property. - /// - /// Type - public ApiResponseBuilder Type(string value) - { - _Type = value; - return this; - } - - /// - /// Sets value for ApiResponse.Message property. - /// - /// Message - public ApiResponseBuilder Message(string value) - { - _Message = value; - return this; - } - - - /// - /// Builds instance of ApiResponse. - /// - /// ApiResponse - public ApiResponse Build() - { - Validate(); - return new ApiResponse( - Code: _Code, - Type: _Type, - Message: _Message - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs deleted file mode 100644 index 1bfb30abb752..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Category.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A category for a pet - /// - public sealed class Category: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Category.Builder() for instance creation instead. - /// - [Obsolete] - public Category() - { - } - - private Category(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Category. - /// - /// CategoryBuilder - public static CategoryBuilder Builder() - { - return new CategoryBuilder(); - } - - /// - /// Returns CategoryBuilder with properties set. - /// Use it to change properties. - /// - /// CategoryBuilder - public CategoryBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Category other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are equals, false otherwise - public static bool operator == (Category left, Category right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are not equals, false otherwise - public static bool operator != (Category left, Category right) - { - return !Equals(left, right); - } - - /// - /// Builder of Category. - /// - public sealed class CategoryBuilder - { - private long? _Id; - private string _Name; - - internal CategoryBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Category.Id property. - /// - /// Id - public CategoryBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Category.Name property. - /// - /// Name - public CategoryBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Category. - /// - /// Category - public Category Build() - { - Validate(); - return new Category( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs deleted file mode 100644 index 7bdec1016958..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Order.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// An order for a pets from the pet store - /// - public sealed class Order: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// PetId - /// - public long? PetId { get; private set; } - - /// - /// Quantity - /// - public int? Quantity { get; private set; } - - /// - /// ShipDate - /// - public ZonedDateTime? ShipDate { get; private set; } - - /// - /// Order Status - /// - public StatusEnum? Status { get; private set; } - - /// - /// Complete - /// - public bool? Complete { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Order.Builder() for instance creation instead. - /// - [Obsolete] - public Order() - { - } - - private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) - { - - this.Id = Id; - - this.PetId = PetId; - - this.Quantity = Quantity; - - this.ShipDate = ShipDate; - - this.Status = Status; - - this.Complete = Complete; - - } - - /// - /// Returns builder of Order. - /// - /// OrderBuilder - public static OrderBuilder Builder() - { - return new OrderBuilder(); - } - - /// - /// Returns OrderBuilder with properties set. - /// Use it to change properties. - /// - /// OrderBuilder - public OrderBuilder With() - { - return Builder() - .Id(Id) - .PetId(PetId) - .Quantity(Quantity) - .ShipDate(ShipDate) - .Status(Status) - .Complete(Complete); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Order other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are equals, false otherwise - public static bool operator == (Order left, Order right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are not equals, false otherwise - public static bool operator != (Order left, Order right) - { - return !Equals(left, right); - } - - /// - /// Builder of Order. - /// - public sealed class OrderBuilder - { - private long? _Id; - private long? _PetId; - private int? _Quantity; - private ZonedDateTime? _ShipDate; - private StatusEnum? _Status; - private bool? _Complete; - - internal OrderBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - _Complete = false; - } - - /// - /// Sets value for Order.Id property. - /// - /// Id - public OrderBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Order.PetId property. - /// - /// PetId - public OrderBuilder PetId(long? value) - { - _PetId = value; - return this; - } - - /// - /// Sets value for Order.Quantity property. - /// - /// Quantity - public OrderBuilder Quantity(int? value) - { - _Quantity = value; - return this; - } - - /// - /// Sets value for Order.ShipDate property. - /// - /// ShipDate - public OrderBuilder ShipDate(ZonedDateTime? value) - { - _ShipDate = value; - return this; - } - - /// - /// Sets value for Order.Status property. - /// - /// Order Status - public OrderBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - /// - /// Sets value for Order.Complete property. - /// - /// Complete - public OrderBuilder Complete(bool? value) - { - _Complete = value; - return this; - } - - - /// - /// Builds instance of Order. - /// - /// Order - public Order Build() - { - Validate(); - return new Order( - Id: _Id, - PetId: _PetId, - Quantity: _Quantity, - ShipDate: _ShipDate, - Status: _Status, - Complete: _Complete - ); - } - - private void Validate() - { - } - } - - - public enum StatusEnum { Placed, Approved, Delivered }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs deleted file mode 100644 index a3f02e090883..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Pet.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A pet for sale in the pet store - /// - public sealed class Pet: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Category - /// - public Category Category { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// PhotoUrls - /// - public List PhotoUrls { get; private set; } - - /// - /// Tags - /// - public List Tags { get; private set; } - - /// - /// pet status in the store - /// - public StatusEnum? Status { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Pet.Builder() for instance creation instead. - /// - [Obsolete] - public Pet() - { - } - - private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) - { - - this.Id = Id; - - this.Category = Category; - - this.Name = Name; - - this.PhotoUrls = PhotoUrls; - - this.Tags = Tags; - - this.Status = Status; - - } - - /// - /// Returns builder of Pet. - /// - /// PetBuilder - public static PetBuilder Builder() - { - return new PetBuilder(); - } - - /// - /// Returns PetBuilder with properties set. - /// Use it to change properties. - /// - /// PetBuilder - public PetBuilder With() - { - return Builder() - .Id(Id) - .Category(Category) - .Name(Name) - .PhotoUrls(PhotoUrls) - .Tags(Tags) - .Status(Status); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Pet other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are equals, false otherwise - public static bool operator == (Pet left, Pet right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are not equals, false otherwise - public static bool operator != (Pet left, Pet right) - { - return !Equals(left, right); - } - - /// - /// Builder of Pet. - /// - public sealed class PetBuilder - { - private long? _Id; - private Category _Category; - private string _Name; - private List _PhotoUrls; - private List _Tags; - private StatusEnum? _Status; - - internal PetBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Pet.Id property. - /// - /// Id - public PetBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Pet.Category property. - /// - /// Category - public PetBuilder Category(Category value) - { - _Category = value; - return this; - } - - /// - /// Sets value for Pet.Name property. - /// - /// Name - public PetBuilder Name(string value) - { - _Name = value; - return this; - } - - /// - /// Sets value for Pet.PhotoUrls property. - /// - /// PhotoUrls - public PetBuilder PhotoUrls(List value) - { - _PhotoUrls = value; - return this; - } - - /// - /// Sets value for Pet.Tags property. - /// - /// Tags - public PetBuilder Tags(List value) - { - _Tags = value; - return this; - } - - /// - /// Sets value for Pet.Status property. - /// - /// pet status in the store - public PetBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - - /// - /// Builds instance of Pet. - /// - /// Pet - public Pet Build() - { - Validate(); - return new Pet( - Id: _Id, - Category: _Category, - Name: _Name, - PhotoUrls: _PhotoUrls, - Tags: _Tags, - Status: _Status - ); - } - - private void Validate() - { - if (_Name == null) - { - throw new ArgumentException("Name is a required property for Pet and cannot be null"); - } - if (_PhotoUrls == null) - { - throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); - } - } - } - - - public enum StatusEnum { Available, Pending, Sold }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs deleted file mode 100644 index 7ce321d25114..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/Tag.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A tag for a pet - /// - public sealed class Tag: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Tag.Builder() for instance creation instead. - /// - [Obsolete] - public Tag() - { - } - - private Tag(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Tag. - /// - /// TagBuilder - public static TagBuilder Builder() - { - return new TagBuilder(); - } - - /// - /// Returns TagBuilder with properties set. - /// Use it to change properties. - /// - /// TagBuilder - public TagBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Tag other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are equals, false otherwise - public static bool operator == (Tag left, Tag right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are not equals, false otherwise - public static bool operator != (Tag left, Tag right) - { - return !Equals(left, right); - } - - /// - /// Builder of Tag. - /// - public sealed class TagBuilder - { - private long? _Id; - private string _Name; - - internal TagBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Tag.Id property. - /// - /// Id - public TagBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Tag.Name property. - /// - /// Name - public TagBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Tag. - /// - /// Tag - public Tag Build() - { - Validate(); - return new Tag( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs deleted file mode 100644 index 04d33ca07f77..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Models/User.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A User who is purchasing from the pet store - /// - public sealed class User: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Username - /// - public string Username { get; private set; } - - /// - /// FirstName - /// - public string FirstName { get; private set; } - - /// - /// LastName - /// - public string LastName { get; private set; } - - /// - /// Email - /// - public string Email { get; private set; } - - /// - /// Password - /// - public string Password { get; private set; } - - /// - /// Phone - /// - public string Phone { get; private set; } - - /// - /// User Status - /// - public int? UserStatus { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use User.Builder() for instance creation instead. - /// - [Obsolete] - public User() - { - } - - private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) - { - - this.Id = Id; - - this.Username = Username; - - this.FirstName = FirstName; - - this.LastName = LastName; - - this.Email = Email; - - this.Password = Password; - - this.Phone = Phone; - - this.UserStatus = UserStatus; - - } - - /// - /// Returns builder of User. - /// - /// UserBuilder - public static UserBuilder Builder() - { - return new UserBuilder(); - } - - /// - /// Returns UserBuilder with properties set. - /// Use it to change properties. - /// - /// UserBuilder - public UserBuilder With() - { - return Builder() - .Id(Id) - .Username(Username) - .FirstName(FirstName) - .LastName(LastName) - .Email(Email) - .Password(Password) - .Phone(Phone) - .UserStatus(UserStatus); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(User other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are equals, false otherwise - public static bool operator == (User left, User right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are not equals, false otherwise - public static bool operator != (User left, User right) - { - return !Equals(left, right); - } - - /// - /// Builder of User. - /// - public sealed class UserBuilder - { - private long? _Id; - private string _Username; - private string _FirstName; - private string _LastName; - private string _Email; - private string _Password; - private string _Phone; - private int? _UserStatus; - - internal UserBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for User.Id property. - /// - /// Id - public UserBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for User.Username property. - /// - /// Username - public UserBuilder Username(string value) - { - _Username = value; - return this; - } - - /// - /// Sets value for User.FirstName property. - /// - /// FirstName - public UserBuilder FirstName(string value) - { - _FirstName = value; - return this; - } - - /// - /// Sets value for User.LastName property. - /// - /// LastName - public UserBuilder LastName(string value) - { - _LastName = value; - return this; - } - - /// - /// Sets value for User.Email property. - /// - /// Email - public UserBuilder Email(string value) - { - _Email = value; - return this; - } - - /// - /// Sets value for User.Password property. - /// - /// Password - public UserBuilder Password(string value) - { - _Password = value; - return this; - } - - /// - /// Sets value for User.Phone property. - /// - /// Phone - public UserBuilder Phone(string value) - { - _Phone = value; - return this; - } - - /// - /// Sets value for User.UserStatus property. - /// - /// User Status - public UserBuilder UserStatus(int? value) - { - _UserStatus = value; - return this; - } - - - /// - /// Builds instance of User. - /// - /// User - public User Build() - { - Validate(); - return new User( - Id: _Id, - Username: _Username, - FirstName: _FirstName, - LastName: _LastName, - Email: _Email, - Password: _Password, - Phone: _Phone, - UserStatus: _UserStatus - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs deleted file mode 100644 index d978df59cb2e..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/PetModule.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools.v2.Modules -{ - /// - /// Status values that need to be considered for filter - /// - public enum FindPetsByStatusStatusEnum - { - available = 1, - pending = 2, - sold = 3 - }; - - - /// - /// Module processing requests of Pet domain. - /// - public sealed class PetModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public PetModule(PetService service) : base("/v2") - { - Post["/pet", true] = async (parameters, ct) => - { - var pet = this.Bind(); - Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); - - await service.AddPet(Context, pet); - return new Response { ContentType = ""}; - }; - - Delete["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); - - await service.DeletePet(Context, petId, apiKey); - return new Response { ContentType = ""}; - }; - - Get["/pet/findByStatus", true] = async (parameters, ct) => - { - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); - Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - - return await service.FindPetsByStatus(Context, status).ToArray(); - }; - - Get["/pet/findByTags", true] = async (parameters, ct) => - { - var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); - Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - - return await service.FindPetsByTags(Context, tags).ToArray(); - }; - - Get["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); - - return await service.GetPetById(Context, petId); - }; - - Put["/pet", true] = async (parameters, ct) => - { - var pet = this.Bind(); - Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); - - await service.UpdatePet(Context, pet); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); - - await service.UpdatePetWithForm(Context, petId, name, status); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}/uploadImage", true] = async (parameters, ct) => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); - var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); - - return await service.UploadFile(Context, petId, additionalMetadata, file); - }; - } - } - - /// - /// Service handling Pet requests. - /// - public interface PetService - { - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task AddPet(NancyContext context, Pet pet); - - /// - /// - /// - /// Context of request - /// Pet id to delete - /// (optional) - /// - Task DeletePet(NancyContext context, long? petId, string apiKey); - - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Context of request - /// Status values that need to be considered for filter - /// List<Pet> - Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); - - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Context of request - /// Tags to filter by - /// List<Pet> - Task> FindPetsByTags(NancyContext context, List tags); - - /// - /// Returns a single pet - /// - /// Context of request - /// ID of pet to return - /// Pet - Task GetPetById(NancyContext context, long? petId); - - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - Task UpdatePet(NancyContext context, Pet pet); - - /// - /// - /// - /// Context of request - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status); - - /// - /// - /// - /// Context of request - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); - } - - /// - /// Abstraction of PetService. - /// - public abstract class AbstractPetService: PetService - { - public virtual Task AddPet(NancyContext context, Pet pet) - { - return AddPet(pet); - } - - public virtual Task DeletePet(NancyContext context, long? petId, string apiKey) - { - return DeletePet(petId, apiKey); - } - - public virtual Task> FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) - { - return FindPetsByStatus(status); - } - - public virtual Task> FindPetsByTags(NancyContext context, List tags) - { - return FindPetsByTags(tags); - } - - public virtual Task GetPetById(NancyContext context, long? petId) - { - return GetPetById(petId); - } - - public virtual Task UpdatePet(NancyContext context, Pet pet) - { - return UpdatePet(pet); - } - - public virtual Task UpdatePetWithForm(NancyContext context, long? petId, string name, string status) - { - return UpdatePetWithForm(petId, name, status); - } - - public virtual Task UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) - { - return UploadFile(petId, additionalMetadata, file); - } - - protected abstract Task AddPet(Pet pet); - - protected abstract Task DeletePet(long? petId, string apiKey); - - protected abstract Task> FindPetsByStatus(FindPetsByStatusStatusEnum? status); - - protected abstract Task> FindPetsByTags(List tags); - - protected abstract Task GetPetById(long? petId); - - protected abstract Task UpdatePet(Pet pet); - - protected abstract Task UpdatePetWithForm(long? petId, string name, string status); - - protected abstract Task UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs deleted file mode 100644 index 47786fb496d4..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/StoreModule.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools.v2.Modules -{ - - /// - /// Module processing requests of Store domain. - /// - public sealed class StoreModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public StoreModule(StoreService service) : base("/v2") - { - Delete["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); - - await service.DeleteOrder(Context, orderId); - return new Response { ContentType = ""}; - }; - - Get["/store/inventory", true] = async (parameters, ct) => - { - - return await service.GetInventory(Context); - }; - - Get["/store/order/{orderId}", true] = async (parameters, ct) => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); - - return await service.GetOrderById(Context, orderId); - }; - - Post["/store/order", true] = async (parameters, ct) => - { - var order = this.Bind(); - Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); - - return await service.PlaceOrder(Context, order); - }; - } - } - - /// - /// Service handling Store requests. - /// - public interface StoreService - { - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Context of request - /// ID of the order that needs to be deleted - /// - Task DeleteOrder(NancyContext context, string orderId); - - /// - /// Returns a map of status codes to quantities - /// - /// Context of request - /// Dictionary<string, int?> - Task> GetInventory(NancyContext context); - - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Context of request - /// ID of pet that needs to be fetched - /// Order - Task GetOrderById(NancyContext context, long? orderId); - - /// - /// - /// - /// Context of request - /// order placed for purchasing the pet - /// Order - Task PlaceOrder(NancyContext context, Order order); - } - - /// - /// Abstraction of StoreService. - /// - public abstract class AbstractStoreService: StoreService - { - public virtual Task DeleteOrder(NancyContext context, string orderId) - { - return DeleteOrder(orderId); - } - - public virtual Task> GetInventory(NancyContext context) - { - return GetInventory(); - } - - public virtual Task GetOrderById(NancyContext context, long? orderId) - { - return GetOrderById(orderId); - } - - public virtual Task PlaceOrder(NancyContext context, Order order) - { - return PlaceOrder(order); - } - - protected abstract Task DeleteOrder(string orderId); - - protected abstract Task> GetInventory(); - - protected abstract Task GetOrderById(long? orderId); - - protected abstract Task PlaceOrder(Order order); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs deleted file mode 100644 index 38efbe0f7cc4..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Modules/UserModule.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; -using System.Threading.Tasks; - -namespace Org.OpenAPITools.v2.Modules -{ - - /// - /// Module processing requests of User domain. - /// - public sealed class UserModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public UserModule(UserService service) : base("/v2") - { - Post["/user", true] = async (parameters, ct) => - { - var user = this.Bind(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); - - await service.CreateUser(Context, user); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithArray", true] = async (parameters, ct) => - { - var user = this.Bind>(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); - - await service.CreateUsersWithArrayInput(Context, user); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithList", true] = async (parameters, ct) => - { - var user = this.Bind>(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); - - await service.CreateUsersWithListInput(Context, user); - return new Response { ContentType = ""}; - }; - - Delete["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); - - await service.DeleteUser(Context, username); - return new Response { ContentType = ""}; - }; - - Get["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); - - return await service.GetUserByName(Context, username); - }; - - Get["/user/login", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); - var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); - - Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); - - return await service.LoginUser(Context, username, password); - }; - - Get["/user/logout", true] = async (parameters, ct) => - { - - await service.LogoutUser(Context); - return new Response { ContentType = ""}; - }; - - Put["/user/{username}", true] = async (parameters, ct) => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - var user = this.Bind(); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); - - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); - - await service.UpdateUser(Context, username, user); - return new Response { ContentType = ""}; - }; - } - } - - /// - /// Service handling User requests. - /// - public interface UserService - { - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// Created user object - /// - Task CreateUser(NancyContext context, User user); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithArrayInput(NancyContext context, List user); - - /// - /// - /// - /// Context of request - /// List of user object - /// - Task CreateUsersWithListInput(NancyContext context, List user); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// The name that needs to be deleted - /// - Task DeleteUser(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The name that needs to be fetched. Use user1 for testing. - /// User - Task GetUserByName(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The user name for login - /// The password for login in clear text - /// string - Task LoginUser(NancyContext context, string username, string password); - - /// - /// - /// - /// Context of request - /// - Task LogoutUser(NancyContext context); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// name that need to be deleted - /// Updated user object - /// - Task UpdateUser(NancyContext context, string username, User user); - } - - /// - /// Abstraction of UserService. - /// - public abstract class AbstractUserService: UserService - { - public virtual Task CreateUser(NancyContext context, User user) - { - return CreateUser(user); - } - - public virtual Task CreateUsersWithArrayInput(NancyContext context, List user) - { - return CreateUsersWithArrayInput(user); - } - - public virtual Task CreateUsersWithListInput(NancyContext context, List user) - { - return CreateUsersWithListInput(user); - } - - public virtual Task DeleteUser(NancyContext context, string username) - { - return DeleteUser(username); - } - - public virtual Task GetUserByName(NancyContext context, string username) - { - return GetUserByName(username); - } - - public virtual Task LoginUser(NancyContext context, string username, string password) - { - return LoginUser(username, password); - } - - public virtual Task LogoutUser(NancyContext context) - { - return LogoutUser(); - } - - public virtual Task UpdateUser(NancyContext context, string username, User user) - { - return UpdateUser(username, user); - } - - protected abstract Task CreateUser(User user); - - protected abstract Task CreateUsersWithArrayInput(List user); - - protected abstract Task CreateUsersWithListInput(List user); - - protected abstract Task DeleteUser(string username); - - protected abstract Task GetUserByName(string username); - - protected abstract Task LoginUser(string username, string password); - - protected abstract Task LogoutUser(); - - protected abstract Task UpdateUser(string username, User user); - } - -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index 04b710b25cbd..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - AnyCPU - {768B8DC6-54EE-4D40-9B20-7857E1D742A4} - Library - Properties - Org.OpenAPITools.v2 - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.XML - - - - ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll - True - - - ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll - True - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - - - - - - - - - - - - - - - diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index 102c48def9d8..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,13 +0,0 @@ - - - - Org.OpenAPITools - Org.OpenAPITools - 1.0.0 - openapi-generator - openapi-generator - false - NancyFx Org.OpenAPITools API - http://www.apache.org/licenses/LICENSE-2.0.html - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs deleted file mode 100644 index 9e7cfd8a8570..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/LocalDateConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Nancy.Bootstrapper; -using Nancy.Json; -using NodaTime; -using NodaTime.Text; -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.v2.Utils -{ - /// - /// (De)serializes a to a string using - /// the RFC3339 - /// full-date format. - /// - public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup - { - public override IEnumerable SupportedTypes - { - get - { - yield return typeof(LocalDate); - yield return typeof(LocalDate?); - } - } - - public void Initialize(IPipelines pipelines) - { - JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); - } - - - public override object Serialize(object obj, JavaScriptSerializer serializer) - { - if (obj is LocalDate) - { - LocalDate localDate = (LocalDate)obj; - return LocalDatePattern.IsoPattern.Format(localDate); - } - return null; - } - - public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) - { - if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) - { - try - { - return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); - } - catch { } - } - return null; - } - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs deleted file mode 100644 index 9bc5408abfea..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/Utils/Parameters.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using Nancy; -using NodaTime; -using NodaTime.Text; -using Sharpility.Base; -using Sharpility.Extensions; -using Sharpility.Util; - -namespace Org.OpenAPITools.v2.Utils -{ - internal static class Parameters - { - private static readonly IDictionary> Parsers = CreateParsers(); - - internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - var valueType = typeof(TValue); - var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); - var isNullable = default(TValue) == null; - string value = RawValueOf(parameters, request, name, parameterType); - Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); - if (value == null && isNullable) - { - return default(TValue); - } - if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) - { - return EnumValueOf(name, value); - } - return ValueOf(parameters, name, value, valueType, request, parameterType); - } - - private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - try - { - switch (parameterType) - { - case ParameterType.Query: - string querValue = request.Query[name]; - return querValue; - case ParameterType.Path: - string pathValue = parameters[name]; - return pathValue; - case ParameterType.Header: - var headerValue = request.Headers[name]; - return headerValue != null ? string.Join(",", headerValue) : null; - } - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); - } - throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); - } - - private static TValue EnumValueOf(string name, string value) - { - var valueType = typeof(TValue); - var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); - Preconditions.IsNotNull(enumType, () => new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); - var values = Enum.GetValues(enumType); - foreach (var entry in values) - { - if (entry.ToString().EqualsIgnoreCases(value) - || ((int)entry).ToString().EqualsIgnoreCases(value)) - { - return (TValue)entry; - } - } - throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", - name, value, Strings.ToString(values))); - } - - private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) - { - var parser = Parsers.GetIfPresent(valueType); - if (parser != null) - { - return ParseValueUsing(name, value, valueType, parser); - } - if (parameterType == ParameterType.Path) - { - return DynamicValueOf(parameters, name); - } - if (parameterType == ParameterType.Query) - { - return DynamicValueOf(request.Query, name); - } - throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); - } - - private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) - { - var result = parser(Parameter.Of(name, value)); - try - { - return (TValue)result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + - "Received: '{2}', expected: '{3}'.", - name, value, result.GetType(), valueType)); - } - } - - private static TValue DynamicValueOf(dynamic parameters, string name) - { - string value = parameters[name]; - try - { - TValue result = parameters[name]; - return result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + - "Expected type: '{2}' is not supported", - name, value, typeof(TValue))); - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", - name, typeof(TValue)), e); - } - } - - private static IDictionary> CreateParsers() - { - var parsers = ImmutableDictionary.CreateBuilder>(); - parsers.Put(typeof(string), value => value.Value); - parsers.Put(typeof(bool), SafeParse(bool.Parse)); - parsers.Put(typeof(bool?), SafeParse(bool.Parse)); - parsers.Put(typeof(byte), SafeParse(byte.Parse)); - parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); - parsers.Put(typeof(short), SafeParse(short.Parse)); - parsers.Put(typeof(short?), SafeParse(short.Parse)); - parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); - parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); - parsers.Put(typeof(int), SafeParse(int.Parse)); - parsers.Put(typeof(int?), SafeParse(int.Parse)); - parsers.Put(typeof(uint), SafeParse(uint.Parse)); - parsers.Put(typeof(uint?), SafeParse(uint.Parse)); - parsers.Put(typeof(long), SafeParse(long.Parse)); - parsers.Put(typeof(long?), SafeParse(long.Parse)); - parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); - parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); - parsers.Put(typeof(float), SafeParse(float.Parse)); - parsers.Put(typeof(float?), SafeParse(float.Parse)); - parsers.Put(typeof(double), SafeParse(double.Parse)); - parsers.Put(typeof(double?), SafeParse(double.Parse)); - parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); - parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); - parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); - parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); - parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); - parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); - parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); - parsers.Put(typeof(IList), ImmutableListParse(value => value)); - parsers.Put(typeof(List), ListParse(value => value)); - parsers.Put(typeof(ISet), ImmutableListParse(value => value)); - parsers.Put(typeof(HashSet), SetParse(value => value)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), NullableListParse(bool.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(List), ListParse(byte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); - parsers.Put(typeof(HashSet), SetParse(byte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(List), ListParse(sbyte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); - parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); - parsers.Put(typeof(List), ListParse(short.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); - parsers.Put(typeof(HashSet), SetParse(short.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(List), ListParse(ushort.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); - parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(List), NullableListParse(int.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(List), ListParse(uint.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); - parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(List), NullableListParse(long.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(List), ListParse(ulong.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); - parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(List), NullableListParse(float.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(List), NullableListParse(double.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), NullableListParse(decimal.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); - parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); - - return parsers.ToImmutableDictionary(); - } - - private static Func SafeParse(Func parse) - { - return parameter => - { - try - { - return parse(parameter.Value); - } - catch (OverflowException) - { - throw ParameterOutOfRange(parameter, typeof(T)); - } - catch (FormatException) - { - throw InvalidParameterFormat(parameter, typeof(T)); - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", - parameter.Name, parameter.Value, typeof(T)), e); - } - }; - } - - private static Func NullableListParse(Func itemParser) where T: struct - { - return ListParse(it => it.ToNullable(itemParser)); - } - - private static Func ListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new List(); - } - return ParseCollection(parameter.Value, itemParser).ToList(); - }; - } - - private static Func NullableImmutableListParse(Func itemParser) where T: struct - { - return ImmutableListParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Lists.EmptyList(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableList(); - }; - } - - private static Func NullableSetParse(Func itemParser) where T: struct - { - return SetParse(it => it.ToNullable(itemParser)); - } - - private static Func SetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new HashSet(); - } - return ParseCollection(parameter.Value, itemParser).ToSet(); - }; - } - - private static Func NullableImmutableSetParse(Func itemParser) where T: struct - { - return ImmutableSetParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableSetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Sets.EmptySet(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); - }; - } - - private static ZonedDateTime ParseZonedDateTime(string value) - { - var dateTime = DateTime.Parse(value); - return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); - } - - private static LocalDate ParseLocalDate(string value) - { - return LocalDatePattern.IsoPattern.Parse(value).Value; - } - - private static LocalTime ParseLocalTime(string value) - { - return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; - } - - private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static IEnumerable ParseCollection(string value, Func itemParser) - { - var results = value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser); - return results; - } - - public static T? ToNullable(this string s, Func itemParser) where T : struct - { - T? result = new T?(); - try - { - if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) - { - result = itemParser(s); - } - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); - } - return result; - } - - private class Parameter - { - internal string Name { get; private set; } - internal string Value { get; private set; } - - private Parameter(string name, string value) - { - Name = name; - Value = value; - } - - internal static Parameter Of(string name, string value) - { - return new Parameter(name, value); - } - } - } - - internal enum ParameterType - { - Undefined, - Query, - Path, - Header - } -} diff --git a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config deleted file mode 100644 index e3401566e5d2..000000000000 --- a/samples/server/petstore/nancyfx-async/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/.openapi-generator/VERSION b/samples/server/petstore/nancyfx/.openapi-generator/VERSION index 82602aa4190d..f9f7450d1359 100644 --- a/samples/server/petstore/nancyfx/.openapi-generator/VERSION +++ b/samples/server/petstore/nancyfx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln b/samples/server/petstore/nancyfx/Org.OpenAPITools.sln deleted file mode 100644 index 757078a1383c..000000000000 --- a/samples/server/petstore/nancyfx/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}" -EndProject -Global -GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU -{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection -GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE -EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs deleted file mode 100644 index db083b73bdc7..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/ApiResponse.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// Describes the result of uploading an image resource - /// - public sealed class ApiResponse: IEquatable - { - /// - /// Code - /// - public int? Code { get; private set; } - - /// - /// Type - /// - public string Type { get; private set; } - - /// - /// Message - /// - public string Message { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use ApiResponse.Builder() for instance creation instead. - /// - [Obsolete] - public ApiResponse() - { - } - - private ApiResponse(int? Code, string Type, string Message) - { - - this.Code = Code; - - this.Type = Type; - - this.Message = Message; - - } - - /// - /// Returns builder of ApiResponse. - /// - /// ApiResponseBuilder - public static ApiResponseBuilder Builder() - { - return new ApiResponseBuilder(); - } - - /// - /// Returns ApiResponseBuilder with properties set. - /// Use it to change properties. - /// - /// ApiResponseBuilder - public ApiResponseBuilder With() - { - return Builder() - .Code(Code) - .Type(Type) - .Message(Message); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(ApiResponse other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are equals, false otherwise - public static bool operator == (ApiResponse left, ApiResponse right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (ApiResponse. - /// - /// Compared (ApiResponse - /// Compared (ApiResponse - /// true if compared items are not equals, false otherwise - public static bool operator != (ApiResponse left, ApiResponse right) - { - return !Equals(left, right); - } - - /// - /// Builder of ApiResponse. - /// - public sealed class ApiResponseBuilder - { - private int? _Code; - private string _Type; - private string _Message; - - internal ApiResponseBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for ApiResponse.Code property. - /// - /// Code - public ApiResponseBuilder Code(int? value) - { - _Code = value; - return this; - } - - /// - /// Sets value for ApiResponse.Type property. - /// - /// Type - public ApiResponseBuilder Type(string value) - { - _Type = value; - return this; - } - - /// - /// Sets value for ApiResponse.Message property. - /// - /// Message - public ApiResponseBuilder Message(string value) - { - _Message = value; - return this; - } - - - /// - /// Builds instance of ApiResponse. - /// - /// ApiResponse - public ApiResponse Build() - { - Validate(); - return new ApiResponse( - Code: _Code, - Type: _Type, - Message: _Message - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs deleted file mode 100644 index 1bfb30abb752..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Category.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A category for a pet - /// - public sealed class Category: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Category.Builder() for instance creation instead. - /// - [Obsolete] - public Category() - { - } - - private Category(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Category. - /// - /// CategoryBuilder - public static CategoryBuilder Builder() - { - return new CategoryBuilder(); - } - - /// - /// Returns CategoryBuilder with properties set. - /// Use it to change properties. - /// - /// CategoryBuilder - public CategoryBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Category other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are equals, false otherwise - public static bool operator == (Category left, Category right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Category. - /// - /// Compared (Category - /// Compared (Category - /// true if compared items are not equals, false otherwise - public static bool operator != (Category left, Category right) - { - return !Equals(left, right); - } - - /// - /// Builder of Category. - /// - public sealed class CategoryBuilder - { - private long? _Id; - private string _Name; - - internal CategoryBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Category.Id property. - /// - /// Id - public CategoryBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Category.Name property. - /// - /// Name - public CategoryBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Category. - /// - /// Category - public Category Build() - { - Validate(); - return new Category( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs deleted file mode 100644 index 7bdec1016958..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Order.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// An order for a pets from the pet store - /// - public sealed class Order: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// PetId - /// - public long? PetId { get; private set; } - - /// - /// Quantity - /// - public int? Quantity { get; private set; } - - /// - /// ShipDate - /// - public ZonedDateTime? ShipDate { get; private set; } - - /// - /// Order Status - /// - public StatusEnum? Status { get; private set; } - - /// - /// Complete - /// - public bool? Complete { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Order.Builder() for instance creation instead. - /// - [Obsolete] - public Order() - { - } - - private Order(long? Id, long? PetId, int? Quantity, ZonedDateTime? ShipDate, StatusEnum? Status, bool? Complete) - { - - this.Id = Id; - - this.PetId = PetId; - - this.Quantity = Quantity; - - this.ShipDate = ShipDate; - - this.Status = Status; - - this.Complete = Complete; - - } - - /// - /// Returns builder of Order. - /// - /// OrderBuilder - public static OrderBuilder Builder() - { - return new OrderBuilder(); - } - - /// - /// Returns OrderBuilder with properties set. - /// Use it to change properties. - /// - /// OrderBuilder - public OrderBuilder With() - { - return Builder() - .Id(Id) - .PetId(PetId) - .Quantity(Quantity) - .ShipDate(ShipDate) - .Status(Status) - .Complete(Complete); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Order other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are equals, false otherwise - public static bool operator == (Order left, Order right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Order. - /// - /// Compared (Order - /// Compared (Order - /// true if compared items are not equals, false otherwise - public static bool operator != (Order left, Order right) - { - return !Equals(left, right); - } - - /// - /// Builder of Order. - /// - public sealed class OrderBuilder - { - private long? _Id; - private long? _PetId; - private int? _Quantity; - private ZonedDateTime? _ShipDate; - private StatusEnum? _Status; - private bool? _Complete; - - internal OrderBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - _Complete = false; - } - - /// - /// Sets value for Order.Id property. - /// - /// Id - public OrderBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Order.PetId property. - /// - /// PetId - public OrderBuilder PetId(long? value) - { - _PetId = value; - return this; - } - - /// - /// Sets value for Order.Quantity property. - /// - /// Quantity - public OrderBuilder Quantity(int? value) - { - _Quantity = value; - return this; - } - - /// - /// Sets value for Order.ShipDate property. - /// - /// ShipDate - public OrderBuilder ShipDate(ZonedDateTime? value) - { - _ShipDate = value; - return this; - } - - /// - /// Sets value for Order.Status property. - /// - /// Order Status - public OrderBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - /// - /// Sets value for Order.Complete property. - /// - /// Complete - public OrderBuilder Complete(bool? value) - { - _Complete = value; - return this; - } - - - /// - /// Builds instance of Order. - /// - /// Order - public Order Build() - { - Validate(); - return new Order( - Id: _Id, - PetId: _PetId, - Quantity: _Quantity, - ShipDate: _ShipDate, - Status: _Status, - Complete: _Complete - ); - } - - private void Validate() - { - } - } - - - public enum StatusEnum { Placed, Approved, Delivered }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs deleted file mode 100644 index a3f02e090883..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Pet.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A pet for sale in the pet store - /// - public sealed class Pet: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Category - /// - public Category Category { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - /// - /// PhotoUrls - /// - public List PhotoUrls { get; private set; } - - /// - /// Tags - /// - public List Tags { get; private set; } - - /// - /// pet status in the store - /// - public StatusEnum? Status { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Pet.Builder() for instance creation instead. - /// - [Obsolete] - public Pet() - { - } - - private Pet(long? Id, Category Category, string Name, List PhotoUrls, List Tags, StatusEnum? Status) - { - - this.Id = Id; - - this.Category = Category; - - this.Name = Name; - - this.PhotoUrls = PhotoUrls; - - this.Tags = Tags; - - this.Status = Status; - - } - - /// - /// Returns builder of Pet. - /// - /// PetBuilder - public static PetBuilder Builder() - { - return new PetBuilder(); - } - - /// - /// Returns PetBuilder with properties set. - /// Use it to change properties. - /// - /// PetBuilder - public PetBuilder With() - { - return Builder() - .Id(Id) - .Category(Category) - .Name(Name) - .PhotoUrls(PhotoUrls) - .Tags(Tags) - .Status(Status); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Pet other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are equals, false otherwise - public static bool operator == (Pet left, Pet right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Pet. - /// - /// Compared (Pet - /// Compared (Pet - /// true if compared items are not equals, false otherwise - public static bool operator != (Pet left, Pet right) - { - return !Equals(left, right); - } - - /// - /// Builder of Pet. - /// - public sealed class PetBuilder - { - private long? _Id; - private Category _Category; - private string _Name; - private List _PhotoUrls; - private List _Tags; - private StatusEnum? _Status; - - internal PetBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Pet.Id property. - /// - /// Id - public PetBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Pet.Category property. - /// - /// Category - public PetBuilder Category(Category value) - { - _Category = value; - return this; - } - - /// - /// Sets value for Pet.Name property. - /// - /// Name - public PetBuilder Name(string value) - { - _Name = value; - return this; - } - - /// - /// Sets value for Pet.PhotoUrls property. - /// - /// PhotoUrls - public PetBuilder PhotoUrls(List value) - { - _PhotoUrls = value; - return this; - } - - /// - /// Sets value for Pet.Tags property. - /// - /// Tags - public PetBuilder Tags(List value) - { - _Tags = value; - return this; - } - - /// - /// Sets value for Pet.Status property. - /// - /// pet status in the store - public PetBuilder Status(StatusEnum? value) - { - _Status = value; - return this; - } - - - /// - /// Builds instance of Pet. - /// - /// Pet - public Pet Build() - { - Validate(); - return new Pet( - Id: _Id, - Category: _Category, - Name: _Name, - PhotoUrls: _PhotoUrls, - Tags: _Tags, - Status: _Status - ); - } - - private void Validate() - { - if (_Name == null) - { - throw new ArgumentException("Name is a required property for Pet and cannot be null"); - } - if (_PhotoUrls == null) - { - throw new ArgumentException("PhotoUrls is a required property for Pet and cannot be null"); - } - } - } - - - public enum StatusEnum { Available, Pending, Sold }; - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs deleted file mode 100644 index 7ce321d25114..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/Tag.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A tag for a pet - /// - public sealed class Tag: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Name - /// - public string Name { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use Tag.Builder() for instance creation instead. - /// - [Obsolete] - public Tag() - { - } - - private Tag(long? Id, string Name) - { - - this.Id = Id; - - this.Name = Name; - - } - - /// - /// Returns builder of Tag. - /// - /// TagBuilder - public static TagBuilder Builder() - { - return new TagBuilder(); - } - - /// - /// Returns TagBuilder with properties set. - /// Use it to change properties. - /// - /// TagBuilder - public TagBuilder With() - { - return Builder() - .Id(Id) - .Name(Name); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(Tag other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are equals, false otherwise - public static bool operator == (Tag left, Tag right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (Tag. - /// - /// Compared (Tag - /// Compared (Tag - /// true if compared items are not equals, false otherwise - public static bool operator != (Tag left, Tag right) - { - return !Equals(left, right); - } - - /// - /// Builder of Tag. - /// - public sealed class TagBuilder - { - private long? _Id; - private string _Name; - - internal TagBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for Tag.Id property. - /// - /// Id - public TagBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for Tag.Name property. - /// - /// Name - public TagBuilder Name(string value) - { - _Name = value; - return this; - } - - - /// - /// Builds instance of Tag. - /// - /// Tag - public Tag Build() - { - Validate(); - return new Tag( - Id: _Id, - Name: _Name - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs deleted file mode 100644 index 04d33ca07f77..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Models/User.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Sharpility.Extensions; -using NodaTime; - -namespace Org.OpenAPITools.v2.Models -{ - /// - /// A User who is purchasing from the pet store - /// - public sealed class User: IEquatable - { - /// - /// Id - /// - public long? Id { get; private set; } - - /// - /// Username - /// - public string Username { get; private set; } - - /// - /// FirstName - /// - public string FirstName { get; private set; } - - /// - /// LastName - /// - public string LastName { get; private set; } - - /// - /// Email - /// - public string Email { get; private set; } - - /// - /// Password - /// - public string Password { get; private set; } - - /// - /// Phone - /// - public string Phone { get; private set; } - - /// - /// User Status - /// - public int? UserStatus { get; private set; } - - - /// - /// Empty constructor required by some serializers. - /// Use User.Builder() for instance creation instead. - /// - [Obsolete] - public User() - { - } - - private User(long? Id, string Username, string FirstName, string LastName, string Email, string Password, string Phone, int? UserStatus) - { - - this.Id = Id; - - this.Username = Username; - - this.FirstName = FirstName; - - this.LastName = LastName; - - this.Email = Email; - - this.Password = Password; - - this.Phone = Phone; - - this.UserStatus = UserStatus; - - } - - /// - /// Returns builder of User. - /// - /// UserBuilder - public static UserBuilder Builder() - { - return new UserBuilder(); - } - - /// - /// Returns UserBuilder with properties set. - /// Use it to change properties. - /// - /// UserBuilder - public UserBuilder With() - { - return Builder() - .Id(Id) - .Username(Username) - .FirstName(FirstName) - .LastName(LastName) - .Email(Email) - .Password(Password) - .Phone(Phone) - .UserStatus(UserStatus); - } - - public override string ToString() - { - return this.PropertiesToString(); - } - - public override bool Equals(object obj) - { - return this.EqualsByProperties(obj); - } - - public bool Equals(User other) - { - return Equals((object) other); - } - - public override int GetHashCode() - { - return this.PropertiesHash(); - } - - /// - /// Implementation of == operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are equals, false otherwise - public static bool operator == (User left, User right) - { - return Equals(left, right); - } - - /// - /// Implementation of != operator for (User. - /// - /// Compared (User - /// Compared (User - /// true if compared items are not equals, false otherwise - public static bool operator != (User left, User right) - { - return !Equals(left, right); - } - - /// - /// Builder of User. - /// - public sealed class UserBuilder - { - private long? _Id; - private string _Username; - private string _FirstName; - private string _LastName; - private string _Email; - private string _Password; - private string _Phone; - private int? _UserStatus; - - internal UserBuilder() - { - SetupDefaults(); - } - - private void SetupDefaults() - { - } - - /// - /// Sets value for User.Id property. - /// - /// Id - public UserBuilder Id(long? value) - { - _Id = value; - return this; - } - - /// - /// Sets value for User.Username property. - /// - /// Username - public UserBuilder Username(string value) - { - _Username = value; - return this; - } - - /// - /// Sets value for User.FirstName property. - /// - /// FirstName - public UserBuilder FirstName(string value) - { - _FirstName = value; - return this; - } - - /// - /// Sets value for User.LastName property. - /// - /// LastName - public UserBuilder LastName(string value) - { - _LastName = value; - return this; - } - - /// - /// Sets value for User.Email property. - /// - /// Email - public UserBuilder Email(string value) - { - _Email = value; - return this; - } - - /// - /// Sets value for User.Password property. - /// - /// Password - public UserBuilder Password(string value) - { - _Password = value; - return this; - } - - /// - /// Sets value for User.Phone property. - /// - /// Phone - public UserBuilder Phone(string value) - { - _Phone = value; - return this; - } - - /// - /// Sets value for User.UserStatus property. - /// - /// User Status - public UserBuilder UserStatus(int? value) - { - _UserStatus = value; - return this; - } - - - /// - /// Builds instance of User. - /// - /// User - public User Build() - { - Validate(); - return new User( - Id: _Id, - Username: _Username, - FirstName: _FirstName, - LastName: _LastName, - Email: _Email, - Password: _Password, - Phone: _Phone, - UserStatus: _UserStatus - ); - } - - private void Validate() - { - } - } - - - } -} \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs deleted file mode 100644 index 9cdfe6b814e6..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/PetModule.cs +++ /dev/null @@ -1,246 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools.v2.Modules -{ - /// - /// Status values that need to be considered for filter - /// - public enum FindPetsByStatusStatusEnum - { - available = 1, - pending = 2, - sold = 3 - }; - - - /// - /// Module processing requests of Pet domain. - /// - public sealed class PetModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public PetModule(PetService service) : base("/v2") - { - Post["/pet"] = parameters => - { - var pet = this.Bind(); - Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'AddPet'"); - - service.AddPet(Context, pet); - return new Response { ContentType = ""}; - }; - - Delete["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var apiKey = Parameters.ValueOf(parameters, Context.Request, "apiKey", ParameterType.Header); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'DeletePet'"); - - service.DeletePet(Context, petId, apiKey); - return new Response { ContentType = ""}; - }; - - Get["/pet/findByStatus"] = parameters => - { - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); - Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - - return service.FindPetsByStatus(Context, status).ToArray(); - }; - - Get["/pet/findByTags"] = parameters => - { - var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); - Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - - return service.FindPetsByTags(Context, tags).ToArray(); - }; - - Get["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'GetPetById'"); - - return service.GetPetById(Context, petId); - }; - - Put["/pet"] = parameters => - { - var pet = this.Bind(); - Preconditions.IsNotNull(pet, "Required parameter: 'pet' is missing at 'UpdatePet'"); - - service.UpdatePet(Context, pet); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var name = Parameters.ValueOf(parameters, Context.Request, "name", ParameterType.Undefined); - var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UpdatePetWithForm'"); - - service.UpdatePetWithForm(Context, petId, name, status); - return new Response { ContentType = ""}; - }; - - Post["/pet/{petId}/uploadImage"] = parameters => - { - var petId = Parameters.ValueOf(parameters, Context.Request, "petId", ParameterType.Path); - var additionalMetadata = Parameters.ValueOf(parameters, Context.Request, "additionalMetadata", ParameterType.Undefined); - var file = Parameters.ValueOf(parameters, Context.Request, "file", ParameterType.Undefined); - Preconditions.IsNotNull(petId, "Required parameter: 'petId' is missing at 'UploadFile'"); - - return service.UploadFile(Context, petId, additionalMetadata, file); - }; - } - } - - /// - /// Service handling Pet requests. - /// - public interface PetService - { - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - void AddPet(NancyContext context, Pet pet); - - /// - /// - /// - /// Context of request - /// Pet id to delete - /// (optional) - /// - void DeletePet(NancyContext context, long? petId, string apiKey); - - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Context of request - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status); - - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Context of request - /// Tags to filter by - /// List<Pet> - List FindPetsByTags(NancyContext context, List tags); - - /// - /// Returns a single pet - /// - /// Context of request - /// ID of pet to return - /// Pet - Pet GetPetById(NancyContext context, long? petId); - - /// - /// - /// - /// Context of request - /// Pet object that needs to be added to the store - /// - void UpdatePet(NancyContext context, Pet pet); - - /// - /// - /// - /// Context of request - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm(NancyContext context, long? petId, string name, string status); - - /// - /// - /// - /// Context of request - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file); - } - - /// - /// Abstraction of PetService. - /// - public abstract class AbstractPetService: PetService - { - public virtual void AddPet(NancyContext context, Pet pet) - { - AddPet(pet); - } - - public virtual void DeletePet(NancyContext context, long? petId, string apiKey) - { - DeletePet(petId, apiKey); - } - - public virtual List FindPetsByStatus(NancyContext context, FindPetsByStatusStatusEnum? status) - { - return FindPetsByStatus(status); - } - - public virtual List FindPetsByTags(NancyContext context, List tags) - { - return FindPetsByTags(tags); - } - - public virtual Pet GetPetById(NancyContext context, long? petId) - { - return GetPetById(petId); - } - - public virtual void UpdatePet(NancyContext context, Pet pet) - { - UpdatePet(pet); - } - - public virtual void UpdatePetWithForm(NancyContext context, long? petId, string name, string status) - { - UpdatePetWithForm(petId, name, status); - } - - public virtual ApiResponse UploadFile(NancyContext context, long? petId, string additionalMetadata, System.IO.Stream file) - { - return UploadFile(petId, additionalMetadata, file); - } - - protected abstract void AddPet(Pet pet); - - protected abstract void DeletePet(long? petId, string apiKey); - - protected abstract List FindPetsByStatus(FindPetsByStatusStatusEnum? status); - - protected abstract List FindPetsByTags(List tags); - - protected abstract Pet GetPetById(long? petId); - - protected abstract void UpdatePet(Pet pet); - - protected abstract void UpdatePetWithForm(long? petId, string name, string status); - - protected abstract ApiResponse UploadFile(long? petId, string additionalMetadata, System.IO.Stream file); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs deleted file mode 100644 index be42a7b8b520..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/StoreModule.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools.v2.Modules -{ - - /// - /// Module processing requests of Store domain. - /// - public sealed class StoreModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public StoreModule(StoreService service) : base("/v2") - { - Delete["/store/order/{orderId}"] = parameters => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'DeleteOrder'"); - - service.DeleteOrder(Context, orderId); - return new Response { ContentType = ""}; - }; - - Get["/store/inventory"] = parameters => - { - - return service.GetInventory(Context); - }; - - Get["/store/order/{orderId}"] = parameters => - { - var orderId = Parameters.ValueOf(parameters, Context.Request, "orderId", ParameterType.Path); - Preconditions.IsNotNull(orderId, "Required parameter: 'orderId' is missing at 'GetOrderById'"); - - return service.GetOrderById(Context, orderId); - }; - - Post["/store/order"] = parameters => - { - var order = this.Bind(); - Preconditions.IsNotNull(order, "Required parameter: 'order' is missing at 'PlaceOrder'"); - - return service.PlaceOrder(Context, order); - }; - } - } - - /// - /// Service handling Store requests. - /// - public interface StoreService - { - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Context of request - /// ID of the order that needs to be deleted - /// - void DeleteOrder(NancyContext context, string orderId); - - /// - /// Returns a map of status codes to quantities - /// - /// Context of request - /// Dictionary<string, int?> - Dictionary GetInventory(NancyContext context); - - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - /// - /// Context of request - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById(NancyContext context, long? orderId); - - /// - /// - /// - /// Context of request - /// order placed for purchasing the pet - /// Order - Order PlaceOrder(NancyContext context, Order order); - } - - /// - /// Abstraction of StoreService. - /// - public abstract class AbstractStoreService: StoreService - { - public virtual void DeleteOrder(NancyContext context, string orderId) - { - DeleteOrder(orderId); - } - - public virtual Dictionary GetInventory(NancyContext context) - { - return GetInventory(); - } - - public virtual Order GetOrderById(NancyContext context, long? orderId) - { - return GetOrderById(orderId); - } - - public virtual Order PlaceOrder(NancyContext context, Order order) - { - return PlaceOrder(order); - } - - protected abstract void DeleteOrder(string orderId); - - protected abstract Dictionary GetInventory(); - - protected abstract Order GetOrderById(long? orderId); - - protected abstract Order PlaceOrder(Order order); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs deleted file mode 100644 index c35bc62dae10..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Modules/UserModule.cs +++ /dev/null @@ -1,233 +0,0 @@ -using System; -using Nancy; -using Nancy.ModelBinding; -using System.Collections.Generic; -using Sharpility.Base; -using Org.OpenAPITools.v2.Models; -using Org.OpenAPITools.v2.Utils; -using NodaTime; - -namespace Org.OpenAPITools.v2.Modules -{ - - /// - /// Module processing requests of User domain. - /// - public sealed class UserModule : NancyModule - { - /// - /// Sets up HTTP methods mappings. - /// - /// Service handling requests - public UserModule(UserService service) : base("/v2") - { - Post["/user"] = parameters => - { - var user = this.Bind(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUser'"); - - service.CreateUser(Context, user); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithArray"] = parameters => - { - var user = this.Bind>(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithArrayInput'"); - - service.CreateUsersWithArrayInput(Context, user); - return new Response { ContentType = ""}; - }; - - Post["/user/createWithList"] = parameters => - { - var user = this.Bind>(); - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'CreateUsersWithListInput'"); - - service.CreateUsersWithListInput(Context, user); - return new Response { ContentType = ""}; - }; - - Delete["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'DeleteUser'"); - - service.DeleteUser(Context, username); - return new Response { ContentType = ""}; - }; - - Get["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'GetUserByName'"); - - return service.GetUserByName(Context, username); - }; - - Get["/user/login"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Query); - var password = Parameters.ValueOf(parameters, Context.Request, "password", ParameterType.Query); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'LoginUser'"); - - Preconditions.IsNotNull(password, "Required parameter: 'password' is missing at 'LoginUser'"); - - return service.LoginUser(Context, username, password); - }; - - Get["/user/logout"] = parameters => - { - - service.LogoutUser(Context); - return new Response { ContentType = ""}; - }; - - Put["/user/{username}"] = parameters => - { - var username = Parameters.ValueOf(parameters, Context.Request, "username", ParameterType.Path); - var user = this.Bind(); - Preconditions.IsNotNull(username, "Required parameter: 'username' is missing at 'UpdateUser'"); - - Preconditions.IsNotNull(user, "Required parameter: 'user' is missing at 'UpdateUser'"); - - service.UpdateUser(Context, username, user); - return new Response { ContentType = ""}; - }; - } - } - - /// - /// Service handling User requests. - /// - public interface UserService - { - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// Created user object - /// - void CreateUser(NancyContext context, User user); - - /// - /// - /// - /// Context of request - /// List of user object - /// - void CreateUsersWithArrayInput(NancyContext context, List user); - - /// - /// - /// - /// Context of request - /// List of user object - /// - void CreateUsersWithListInput(NancyContext context, List user); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// The name that needs to be deleted - /// - void DeleteUser(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName(NancyContext context, string username); - - /// - /// - /// - /// Context of request - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser(NancyContext context, string username, string password); - - /// - /// - /// - /// Context of request - /// - void LogoutUser(NancyContext context); - - /// - /// This can only be done by the logged in user. - /// - /// Context of request - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser(NancyContext context, string username, User user); - } - - /// - /// Abstraction of UserService. - /// - public abstract class AbstractUserService: UserService - { - public virtual void CreateUser(NancyContext context, User user) - { - CreateUser(user); - } - - public virtual void CreateUsersWithArrayInput(NancyContext context, List user) - { - CreateUsersWithArrayInput(user); - } - - public virtual void CreateUsersWithListInput(NancyContext context, List user) - { - CreateUsersWithListInput(user); - } - - public virtual void DeleteUser(NancyContext context, string username) - { - DeleteUser(username); - } - - public virtual User GetUserByName(NancyContext context, string username) - { - return GetUserByName(username); - } - - public virtual string LoginUser(NancyContext context, string username, string password) - { - return LoginUser(username, password); - } - - public virtual void LogoutUser(NancyContext context) - { - LogoutUser(); - } - - public virtual void UpdateUser(NancyContext context, string username, User user) - { - UpdateUser(username, user); - } - - protected abstract void CreateUser(User user); - - protected abstract void CreateUsersWithArrayInput(List user); - - protected abstract void CreateUsersWithListInput(List user); - - protected abstract void DeleteUser(string username); - - protected abstract User GetUserByName(string username); - - protected abstract string LoginUser(string username, string password); - - protected abstract void LogoutUser(); - - protected abstract void UpdateUser(string username, User user); - } - -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index 04b710b25cbd..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,66 +0,0 @@ - - - - Debug - AnyCPU - {768B8DC6-54EE-4D40-9B20-7857E1D742A4} - Library - Properties - Org.OpenAPITools.v2 - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.XML - - - - ..\..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\..\packages\NodaTime.1.3.1\lib\net35-Client\NodaTime.dll - True - - - ..\..\packages\Sharpility.1.2.2\lib\net45\Sharpility.dll - True - - - ..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - - - - - - - - - - - - - - - - diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index 102c48def9d8..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,13 +0,0 @@ - - - - Org.OpenAPITools - Org.OpenAPITools - 1.0.0 - openapi-generator - openapi-generator - false - NancyFx Org.OpenAPITools API - http://www.apache.org/licenses/LICENSE-2.0.html - - \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs deleted file mode 100644 index 9e7cfd8a8570..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/LocalDateConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Nancy.Bootstrapper; -using Nancy.Json; -using NodaTime; -using NodaTime.Text; -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.v2.Utils -{ - /// - /// (De)serializes a to a string using - /// the RFC3339 - /// full-date format. - /// - public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup - { - public override IEnumerable SupportedTypes - { - get - { - yield return typeof(LocalDate); - yield return typeof(LocalDate?); - } - } - - public void Initialize(IPipelines pipelines) - { - JsonSettings.PrimitiveConverters.Add(new LocalDateConverter()); - } - - - public override object Serialize(object obj, JavaScriptSerializer serializer) - { - if (obj is LocalDate) - { - LocalDate localDate = (LocalDate)obj; - return LocalDatePattern.IsoPattern.Format(localDate); - } - return null; - } - - public override object Deserialize(object primitiveValue, Type type, JavaScriptSerializer serializer) - { - if ((type == typeof(LocalDate) || type == typeof(LocalDate?)) && primitiveValue is string) - { - try - { - return LocalDatePattern.IsoPattern.Parse(primitiveValue as string).GetValueOrThrow(); - } - catch { } - } - return null; - } - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs deleted file mode 100644 index 9bc5408abfea..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Utils/Parameters.cs +++ /dev/null @@ -1,450 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using Nancy; -using NodaTime; -using NodaTime.Text; -using Sharpility.Base; -using Sharpility.Extensions; -using Sharpility.Util; - -namespace Org.OpenAPITools.v2.Utils -{ - internal static class Parameters - { - private static readonly IDictionary> Parsers = CreateParsers(); - - internal static TValue ValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - var valueType = typeof(TValue); - var valueUnderlyingType = Nullable.GetUnderlyingType(valueType); - var isNullable = default(TValue) == null; - string value = RawValueOf(parameters, request, name, parameterType); - Preconditions.Evaluate(!string.IsNullOrEmpty(value) || isNullable, string.Format("Required parameter: '{0}' is missing", name)); - if (value == null && isNullable) - { - return default(TValue); - } - if (valueType.IsEnum || (valueUnderlyingType != null && valueUnderlyingType.IsEnum)) - { - return EnumValueOf(name, value); - } - return ValueOf(parameters, name, value, valueType, request, parameterType); - } - - private static string RawValueOf(dynamic parameters, Request request, string name, ParameterType parameterType) - { - try - { - switch (parameterType) - { - case ParameterType.Query: - string querValue = request.Query[name]; - return querValue; - case ParameterType.Path: - string pathValue = parameters[name]; - return pathValue; - case ParameterType.Header: - var headerValue = request.Headers[name]; - return headerValue != null ? string.Join(",", headerValue) : null; - } - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not obtain value of '{0}' parameter", name), e); - } - throw new InvalidOperationException(string.Format("Parameter with type: {0} is not supported", parameterType)); - } - - private static TValue EnumValueOf(string name, string value) - { - var valueType = typeof(TValue); - var enumType = valueType.IsEnum ? valueType : Nullable.GetUnderlyingType(valueType); - Preconditions.IsNotNull(enumType, () => new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' to enum. Type {1} is not enum", name, valueType))); - var values = Enum.GetValues(enumType); - foreach (var entry in values) - { - if (entry.ToString().EqualsIgnoreCases(value) - || ((int)entry).ToString().EqualsIgnoreCases(value)) - { - return (TValue)entry; - } - } - throw new ArgumentException(string.Format("Parameter: '{0}' value: '{1}' is not supported. Expected one of: {2}", - name, value, Strings.ToString(values))); - } - - private static TValue ValueOf(dynamic parameters, string name, string value, Type valueType, Request request, ParameterType parameterType) - { - var parser = Parsers.GetIfPresent(valueType); - if (parser != null) - { - return ParseValueUsing(name, value, valueType, parser); - } - if (parameterType == ParameterType.Path) - { - return DynamicValueOf(parameters, name); - } - if (parameterType == ParameterType.Query) - { - return DynamicValueOf(request.Query, name); - } - throw new InvalidOperationException(string.Format("Could not get value for {0} with type {1}", name, valueType)); - } - - private static TValue ParseValueUsing(string name, string value, Type valueType, Func parser) - { - var result = parser(Parameter.Of(name, value)); - try - { - return (TValue)result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException( - string.Format("Could not parse parameter: '{0}' with value: '{1}'. " + - "Received: '{2}', expected: '{3}'.", - name, value, result.GetType(), valueType)); - } - } - - private static TValue DynamicValueOf(dynamic parameters, string name) - { - string value = parameters[name]; - try - { - TValue result = parameters[name]; - return result; - } - catch (InvalidCastException) - { - throw new InvalidOperationException(Strings.Format("Parameter: '{0}' value: '{1}' could not be parsed. " + - "Expected type: '{2}' is not supported", - name, value, typeof(TValue))); - } - catch (Exception e) - { - throw new InvalidOperationException(string.Format("Could not get '{0}' value of '{1}' type dynamicly", - name, typeof(TValue)), e); - } - } - - private static IDictionary> CreateParsers() - { - var parsers = ImmutableDictionary.CreateBuilder>(); - parsers.Put(typeof(string), value => value.Value); - parsers.Put(typeof(bool), SafeParse(bool.Parse)); - parsers.Put(typeof(bool?), SafeParse(bool.Parse)); - parsers.Put(typeof(byte), SafeParse(byte.Parse)); - parsers.Put(typeof(sbyte?), SafeParse(sbyte.Parse)); - parsers.Put(typeof(short), SafeParse(short.Parse)); - parsers.Put(typeof(short?), SafeParse(short.Parse)); - parsers.Put(typeof(ushort), SafeParse(ushort.Parse)); - parsers.Put(typeof(ushort?), SafeParse(ushort.Parse)); - parsers.Put(typeof(int), SafeParse(int.Parse)); - parsers.Put(typeof(int?), SafeParse(int.Parse)); - parsers.Put(typeof(uint), SafeParse(uint.Parse)); - parsers.Put(typeof(uint?), SafeParse(uint.Parse)); - parsers.Put(typeof(long), SafeParse(long.Parse)); - parsers.Put(typeof(long?), SafeParse(long.Parse)); - parsers.Put(typeof(ulong), SafeParse(ulong.Parse)); - parsers.Put(typeof(ulong?), SafeParse(ulong.Parse)); - parsers.Put(typeof(float), SafeParse(float.Parse)); - parsers.Put(typeof(float?), SafeParse(float.Parse)); - parsers.Put(typeof(double), SafeParse(double.Parse)); - parsers.Put(typeof(double?), SafeParse(double.Parse)); - parsers.Put(typeof(decimal), SafeParse(decimal.Parse)); - parsers.Put(typeof(decimal?), SafeParse(decimal.Parse)); - parsers.Put(typeof(DateTime), SafeParse(DateTime.Parse)); - parsers.Put(typeof(DateTime?), SafeParse(DateTime.Parse)); - parsers.Put(typeof(TimeSpan), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(TimeSpan?), SafeParse(TimeSpan.Parse)); - parsers.Put(typeof(ZonedDateTime), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(ZonedDateTime?), SafeParse(ParseZonedDateTime)); - parsers.Put(typeof(LocalDate), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalDate?), SafeParse(ParseLocalDate)); - parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); - parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); - parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); - parsers.Put(typeof(IList), ImmutableListParse(value => value)); - parsers.Put(typeof(List), ListParse(value => value)); - parsers.Put(typeof(ISet), ImmutableListParse(value => value)); - parsers.Put(typeof(HashSet), SetParse(value => value)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), NullableListParse(bool.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(byte.Parse)); - parsers.Put(typeof(List), ListParse(byte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); - parsers.Put(typeof(HashSet), SetParse(byte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); - parsers.Put(typeof(List), ListParse(sbyte.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(sbyte.Parse)); - parsers.Put(typeof(HashSet), SetParse(sbyte.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(short.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(short.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(short.Parse)); - parsers.Put(typeof(List), ListParse(short.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); - parsers.Put(typeof(HashSet), SetParse(short.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); - parsers.Put(typeof(List), ListParse(ushort.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); - parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); - parsers.Put(typeof(List), NullableListParse(int.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); - parsers.Put(typeof(List), ListParse(uint.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); - parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); - parsers.Put(typeof(List), NullableListParse(long.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); - parsers.Put(typeof(List), ListParse(ulong.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); - parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); - parsers.Put(typeof(List), NullableListParse(float.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); - parsers.Put(typeof(List), NullableListParse(double.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), NullableListParse(decimal.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); - - parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(TimeSpan.Parse)); - parsers.Put(typeof(List), ListParse(TimeSpan.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(TimeSpan.Parse)); - parsers.Put(typeof(HashSet), SetParse(TimeSpan.Parse)); - - return parsers.ToImmutableDictionary(); - } - - private static Func SafeParse(Func parse) - { - return parameter => - { - try - { - return parse(parameter.Value); - } - catch (OverflowException) - { - throw ParameterOutOfRange(parameter, typeof(T)); - } - catch (FormatException) - { - throw InvalidParameterFormat(parameter, typeof(T)); - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse parameter: '{0}' with value: '{1}' to {2}", - parameter.Name, parameter.Value, typeof(T)), e); - } - }; - } - - private static Func NullableListParse(Func itemParser) where T: struct - { - return ListParse(it => it.ToNullable(itemParser)); - } - - private static Func ListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new List(); - } - return ParseCollection(parameter.Value, itemParser).ToList(); - }; - } - - private static Func NullableImmutableListParse(Func itemParser) where T: struct - { - return ImmutableListParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableListParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Lists.EmptyList(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableList(); - }; - } - - private static Func NullableSetParse(Func itemParser) where T: struct - { - return SetParse(it => it.ToNullable(itemParser)); - } - - private static Func SetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return new HashSet(); - } - return ParseCollection(parameter.Value, itemParser).ToSet(); - }; - } - - private static Func NullableImmutableSetParse(Func itemParser) where T: struct - { - return ImmutableSetParse(it => it.ToNullable(itemParser)); - } - - private static Func ImmutableSetParse(Func itemParser) - { - return parameter => - { - if (string.IsNullOrEmpty(parameter.Value)) - { - return Sets.EmptySet(); - } - return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); - }; - } - - private static ZonedDateTime ParseZonedDateTime(string value) - { - var dateTime = DateTime.Parse(value); - return new ZonedDateTime(Instant.FromDateTimeUtc(dateTime.ToUniversalTime()), DateTimeZone.Utc); - } - - private static LocalDate ParseLocalDate(string value) - { - return LocalDatePattern.IsoPattern.Parse(value).Value; - } - - private static LocalTime ParseLocalTime(string value) - { - return LocalTimePattern.ExtendedIsoPattern.Parse(value).Value; - } - - private static ArgumentException ParameterOutOfRange(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query: '{0}' value: '{1}' is out of range for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static ArgumentException InvalidParameterFormat(Parameter parameter, Type type) - { - return new ArgumentException(Strings.Format("Query '{0}' value: '{1}' format is invalid for: '{2}'", - parameter.Name, parameter.Value, type)); - } - - private static IEnumerable ParseCollection(string value, Func itemParser) - { - var results = value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser); - return results; - } - - public static T? ToNullable(this string s, Func itemParser) where T : struct - { - T? result = new T?(); - try - { - if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) - { - result = itemParser(s); - } - } - catch (Exception e) - { - throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); - } - return result; - } - - private class Parameter - { - internal string Name { get; private set; } - internal string Value { get; private set; } - - private Parameter(string name, string value) - { - Name = name; - Value = value; - } - - internal static Parameter Of(string name, string value) - { - return new Parameter(name, value); - } - } - } - - internal enum ParameterType - { - Undefined, - Query, - Path, - Header - } -} diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config deleted file mode 100644 index e3401566e5d2..000000000000 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml index 877989080caf..8a31b8d5b865 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml +++ b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml @@ -1,25 +1,29 @@ openapi: 3.0.1 info: + title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: addPet + put: + tags: + - pet + summary: Update an existing pet + operationId: updatePet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -27,23 +31,29 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} 405: + description: Validation exception content: {} - description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Add a new pet to the store + x-openapi-router-controller: Pet + post: tags: - pet - x-swagger-router-controller: Pet - put: - operationId: updatePet + summary: Add a new pet to the store + operationId: addPet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -51,152 +61,118 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Pet not found 405: + description: Invalid input content: {} - description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + explode: false schema: + type: array items: + type: string default: available enum: - available - pending - sold - type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: content: {} - description: Invalid pet value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Deletes a pet + x-openapi-router-controller: Pet + /pet/{petId}: + get: tags: - pet - x-swagger-router-controller: Pet - get: + summary: Find pet by ID description: Returns a single pet operationId: getPetById parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -204,122 +180,148 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Pet not found + content: {} security: - api_key: [] - summary: Find pet by ID + x-openapi-router-controller: Pet + post: tags: - pet - x-swagger-router-controller: Pet - post: + summary: Updates a pet in the store with form data operationId: updatePetWithForm parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - description: Updated name of the pet type: string + description: Updated name of the pet status: - description: Updated status of the pet type: string + description: Updated status of the pet responses: 405: - content: {} description: Invalid input + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + x-openapi-router-controller: Pet + delete: tags: - pet - x-swagger-router-controller: Pet + summary: Deletes a pet + operationId: deletePet + parameters: + - name: api_key + in: header + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid pet value + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + x-openapi-router-controller: Pet /pet/{petId}/uploadImage: post: + tags: + - pet + summary: uploads an image operationId: uploadFile parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - description: Additional data to pass to server type: string + description: Additional data to pass to server file: + type: string description: file to upload format: binary - type: string responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-swagger-router-controller: Store + x-openapi-router-controller: Store /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: placeOrder requestBody: + description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -327,51 +329,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-swagger-router-controller: Store - /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: orderId - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: content: {} - description: Order not found - summary: Delete purchase order by ID + x-openapi-router-controller: Store + /store/order/{orderId}: + get: tags: - store - x-swagger-router-controller: Store - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - description: ID of pet that needs to be fetched + - name: orderId in: path - name: orderId + description: ID of pet that needs to be fetched required: true schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -379,164 +360,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Order not found - summary: Find purchase order by ID + content: {} + x-openapi-router-controller: Store + delete: tags: - store - x-swagger-router-controller: Store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Order not found + content: {} + x-openapi-router-controller: Store /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: + description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/login: get: + tags: + - user + summary: Logs user into the system operationId: loginUser parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - format: int32 type: integer + format: int32 X-Expires-After: description: date in UTC when toekn expires schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logoutUser responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-swagger-router-controller: User - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: content: {} - description: User not found - summary: Delete user + x-openapi-router-controller: User + /user/{username}: + get: tags: - user - x-swagger-router-controller: User - get: + summary: Get user by user name operationId: getUserByName parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -544,113 +525,122 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied - 404: content: {} + 404: description: User not found - summary: Get user by user name + content: {} + x-openapi-router-controller: User + put: tags: - user - x-swagger-router-controller: User - put: + summary: Updated user description: This can only be done by the logged in user. operationId: updateUser parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true schema: type: string requestBody: + description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied - 404: content: {} + 404: description: User not found - summary: Updated user + content: {} + x-openapi-router-controller: User + delete: tags: - user - x-swagger-router-controller: User + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid username supplied + content: {} + 404: + description: User not found + content: {} + x-openapi-router-controller: User components: schemas: Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + title: Pet Order + type: object properties: id: - format: int64 type: integer - petId: format: int64 + petId: type: integer + format: int64 quantity: - format: int32 type: integer + format: int32 shipDate: - format: date-time type: string + format: date-time status: + type: string description: Order Status enum: - placed - approved - delivered - type: string complete: - default: false type: boolean - title: Pet Order - type: object + default: false + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed xml: name: Order Category: - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 xml: name: Category User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + title: a User + type: object properties: id: - format: int64 type: integer + format: int64 username: type: string firstName: @@ -664,108 +654,116 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User Tag: - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 xml: name: Tag Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + title: a Pet + required: + - name + - photoUrls + type: object properties: id: - format: int64 type: integer + format: int64 category: $ref: '#/components/schemas/Category' name: - example: doggie type: string + example: doggie photoUrls: - items: - type: string type: array xml: name: photoUrl wrapped: true - tags: items: - $ref: '#/components/schemas/Tag' + type: string + tags: type: array xml: name: tag wrapped: true + items: + $ref: '#/components/schemas/Tag' status: + type: string description: pet status in the store enum: - available - pending - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available xml: name: Pet ApiResponse: - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object properties: code: - format: int32 type: integer + format: int32 type: type: string message: type: string - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header diff --git a/samples/server/petstore/nodejs/.openapi-generator/VERSION b/samples/server/petstore/nodejs/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/nodejs/.openapi-generator/VERSION +++ b/samples/server/petstore/nodejs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs/api/openapi.yaml b/samples/server/petstore/nodejs/api/openapi.yaml index 877989080caf..8a31b8d5b865 100644 --- a/samples/server/petstore/nodejs/api/openapi.yaml +++ b/samples/server/petstore/nodejs/api/openapi.yaml @@ -1,25 +1,29 @@ openapi: 3.0.1 info: + title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: addPet + put: + tags: + - pet + summary: Update an existing pet + operationId: updatePet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -27,23 +31,29 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} 405: + description: Validation exception content: {} - description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Add a new pet to the store + x-openapi-router-controller: Pet + post: tags: - pet - x-swagger-router-controller: Pet - put: - operationId: updatePet + summary: Add a new pet to the store + operationId: addPet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -51,152 +61,118 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Pet not found 405: + description: Invalid input content: {} - description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + explode: false schema: + type: array items: + type: string default: available enum: - available - pending - sold - type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: content: {} - description: Invalid pet value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Deletes a pet + x-openapi-router-controller: Pet + /pet/{petId}: + get: tags: - pet - x-swagger-router-controller: Pet - get: + summary: Find pet by ID description: Returns a single pet operationId: getPetById parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -204,122 +180,148 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Pet not found + content: {} security: - api_key: [] - summary: Find pet by ID + x-openapi-router-controller: Pet + post: tags: - pet - x-swagger-router-controller: Pet - post: + summary: Updates a pet in the store with form data operationId: updatePetWithForm parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - description: Updated name of the pet type: string + description: Updated name of the pet status: - description: Updated status of the pet type: string + description: Updated status of the pet responses: 405: - content: {} description: Invalid input + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + x-openapi-router-controller: Pet + delete: tags: - pet - x-swagger-router-controller: Pet + summary: Deletes a pet + operationId: deletePet + parameters: + - name: api_key + in: header + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid pet value + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + x-openapi-router-controller: Pet /pet/{petId}/uploadImage: post: + tags: + - pet + summary: uploads an image operationId: uploadFile parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - description: Additional data to pass to server type: string + description: Additional data to pass to server file: + type: string description: file to upload format: binary - type: string responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet - x-swagger-router-controller: Pet + x-openapi-router-controller: Pet /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-swagger-router-controller: Store + x-openapi-router-controller: Store /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: placeOrder requestBody: + description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -327,51 +329,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-swagger-router-controller: Store - /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: orderId - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: content: {} - description: Order not found - summary: Delete purchase order by ID + x-openapi-router-controller: Store + /store/order/{orderId}: + get: tags: - store - x-swagger-router-controller: Store - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - description: ID of pet that needs to be fetched + - name: orderId in: path - name: orderId + description: ID of pet that needs to be fetched required: true schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -379,164 +360,164 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Order not found - summary: Find purchase order by ID + content: {} + x-openapi-router-controller: Store + delete: tags: - store - x-swagger-router-controller: Store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Order not found + content: {} + x-openapi-router-controller: Store /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: + description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/login: get: + tags: + - user + summary: Logs user into the system operationId: loginUser parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - format: int32 type: integer + format: int32 X-Expires-After: description: date in UTC when toekn expires schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-swagger-router-controller: User + content: {} + x-openapi-router-controller: User /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logoutUser responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-swagger-router-controller: User - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: content: {} - description: User not found - summary: Delete user + x-openapi-router-controller: User + /user/{username}: + get: tags: - user - x-swagger-router-controller: User - get: + summary: Get user by user name operationId: getUserByName parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -544,113 +525,122 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied - 404: content: {} + 404: description: User not found - summary: Get user by user name + content: {} + x-openapi-router-controller: User + put: tags: - user - x-swagger-router-controller: User - put: + summary: Updated user description: This can only be done by the logged in user. operationId: updateUser parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true schema: type: string requestBody: + description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied - 404: content: {} + 404: description: User not found - summary: Updated user + content: {} + x-openapi-router-controller: User + delete: tags: - user - x-swagger-router-controller: User + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid username supplied + content: {} + 404: + description: User not found + content: {} + x-openapi-router-controller: User components: schemas: Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + title: Pet Order + type: object properties: id: - format: int64 type: integer - petId: format: int64 + petId: type: integer + format: int64 quantity: - format: int32 type: integer + format: int32 shipDate: - format: date-time type: string + format: date-time status: + type: string description: Order Status enum: - placed - approved - delivered - type: string complete: - default: false type: boolean - title: Pet Order - type: object + default: false + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed xml: name: Order Category: - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 xml: name: Category User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + title: a User + type: object properties: id: - format: int64 type: integer + format: int64 username: type: string firstName: @@ -664,108 +654,116 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User Tag: - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 xml: name: Tag Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + title: a Pet + required: + - name + - photoUrls + type: object properties: id: - format: int64 type: integer + format: int64 category: $ref: '#/components/schemas/Category' name: - example: doggie type: string + example: doggie photoUrls: - items: - type: string type: array xml: name: photoUrl wrapped: true - tags: items: - $ref: '#/components/schemas/Tag' + type: string + tags: type: array xml: name: tag wrapped: true + items: + $ref: '#/components/schemas/Tag' status: + type: string description: pet status in the store enum: - available - pending - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available xml: name: Pet ApiResponse: - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object properties: code: - format: int32 type: integer + format: int32 type: type: string message: type: string - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-silex/.openapi-generator/VERSION b/samples/server/petstore/php-silex/.openapi-generator/VERSION index 82602aa4190d..1c00c5181548 100644 --- a/samples/server/petstore/php-silex/.openapi-generator/VERSION +++ b/samples/server/petstore/php-silex/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim/.openapi-generator/VERSION b/samples/server/petstore/php-slim/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/php-slim/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-slim/composer.lock b/samples/server/petstore/php-slim/composer.lock deleted file mode 100644 index c31fb841c9b8..000000000000 --- a/samples/server/petstore/php-slim/composer.lock +++ /dev/null @@ -1,315 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "913417690829da41975a473b88f30f64", - "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "nikic/fast-route", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "time": "2018-02-13T20:26:39+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.2.3", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2018-01-21T07:42:36+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "slim/slim", - "version": "3.10.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "nikic/fast-route": "^1.0", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", - "psr/container": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "time": "2018-04-19T19:29:08+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "RC", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/samples/server/petstore/php-symfony/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/php-symfony/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/rails5/.openapi-generator/VERSION b/samples/server/petstore/rails5/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/rails5/.openapi-generator/VERSION +++ b/samples/server/petstore/rails5/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rails5/vendor/.keep b/samples/server/petstore/rails5/vendor/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/samples/server/petstore/rust-server/.openapi-generator/VERSION b/samples/server/petstore/rust-server/.openapi-generator/VERSION index 82602aa4190d..ad121e8340e0 100644 --- a/samples/server/petstore/rust-server/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION index 82602aa4190d..f9f7450d1359 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +2.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/README.md b/samples/server/petstore/scala-lagom-server/README.md index e80ddccb7e17..938d7331cb7d 100644 --- a/samples/server/petstore/scala-lagom-server/README.md +++ b/samples/server/petstore/scala-lagom-server/README.md @@ -1,9 +1,9 @@ -# OpenAPI generated scala-lagomApi +# Swagger generated scala-lagomApi ## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the -[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This -is an example of building a OpenAPI-enabled lagon-api. +This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the +[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This +is an example of building a swagger-enabled lagon-api. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. diff --git a/samples/server/petstore/scala-lagom-server/build.sbt b/samples/server/petstore/scala-lagom-server/build.sbt index b6ab43cf17b3..ea9dd5789f03 100644 --- a/samples/server/petstore/scala-lagom-server/build.sbt +++ b/samples/server/petstore/scala-lagom-server/build.sbt @@ -2,7 +2,7 @@ version := "1.0.0" name := "scala-lagom-server" -organization := "org.openapitools" +organization := "io.swagger" scalaVersion := "2.11.8" diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index fea6ba05311d..6ee03b22acac 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index a5b3b3dd8b30..ff42a995e9ae 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala index c78d28fc86dd..b62b48d87504 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -75,7 +75,7 @@ trait UserApi extends Service { * Get user by user name * * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName(username: String): ServiceCall[NotUsed ,User] diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala index 38f3bd8aa3d1..884853e5c25b 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -15,7 +15,7 @@ import play.api.libs.json._ case class ApiResponse ( code: Option[Int], - `type`: Option[String], + _type: Option[String], message: Option[String] ) diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala index 5b058bb51d67..c50c6e71c64d 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala index a40c7585cfa0..c79ffb780e54 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala index 59c9446ee779..acc6c25afc38 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala index 0155bfed72c8..65aa9c628bcd 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala index 75a835cb7944..b21cd2e7e770 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala @@ -1,12 +1,12 @@ /** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 - * + * Contact: apiteam@swagger.io * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/samples/server/petstore/scalatra/.openapi-generator/VERSION b/samples/server/petstore/scalatra/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/scalatra/.openapi-generator/VERSION +++ b/samples/server/petstore/scalatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/.openapi-generator/VERSION b/samples/server/petstore/sinatra/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/sinatra/openapi.yaml b/samples/server/petstore/sinatra/openapi.yaml index c0b60f85ddeb..01e572ba924f 100644 --- a/samples/server/petstore/sinatra/openapi.yaml +++ b/samples/server/petstore/sinatra/openapi.yaml @@ -1,25 +1,29 @@ openapi: 3.0.1 info: + title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user +- name: pet + description: Everything about your Pets +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user paths: /pet: - post: - operationId: addPet + put: + tags: + - pet + summary: Update an existing pet + operationId: updatePet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -27,22 +31,28 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} 405: + description: Validation exception content: {} - description: Invalid input security: - petstore_auth: - write:pets - read:pets - summary: Add a new pet to the store + post: tags: - pet - put: - operationId: updatePet + summary: Add a new pet to the store + operationId: addPet requestBody: + description: Pet object that needs to be added to the store content: application/json: schema: @@ -50,148 +60,115 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store required: true responses: - 400: - content: {} - description: Invalid ID supplied - 404: - content: {} - description: Pet not found 405: + description: Invalid input content: {} - description: Validation exception security: - petstore_auth: - write:pets - read:pets - summary: Update an existing pet - tags: - - pet /pet/findByStatus: get: + tags: + - pet + summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter - explode: false + - name: status in: query - name: status + description: Status values that need to be considered for filter required: true + explode: false schema: + type: array items: + type: string default: available enum: - available - pending - sold - type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid status value + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Finds Pets by status - tags: - - pet /pet/findByTags: get: - deprecated: true + tags: + - pet + summary: Finds Pets by tags description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - description: Tags to filter by - explode: false + - name: tags in: query - name: tags + description: Tags to filter by required: true + explode: false schema: + type: array items: type: string - type: array - style: form responses: 200: + description: successful operation content: application/xml: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array application/json: schema: + type: array items: $ref: '#/components/schemas/Pet' - type: array - description: successful operation 400: - content: {} description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - 400: content: {} - description: Invalid pet value + deprecated: true security: - petstore_auth: - write:pets - read:pets - summary: Deletes a pet + /pet/{petId}: + get: tags: - pet - get: + summary: Find pet by ID description: Returns a single pet operationId: getPetById parameters: - - description: ID of pet to return + - name: petId in: path - name: petId + description: ID of pet to return required: true schema: - format: int64 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -199,118 +176,143 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Pet not found + content: {} security: - api_key: [] - summary: Find pet by ID + post: tags: - pet - post: + summary: Updates a pet in the store with form data operationId: updatePetWithForm parameters: - - description: ID of pet that needs to be updated + - name: petId in: path - name: petId + description: ID of pet that needs to be updated required: true schema: - format: int64 type: integer + format: int64 requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - description: Updated name of the pet type: string + description: Updated name of the pet status: - description: Updated status of the pet type: string + description: Updated status of the pet responses: 405: - content: {} description: Invalid input + content: {} security: - petstore_auth: - write:pets - read:pets - summary: Updates a pet in the store with form data + delete: tags: - pet + summary: Deletes a pet + operationId: deletePet + parameters: + - name: api_key + in: header + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid pet value + content: {} + security: + - petstore_auth: + - write:pets + - read:pets /pet/{petId}/uploadImage: post: + tags: + - pet + summary: uploads an image operationId: uploadFile parameters: - - description: ID of pet to update + - name: petId in: path - name: petId + description: ID of pet to update required: true schema: - format: int64 type: integer + format: int64 requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - description: Additional data to pass to server type: string + description: Additional data to pass to server file: + type: string description: file to upload format: binary - type: string responses: 200: + description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - description: successful operation security: - petstore_auth: - write:pets - read:pets - summary: uploads an image - tags: - - pet /store/inventory: get: + tags: + - store + summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: + description: successful operation content: application/json: schema: + type: object additionalProperties: - format: int32 type: integer - type: object - description: successful operation + format: int32 security: - api_key: [] - summary: Returns pet inventories by status - tags: - - store /store/order: post: + tags: + - store + summary: Place an order for a pet operationId: placeOrder requestBody: + description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet required: true responses: 200: + description: successful operation content: application/xml: schema: @@ -318,49 +320,29 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid Order - summary: Place an order for a pet - tags: - - store - /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: orderId - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid ID supplied - 404: content: {} - description: Order not found - summary: Delete purchase order by ID + /store/order/{orderId}: + get: tags: - store - get: + summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - description: ID of pet that needs to be fetched + - name: orderId in: path - name: orderId + description: ID of pet that needs to be fetched required: true schema: - format: int64 maximum: 5 minimum: 1 type: integer + format: int64 responses: 200: + description: successful operation content: application/xml: schema: @@ -368,157 +350,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' - description: successful operation 400: - content: {} description: Invalid ID supplied - 404: content: {} + 404: description: Order not found - summary: Find purchase order by ID + content: {} + delete: tags: - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Order not found + content: {} /user: post: + tags: + - user + summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: + description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Created user object required: true responses: default: - content: {} description: successful operation - summary: Create user - tags: - - user + content: {} /user/createWithArray: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user + content: {} /user/createWithList: post: + tags: + - user + summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: + description: List of user object content: '*/*': schema: + type: array items: $ref: '#/components/schemas/User' - type: array - description: List of user object required: true responses: default: - content: {} description: successful operation - summary: Creates list of users with given input array - tags: - - user + content: {} /user/login: get: + tags: + - user + summary: Logs user into the system operationId: loginUser parameters: - - description: The user name for login + - name: username in: query - name: username + description: The user name for login required: true schema: type: string - - description: The password for login in clear text + - name: password in: query - name: password + description: The password for login in clear text required: true schema: type: string responses: 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - format: int32 type: integer + format: int32 X-Expires-After: description: date in UTC when toekn expires schema: + type: string format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: type: string 400: - content: {} description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user + content: {} /user/logout: get: + tags: + - user + summary: Logs out current logged in user session operationId: logoutUser responses: default: - content: {} description: successful operation - summary: Logs out current logged in user session - tags: - - user - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - 400: - content: {} - description: Invalid username supplied - 404: content: {} - description: User not found - summary: Delete user + /user/{username}: + get: tags: - user - get: + summary: Get user by user name operationId: getUserByName parameters: - - description: The name that needs to be fetched. Use user1 for testing. + - name: username in: path - name: username + description: The name that needs to be fetched. Use user1 for testing. required: true schema: type: string responses: 200: + description: successful operation content: application/xml: schema: @@ -526,111 +508,119 @@ paths: application/json: schema: $ref: '#/components/schemas/User' - description: successful operation 400: - content: {} description: Invalid username supplied - 404: content: {} + 404: description: User not found - summary: Get user by user name + content: {} + put: tags: - user - put: + summary: Updated user description: This can only be done by the logged in user. operationId: updateUser parameters: - - description: name that need to be deleted + - name: username in: path - name: username + description: name that need to be deleted required: true schema: type: string requestBody: + description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' - description: Updated user object required: true responses: 400: - content: {} description: Invalid user supplied - 404: content: {} + 404: description: User not found - summary: Updated user + content: {} + delete: tags: - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid username supplied + content: {} + 404: + description: User not found + content: {} components: schemas: Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + title: Pet Order + type: object properties: id: - format: int64 type: integer - petId: format: int64 + petId: type: integer + format: int64 quantity: - format: int32 type: integer + format: int32 shipDate: - format: date-time type: string + format: date-time status: + type: string description: Order Status enum: - placed - approved - delivered - type: string complete: - default: false type: boolean - title: Pet Order - type: object + default: false + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed xml: name: Order Category: - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 xml: name: Category User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + title: a User + type: object properties: id: - format: int64 type: integer + format: int64 username: type: string firstName: @@ -644,108 +634,116 @@ components: phone: type: string userStatus: + type: integer description: User Status format: int32 - type: integer - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username xml: name: User Tag: - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object properties: id: - format: int64 type: integer + format: int64 name: type: string - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 xml: name: Tag Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + title: a Pet + required: + - name + - photoUrls + type: object properties: id: - format: int64 type: integer + format: int64 category: $ref: '#/components/schemas/Category' name: - example: doggie type: string + example: doggie photoUrls: - items: - type: string type: array xml: name: photoUrl wrapped: true - tags: items: - $ref: '#/components/schemas/Tag' + type: string + tags: type: array xml: name: tag wrapped: true + items: + $ref: '#/components/schemas/Tag' status: + type: string description: pet status in the store enum: - available - pending - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available xml: name: Pet ApiResponse: - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object properties: code: - format: int32 type: integer + format: int32 type: type: string message: type: string - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message securitySchemes: petstore_auth: + type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets - type: oauth2 api_key: - in: header - name: api_key type: apiKey + name: api_key + in: header diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 018ec6b31167..8d44bcf2846a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index fccd5b762e5a..bba644174ee9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ffc52ee082a8..2e907cc8bf5a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 5dce9e545eec..3ea94df7e7d1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index b3ca47c6f83f..182c324db240 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 08f87ef96585..5ad00b0a39fa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2d6e46d733..852959ae715d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index a88e32d6cf40..d3ab34cc3630 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b98ac904a92d..6ec203e9150e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 502a38e03aa3..624d94b7e43c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 7c2302a18de0..7abe1703b576 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 6ea4b10cea83..b94918273090 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 481e407e2600..26bcbf2a4992 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 71dea109bbbc..10001f1bc616 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d5594fd61c5..237fdee71909 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 9b112101f5aa..f57676904153 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 937f19ffcebe..1e06ac54251b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 971fb6286a26..da06dff545cf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 481e407e2600..26bcbf2a4992 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 71dea109bbbc..10001f1bc616 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d5594fd61c5..237fdee71909 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 9b112101f5aa..f57676904153 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 937f19ffcebe..1e06ac54251b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 971fb6286a26..da06dff545cf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index b7c97b058e23..21fc02c5169a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 58d374983119..33ad8fb5dfc5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e29cbe9af76b..0d582b334273 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 1dca218c458a..1fdcb95ddd03 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 47828f511380..73d75a8b1ce9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index d9a9950856b4..c1fc26fd8b4c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 481e407e2600..26bcbf2a4992 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 71dea109bbbc..10001f1bc616 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d5594fd61c5..237fdee71909 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 9b112101f5aa..f57676904153 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 937f19ffcebe..1e06ac54251b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 971fb6286a26..da06dff545cf 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 37de57e42628..62dfcfa2fe3d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index adb3b874c039..ac59568e1bf4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 03ee8b6e7bd4..d9f4c692cf91 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 2d3dfde1feef..6a1985bdf8e4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index b4f08f7c6006..757fcfc2830a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 38c6fe1250f2..5199064cb7e0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 65f258ae85bf..25c9c8c43c78 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 3aae8bea82a8..1ca1d5289745 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b50b7f1b88d0..6f2367b13191 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index f5059969c3c9..13c2117e558b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index dd9dabe662a1..208168a8e73f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index a269ee888cfb..33f906af290a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2d6e46d733..852959ae715d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index efe8b6a49fdd..f452c18377ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b98ac904a92d..6ec203e9150e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index d3e8075b2a9d..d30446f411ac 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 7c2302a18de0..7abe1703b576 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 6ea4b10cea83..b94918273090 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 82602aa4190d..282895a8f8f1 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2d6e46d733..852959ae715d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index f184edac3871..8620fbf7fe55 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b98ac904a92d..6ec203e9150e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 502a38e03aa3..624d94b7e43c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 7c2302a18de0..7abe1703b576 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 6ea4b10cea83..b94918273090 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/undertow/.openapi-generator/VERSION b/samples/server/petstore/undertow/.openapi-generator/VERSION index 82602aa4190d..096bf47efe31 100644 --- a/samples/server/petstore/undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/undertow/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/undertow/src/main/resources/config/openapi.json b/samples/server/petstore/undertow/src/main/resources/config/openapi.json index ee18d3bd6b6b..d72aeb9f185a 100644 --- a/samples/server/petstore/undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/undertow/src/main/resources/config/openapi.json @@ -108,7 +108,6 @@ "in" : "query", "description" : "Status values that need to be considered for filter", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", @@ -163,7 +162,6 @@ "in" : "query", "description" : "Tags to filter by", "required" : true, - "style" : "form", "explode" : false, "schema" : { "type" : "array", From 13fd8269fe8d42224f41c7b8027c6211b8fe9ca4 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 17:49:40 -0700 Subject: [PATCH 12/18] update samples --- samples/client/petstore/clojure/pom.xml | 32 + .../Pods/Alamofire/README.md | 1297 +++++++++++++ .../Pods/Alamofire/Source/Alamofire.swift | 369 ++++ .../Pods/Alamofire/Source/Download.swift | 248 +++ .../Pods/Alamofire/Source/Manager.swift | 779 ++++++++ .../Alamofire/Source/MultipartFormData.swift | 659 +++++++ .../Source/NetworkReachabilityManager.swift | 244 +++ .../Pods/Alamofire/Source/Notifications.swift | 47 + .../Alamofire/Source/ParameterEncoding.swift | 261 +++ .../Pods/Alamofire/Source/Request.swift | 568 ++++++ .../Pods/Alamofire/Source/Response.swift | 97 + .../Source/ResponseSerialization.swift | 378 ++++ .../Pods/Alamofire/Source/Result.swift | 103 + .../Alamofire/Source/ServerTrustPolicy.swift | 304 +++ .../Pods/Alamofire/Source/Stream.swift | 182 ++ .../Pods/Alamofire/Source/Timeline.swift | 138 ++ .../Pods/Alamofire/Source/Upload.swift | 376 ++++ .../Pods/Alamofire/Source/Validation.swift | 214 +++ .../PetstoreClient.podspec.json | 25 + .../SwaggerClientTests/Pods/Manifest.lock | 41 + .../Pods/Pods.xcodeproj/project.pbxproj | 1662 +++++++++++++++++ .../Alamofire/Alamofire-umbrella.h | 8 + .../Target Support Files/Alamofire/Info.plist | 26 + .../OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h | 11 + .../PetstoreClient/PetstoreClient-umbrella.h | 8 + ...ds-SwaggerClient-acknowledgements.markdown | 11 + .../Pods-SwaggerClient-acknowledgements.plist | 49 + .../Pods-SwaggerClient-resources.sh | 96 + .../Pods-SwaggerClient-umbrella.h | 8 + .../Pods-SwaggerClient.debug.xcconfig | 12 + .../Pods-SwaggerClient.release.xcconfig | 12 + .../Pods-SwaggerClientTests-resources.sh | 96 + .../Pods-SwaggerClientTests-umbrella.h | 8 + .../Pods-SwaggerClientTests.debug.xcconfig | 8 + .../Pods-SwaggerClientTests.release.xcconfig | 8 + .../default/SwaggerClientTests/Podfile.lock | 19 + .../SwaggerClientTests/Podfile.lock | 22 + .../rxswift/SwaggerClientTests/Podfile.lock | 22 + .../petstore-security-test/slim/composer.lock | 315 ++++ .../server/petstore/php-slim/composer.lock | 315 ++++ samples/server/petstore/rails5/vendor/.keep | 0 41 files changed, 9078 insertions(+) create mode 100644 samples/client/petstore/clojure/pom.xml create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist create mode 100755 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig create mode 100755 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig create mode 100644 samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig create mode 100644 samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock create mode 100644 samples/server/petstore-security-test/slim/composer.lock create mode 100644 samples/server/petstore/php-slim/composer.lock create mode 100644 samples/server/petstore/rails5/vendor/.keep diff --git a/samples/client/petstore/clojure/pom.xml b/samples/client/petstore/clojure/pom.xml new file mode 100644 index 000000000000..99466e226910 --- /dev/null +++ b/samples/client/petstore/clojure/pom.xml @@ -0,0 +1,32 @@ + + 4.0.0 + org.openapitools + openapi-petstore-clojure + pom + 1.0-SNAPSHOT + OpenAPI Clogure Petstore Client + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + lein-test + integration-test + + exec + + + lein + + test + + + + + + + + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md new file mode 100644 index 000000000000..e0acf722db1d --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/README.md @@ -0,0 +1,1297 @@ +![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) + +[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg)](https://travis-ci.org/Alamofire/Alamofire) +[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire) +[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) + +Alamofire is an HTTP networking library written in Swift. + +## Features + +- [x] Chainable Request / Response methods +- [x] URL / JSON / plist Parameter Encoding +- [x] Upload File / Data / Stream / MultipartFormData +- [x] Download using Request or Resume data +- [x] Authentication with NSURLCredential +- [x] HTTP Response Validation +- [x] TLS Certificate and Public Key Pinning +- [x] Progress Closure & NSProgress +- [x] cURL Debug Output +- [x] Comprehensive Unit Test Coverage +- [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) + +## Component Libraries + +In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. + +* [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. +* [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `NSURLSession` instances not managed by Alamofire. + +## Requirements + +- iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+ +- Xcode 7.3+ + +## Migration Guides + +- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) +- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) + +## Communication + +- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). (Tag 'alamofire') +- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/alamofire). +- If you **found a bug**, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + +## Installation + +> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).** +> +> Alamofire is no longer supported on iOS 7 due to the lack of support for frameworks. Without frameworks, running Travis-CI against iOS 7 would require a second duplicated test target. The separate test suite would need to import all the Swift files and the tests would need to be duplicated and re-written. This split would be too difficult to maintain to ensure the highest possible quality of the Alamofire ecosystem. + +### CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: + +```bash +$ gem install cocoapods +``` + +> CocoaPods 0.39.0+ is required to build Alamofire 3.0.0+. + +To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '9.0' +use_frameworks! + +target '' do + pod 'Alamofire', '~> 3.4' +end +``` + +Then, run the following command: + +```bash +$ pod install +``` + +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "Alamofire/Alamofire" ~> 3.4 +``` + +Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. + +### Manually + +If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. + +#### Embedded Framework + +- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: + +```bash +$ git init +``` + +- Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: + +```bash +$ git submodule add https://github.com/Alamofire/Alamofire.git +``` + +- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. + + > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. + +- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. +- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. +- In the tab bar at the top of that window, open the "General" panel. +- Click on the `+` button under the "Embedded Binaries" section. +- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. + + > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. + +- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. + + > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS` or `Alamofire OSX`. + +- And that's it! + +> The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. + +--- + +## Usage + +### Making a Request + +```swift +import Alamofire + +Alamofire.request(.GET, "https://httpbin.org/get") +``` + +### Response Handling + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .responseJSON { response in + print(response.request) // original URL request + print(response.response) // URL response + print(response.data) // server data + print(response.result) // result of response serialization + + if let JSON = response.result.value { + print("JSON: \(JSON)") + } + } +``` + +> Networking in Alamofire is done _asynchronously_. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are [very good reasons](https://developer.apple.com/library/ios/qa/qa1693/_index.html) for doing it this way. + +> Rather than blocking execution to wait for a response from the server, a [callback](http://en.wikipedia.org/wiki/Callback_%28computer_programming%29) is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler. + +### Validation + +By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling `validate` before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type. + +#### Manual Validation + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .validate(statusCode: 200..<300) + .validate(contentType: ["application/json"]) + .response { response in + print(response) + } +``` + +#### Automatic Validation + +Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .validate() + .responseJSON { response in + switch response.result { + case .Success: + print("Validation Successful") + case .Failure(let error): + print(error) + } + } +``` + +### Response Serialization + +**Built-in Response Methods** + +- `response()` +- `responseData()` +- `responseString(encoding: NSStringEncoding)` +- `responseJSON(options: NSJSONReadingOptions)` +- `responsePropertyList(options: NSPropertyListReadOptions)` + +#### Response Handler + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .validate() + .response { request, response, data, error in + print(request) + print(response) + print(data) + print(error) + } +``` + +> The `response` serializer does NOT evaluate any of the response data. It merely forwards on all the information directly from the URL session delegate. We strongly encourage you to leverage the other response serializers taking advantage of `Response` and `Result` types. + +#### Response Data Handler + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .validate() + .responseData { response in + print(response.request) + print(response.response) + print(response.result) + } +``` + +#### Response String Handler + +```swift +Alamofire.request(.GET, "https://httpbin.org/get") + .validate() + .responseString { response in + print("Success: \(response.result.isSuccess)") + print("Response String: \(response.result.value)") + } +``` + +#### Response JSON Handler + +```swift +Alamofire.request(.GET, "https://httpbin.org/get") + .validate() + .responseJSON { response in + debugPrint(response) + } +``` + +#### Chained Response Handlers + +Response handlers can even be chained: + +```swift +Alamofire.request(.GET, "https://httpbin.org/get") + .validate() + .responseString { response in + print("Response String: \(response.result.value)") + } + .responseJSON { response in + print("Response JSON: \(response.result.value)") + } +``` + +### HTTP Methods + +`Alamofire.Method` lists the HTTP methods defined in [RFC 7231 §4.3](http://tools.ietf.org/html/rfc7231#section-4.3): + +```swift +public enum Method: String { + case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +} +``` + +These values can be passed as the first argument of the `Alamofire.request` method: + +```swift +Alamofire.request(.POST, "https://httpbin.org/post") + +Alamofire.request(.PUT, "https://httpbin.org/put") + +Alamofire.request(.DELETE, "https://httpbin.org/delete") +``` + +### Parameters + +#### GET Request With URL-Encoded Parameters + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) +// https://httpbin.org/get?foo=bar +``` + +#### POST Request With URL-Encoded Parameters + +```swift +let parameters = [ + "foo": "bar", + "baz": ["a", 1], + "qux": [ + "x": 1, + "y": 2, + "z": 3 + ] +] + +Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters) +// HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 +``` + +### Parameter Encoding + +Parameters can also be encoded as JSON, Property List, or any custom format, using the `ParameterEncoding` enum: + +```swift +enum ParameterEncoding { + case URL + case URLEncodedInURL + case JSON + case PropertyList(format: NSPropertyListFormat, options: NSPropertyListWriteOptions) + case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) + + func encode(request: NSURLRequest, parameters: [String: AnyObject]?) -> (NSURLRequest, NSError?) + { ... } +} +``` + +- `URL`: A query string to be set as or appended to any existing URL query for `GET`, `HEAD`, and `DELETE` requests, or set as the body for requests with any other HTTP method. The `Content-Type` HTTP header field of an encoded request with HTTP body is set to `application/x-www-form-urlencoded`. _Since there is no published specification for how to encode collection types, Alamofire follows the convention of appending `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested dictionary values (`foo[bar]=baz`)._ +- `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same implementation as the `.URL` case, but always applies the encoded result to the URL. +- `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. +- `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header field of an encoded request is set to `application/x-plist`. +- `Custom`: Uses the associated closure value to construct a new request given an existing request and parameters. + +#### Manual Parameter Encoding of an NSURLRequest + +```swift +let URL = NSURL(string: "https://httpbin.org/get")! +var request = NSMutableURLRequest(URL: URL) + +let parameters = ["foo": "bar"] +let encoding = Alamofire.ParameterEncoding.URL +(request, _) = encoding.encode(request, parameters: parameters) +``` + +#### POST Request with JSON-encoded Parameters + +```swift +let parameters = [ + "foo": [1,2,3], + "bar": [ + "baz": "qux" + ] +] + +Alamofire.request(.POST, "https://httpbin.org/post", parameters: parameters, encoding: .JSON) +// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}} +``` + +### HTTP Headers + +Adding a custom HTTP header to a `Request` is supported directly in the global `request` method. This makes it easy to attach HTTP headers to a `Request` that can be constantly changing. + +> For HTTP headers that do not change, it is recommended to set them on the `NSURLSessionConfiguration` so they are automatically applied to any `NSURLSessionTask` created by the underlying `NSURLSession`. + +```swift +let headers = [ + "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", + "Accept": "application/json" +] + +Alamofire.request(.GET, "https://httpbin.org/get", headers: headers) + .responseJSON { response in + debugPrint(response) + } +``` + +### Caching + +Caching is handled on the system framework level by [`NSURLCache`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache). + +### Uploading + +**Supported Upload Types** + +- File +- Data +- Stream +- MultipartFormData + +#### Uploading a File + +```swift +let fileURL = NSBundle.mainBundle().URLForResource("Default", withExtension: "png") +Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) +``` + +#### Uploading with Progress + +```swift +Alamofire.upload(.POST, "https://httpbin.org/post", file: fileURL) + .progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in + print(totalBytesWritten) + + // This closure is NOT called on the main queue for performance + // reasons. To update your ui, dispatch to the main queue. + dispatch_async(dispatch_get_main_queue()) { + print("Total bytes written on main queue: \(totalBytesWritten)") + } + } + .validate() + .responseJSON { response in + debugPrint(response) + } +``` + +#### Uploading MultipartFormData + +```swift +Alamofire.upload( + .POST, + "https://httpbin.org/post", + multipartFormData: { multipartFormData in + multipartFormData.appendBodyPart(fileURL: unicornImageURL, name: "unicorn") + multipartFormData.appendBodyPart(fileURL: rainbowImageURL, name: "rainbow") + }, + encodingCompletion: { encodingResult in + switch encodingResult { + case .Success(let upload, _, _): + upload.responseJSON { response in + debugPrint(response) + } + case .Failure(let encodingError): + print(encodingError) + } + } +) +``` + +### Downloading + +**Supported Download Types** + +- Request +- Resume Data + +#### Downloading a File + +```swift +Alamofire.download(.GET, "https://httpbin.org/stream/100") { temporaryURL, response in + let fileManager = NSFileManager.defaultManager() + let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] + let pathComponent = response.suggestedFilename + + return directoryURL.URLByAppendingPathComponent(pathComponent!) +} +``` + +#### Using the Default Download Destination + +```swift +let destination = Alamofire.Request.suggestedDownloadDestination(directory: .DocumentDirectory, domain: .UserDomainMask) +Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) +``` + +#### Downloading a File w/Progress + +```swift +Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) + .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in + print(totalBytesRead) + + // This closure is NOT called on the main queue for performance + // reasons. To update your ui, dispatch to the main queue. + dispatch_async(dispatch_get_main_queue()) { + print("Total bytes read on main queue: \(totalBytesRead)") + } + } + .response { _, _, _, error in + if let error = error { + print("Failed with error: \(error)") + } else { + print("Downloaded file successfully") + } + } +``` + +#### Accessing Resume Data for Failed Downloads + +```swift +Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) + .response { _, _, data, _ in + if let + data = data, + resumeDataString = NSString(data: data, encoding: NSUTF8StringEncoding) + { + print("Resume Data: \(resumeDataString)") + } else { + print("Resume Data was empty") + } + } +``` + +> The `data` parameter is automatically populated with the `resumeData` if available. + +```swift +let download = Alamofire.download(.GET, "https://httpbin.org/stream/100", destination: destination) +download.response { _, _, _, _ in + if let + resumeData = download.resumeData, + resumeDataString = NSString(data: resumeData, encoding: NSUTF8StringEncoding) + { + print("Resume Data: \(resumeDataString)") + } else { + print("Resume Data was empty") + } +} +``` + +### Authentication + +Authentication is handled on the system framework level by [`NSURLCredential` and `NSURLAuthenticationChallenge`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html). + +**Supported Authentication Schemes** + +- [HTTP Basic](http://en.wikipedia.org/wiki/Basic_access_authentication) +- [HTTP Digest](http://en.wikipedia.org/wiki/Digest_access_authentication) +- [Kerberos](http://en.wikipedia.org/wiki/Kerberos_%28protocol%29) +- [NTLM](http://en.wikipedia.org/wiki/NT_LAN_Manager) + +#### HTTP Basic Authentication + +The `authenticate` method on a `Request` will automatically provide an `NSURLCredential` to an `NSURLAuthenticationChallenge` when appropriate: + +```swift +let user = "user" +let password = "password" + +Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(user: user, password: password) + .responseJSON { response in + debugPrint(response) + } +``` + +Depending upon your server implementation, an `Authorization` header may also be appropriate: + +```swift +let user = "user" +let password = "password" + +let credentialData = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding)! +let base64Credentials = credentialData.base64EncodedStringWithOptions([]) + +let headers = ["Authorization": "Basic \(base64Credentials)"] + +Alamofire.request(.GET, "https://httpbin.org/basic-auth/user/password", headers: headers) + .responseJSON { response in + debugPrint(response) + } +``` + +#### Authentication with NSURLCredential + +```swift +let user = "user" +let password = "password" + +let credential = NSURLCredential(user: user, password: password, persistence: .ForSession) + +Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)") + .authenticate(usingCredential: credential) + .responseJSON { response in + debugPrint(response) + } +``` + +### Timeline + +Alamofire collects timings throughout the lifecycle of a `Request` and creates a `Timeline` object exposed as a property on a `Response`. + +```swift +Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + .validate() + .responseJSON { response in + print(response.timeline) + } +``` + +The above reports the following `Timeline` info: + +- `Latency`: 0.428 seconds +- `Request Duration`: 0.428 seconds +- `Serialization Duration`: 0.001 seconds +- `Total Duration`: 0.429 seconds + +### Printable + +```swift +let request = Alamofire.request(.GET, "https://httpbin.org/ip") + +print(request) +// GET https://httpbin.org/ip (200) +``` + +### DebugPrintable + +```swift +let request = Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) + +debugPrint(request) +``` + +#### Output (cURL) + +```bash +$ curl -i \ + -H "User-Agent: Alamofire" \ + -H "Accept-Encoding: Accept-Encoding: gzip;q=1.0,compress;q=0.5" \ + -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ + "https://httpbin.org/get?foo=bar" +``` + +--- + +## Advanced Usage + +> Alamofire is built on `NSURLSession` and the Foundation URL Loading System. To make the most of +this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack. + +**Recommended Reading** + +- [URL Loading System Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html) +- [NSURLSession Class Reference](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/Introduction/Introduction.html#//apple_ref/occ/cl/NSURLSession) +- [NSURLCache Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/Reference/Reference.html#//apple_ref/occ/cl/NSURLCache) +- [NSURLAuthenticationChallenge Class Reference](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLAuthenticationChallenge_Class/Reference/Reference.html) + +### Manager + +Top-level convenience methods like `Alamofire.request` use a shared instance of `Alamofire.Manager`, which is configured with the default `NSURLSessionConfiguration`. + +As such, the following two statements are equivalent: + +```swift +Alamofire.request(.GET, "https://httpbin.org/get") +``` + +```swift +let manager = Alamofire.Manager.sharedInstance +manager.request(NSURLRequest(URL: NSURL(string: "https://httpbin.org/get")!)) +``` + +Applications can create managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (`HTTPAdditionalHeaders`) or timeout interval (`timeoutIntervalForRequest`). + +#### Creating a Manager with Default Configuration + +```swift +let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() +let manager = Alamofire.Manager(configuration: configuration) +``` + +#### Creating a Manager with Background Configuration + +```swift +let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier("com.example.app.background") +let manager = Alamofire.Manager(configuration: configuration) +``` + +#### Creating a Manager with Ephemeral Configuration + +```swift +let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration() +let manager = Alamofire.Manager(configuration: configuration) +``` + +#### Modifying Session Configuration + +```swift +var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders ?? [:] +defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" + +let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() +configuration.HTTPAdditionalHeaders = defaultHeaders + +let manager = Alamofire.Manager(configuration: configuration) +``` + +> This is **not** recommended for `Authorization` or `Content-Type` headers. Instead, use `URLRequestConvertible` and `ParameterEncoding`, respectively. + +### Request + +The result of a `request`, `upload`, or `download` method is an instance of `Alamofire.Request`. A request is always created using a constructor method from an owning manager, and never initialized directly. + +Methods like `authenticate`, `validate` and `responseData` return the caller in order to facilitate chaining. + +Requests can be suspended, resumed, and cancelled: + +- `suspend()`: Suspends the underlying task and dispatch queue +- `resume()`: Resumes the underlying task and dispatch queue. If the owning manager does not have `startRequestsImmediately` set to `true`, the request must call `resume()` in order to start. +- `cancel()`: Cancels the underlying task, producing an error that is passed to any registered response handlers. + +### Response Serialization + +#### Handling Errors + +Before implementing custom response serializers or object serialization methods, it's important to be prepared to handle any errors that may occur. Alamofire recommends handling these through the use of either your own `NSError` creation methods, or a simple `enum` that conforms to `ErrorType`. For example, this `BackendError` type, which will be used in later examples: + +```swift +public enum BackendError: ErrorType { + case Network(error: NSError) + case DataSerialization(reason: String) + case JSONSerialization(error: NSError) + case ObjectSerialization(reason: String) + case XMLSerialization(error: NSError) +} +``` + +#### Creating a Custom Response Serializer + +Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on `Alamofire.Request`. + +For example, here's how a response handler using [Ono](https://github.com/mattt/Ono) might be implemented: + +```swift +extension Request { + public static func XMLResponseSerializer() -> ResponseSerializer { + return ResponseSerializer { request, response, data, error in + guard error == nil else { return .Failure(.Network(error: error!)) } + + guard let validData = data else { + return .Failure(.DataSerialization(reason: "Data could not be serialized. Input data was nil.")) + } + + do { + let XML = try ONOXMLDocument(data: validData) + return .Success(XML) + } catch { + return .Failure(.XMLSerialization(error: error as NSError)) + } + } + } + + public func responseXMLDocument(completionHandler: Response -> Void) -> Self { + return response(responseSerializer: Request.XMLResponseSerializer(), completionHandler: completionHandler) + } +} +``` + +#### Generic Response Object Serialization + +Generics can be used to provide automatic, type-safe response object serialization. + +```swift +public protocol ResponseObjectSerializable { + init?(response: NSHTTPURLResponse, representation: AnyObject) +} + +extension Request { + public func responseObject(completionHandler: Response -> Void) -> Self { + let responseSerializer = ResponseSerializer { request, response, data, error in + guard error == nil else { return .Failure(.Network(error: error!)) } + + let JSONResponseSerializer = Request.JSONResponseSerializer(options: .AllowFragments) + let result = JSONResponseSerializer.serializeResponse(request, response, data, error) + + switch result { + case .Success(let value): + if let + response = response, + responseObject = T(response: response, representation: value) + { + return .Success(responseObject) + } else { + return .Failure(.ObjectSerialization(reason: "JSON could not be serialized into response object: \(value)")) + } + case .Failure(let error): + return .Failure(.JSONSerialization(error: error)) + } + } + + return response(responseSerializer: responseSerializer, completionHandler: completionHandler) + } +} +``` + +```swift +final class User: ResponseObjectSerializable { + let username: String + let name: String + + init?(response: NSHTTPURLResponse, representation: AnyObject) { + self.username = response.URL!.lastPathComponent! + self.name = representation.valueForKeyPath("name") as! String + } +} +``` + +```swift +Alamofire.request(.GET, "https://example.com/users/mattt") + .responseObject { (response: Response) in + debugPrint(response) + } +``` + +The same approach can also be used to handle endpoints that return a representation of a collection of objects: + +```swift +public protocol ResponseCollectionSerializable { + static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] +} + +extension ResponseCollectionSerializable where Self: ResponseObjectSerializable { + static func collection(response response: NSHTTPURLResponse, representation: AnyObject) -> [Self] { + var collection = [Self]() + + if let representation = representation as? [[String: AnyObject]] { + for itemRepresentation in representation { + if let item = Self(response: response, representation: itemRepresentation) { + collection.append(item) + } + } + } + + return collection + } +} + +extension Alamofire.Request { + public func responseCollection(completionHandler: Response<[T], BackendError> -> Void) -> Self { + let responseSerializer = ResponseSerializer<[T], BackendError> { request, response, data, error in + guard error == nil else { return .Failure(.Network(error: error!)) } + + let JSONSerializer = Request.JSONResponseSerializer(options: .AllowFragments) + let result = JSONSerializer.serializeResponse(request, response, data, error) + + switch result { + case .Success(let value): + if let response = response { + return .Success(T.collection(response: response, representation: value)) + } else { + return .Failure(. ObjectSerialization(reason: "Response collection could not be serialized due to nil response")) + } + case .Failure(let error): + return .Failure(.JSONSerialization(error: error)) + } + } + + return response(responseSerializer: responseSerializer, completionHandler: completionHandler) + } +} +``` + +```swift +final class User: ResponseObjectSerializable, ResponseCollectionSerializable { + let username: String + let name: String + + init?(response: NSHTTPURLResponse, representation: AnyObject) { + self.username = response.URL!.lastPathComponent! + self.name = representation.valueForKeyPath("name") as! String + } +} +``` + +```swift +Alamofire.request(.GET, "http://example.com/users") + .responseCollection { (response: Response<[User], BackendError>) in + debugPrint(response) + } +``` + +### URLStringConvertible + +Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to construct URL requests. `NSString`, `NSURL`, `NSURLComponents`, and `NSURLRequest` conform to `URLStringConvertible` by default, allowing any of them to be passed as `URLString` parameters to the `request`, `upload`, and `download` methods: + +```swift +let string = NSString(string: "https://httpbin.org/post") +Alamofire.request(.POST, string) + +let URL = NSURL(string: string)! +Alamofire.request(.POST, URL) + +let URLRequest = NSURLRequest(URL: URL) +Alamofire.request(.POST, URLRequest) // overrides `HTTPMethod` of `URLRequest` + +let URLComponents = NSURLComponents(URL: URL, resolvingAgainstBaseURL: true) +Alamofire.request(.POST, URLComponents) +``` + +Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLStringConvertible` as a convenient way to map domain-specific models to server resources. + +#### Type-Safe Routing + +```swift +extension User: URLStringConvertible { + static let baseURLString = "http://example.com" + + var URLString: String { + return User.baseURLString + "/users/\(username)/" + } +} +``` + +```swift +let user = User(username: "mattt") +Alamofire.request(.GET, user) // http://example.com/users/mattt +``` + +### URLRequestConvertible + +Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. `NSURLRequest` conforms to `URLRequestConvertible` by default, allowing it to be passed into `request`, `upload`, and `download` methods directly (this is the recommended way to specify custom HTTP body for individual requests): + +```swift +let URL = NSURL(string: "https://httpbin.org/post")! +let mutableURLRequest = NSMutableURLRequest(URL: URL) +mutableURLRequest.HTTPMethod = "POST" + +let parameters = ["foo": "bar"] + +do { + mutableURLRequest.HTTPBody = try NSJSONSerialization.dataWithJSONObject(parameters, options: NSJSONWritingOptions()) +} catch { + // No-op +} + +mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + +Alamofire.request(mutableURLRequest) +``` + +Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLRequestConvertible` as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state. + +#### API Parameter Abstraction + +```swift +enum Router: URLRequestConvertible { + static let baseURLString = "http://example.com" + static let perPage = 50 + + case Search(query: String, page: Int) + + // MARK: URLRequestConvertible + + var URLRequest: NSMutableURLRequest { + let result: (path: String, parameters: [String: AnyObject]) = { + switch self { + case .Search(let query, let page) where page > 0: + return ("/search", ["q": query, "offset": Router.perPage * page]) + case .Search(let query, _): + return ("/search", ["q": query]) + } + }() + + let URL = NSURL(string: Router.baseURLString)! + let URLRequest = NSURLRequest(URL: URL.URLByAppendingPathComponent(result.path)) + let encoding = Alamofire.ParameterEncoding.URL + + return encoding.encode(URLRequest, parameters: result.parameters).0 + } +} +``` + +```swift +Alamofire.request(Router.Search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +``` + +#### CRUD & Authorization + +```swift +enum Router: URLRequestConvertible { + static let baseURLString = "http://example.com" + static var OAuthToken: String? + + case CreateUser([String: AnyObject]) + case ReadUser(String) + case UpdateUser(String, [String: AnyObject]) + case DestroyUser(String) + + var method: Alamofire.Method { + switch self { + case .CreateUser: + return .POST + case .ReadUser: + return .GET + case .UpdateUser: + return .PUT + case .DestroyUser: + return .DELETE + } + } + + var path: String { + switch self { + case .CreateUser: + return "/users" + case .ReadUser(let username): + return "/users/\(username)" + case .UpdateUser(let username, _): + return "/users/\(username)" + case .DestroyUser(let username): + return "/users/\(username)" + } + } + + // MARK: URLRequestConvertible + + var URLRequest: NSMutableURLRequest { + let URL = NSURL(string: Router.baseURLString)! + let mutableURLRequest = NSMutableURLRequest(URL: URL.URLByAppendingPathComponent(path)) + mutableURLRequest.HTTPMethod = method.rawValue + + if let token = Router.OAuthToken { + mutableURLRequest.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") + } + + switch self { + case .CreateUser(let parameters): + return Alamofire.ParameterEncoding.JSON.encode(mutableURLRequest, parameters: parameters).0 + case .UpdateUser(_, let parameters): + return Alamofire.ParameterEncoding.URL.encode(mutableURLRequest, parameters: parameters).0 + default: + return mutableURLRequest + } + } +} +``` + +```swift +Alamofire.request(Router.ReadUser("mattt")) // GET /users/mattt +``` + +### SessionDelegate + +By default, an Alamofire `Manager` instance creates an internal `SessionDelegate` object to handle all the various types of delegate callbacks that are generated by the underlying `NSURLSession`. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons. + +#### Override Closures + +The first way to customize the `SessionDelegate` behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching `SessionDelegate` API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available: + +```swift +/// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. +public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? + +/// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. +public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? + +/// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. +public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? + +/// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. +public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? +``` + +The following is a short example of how to use the `taskWillPerformHTTPRedirection` to avoid following redirects to any `apple.com` domains. + +```swift +let delegate: Alamofire.Manager.SessionDelegate = manager.delegate + +delegate.taskWillPerformHTTPRedirection = { session, task, response, request in + var finalRequest = request + + if let originalRequest = task.originalRequest where originalRequest.URLString.containsString("apple.com") { + finalRequest = originalRequest + } + + return finalRequest +} +``` + +#### Subclassing + +Another way to override the default implementation of the `SessionDelegate` is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here's a quick example of subclassing the `SessionDelegate` and logging a message when a redirect occurs. + +```swift +class LoggingSessionDelegate: Manager.SessionDelegate { + override func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + willPerformHTTPRedirection response: NSHTTPURLResponse, + newRequest request: NSURLRequest, + completionHandler: NSURLRequest? -> Void) + { + print("URLSession will perform HTTP redirection to request: \(request)") + + super.URLSession( + session, + task: task, + willPerformHTTPRedirection: response, + newRequest: request, + completionHandler: completionHandler + ) + } +} +``` + +Generally, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort. + +> It is important to keep in mind that the `subdelegates` are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks. + +### Security + +Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple's built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the `ServerTrustPolicy`. + +#### ServerTrustPolicy + +The `ServerTrustPolicy` enumeration evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when connecting to a server over a secure HTTPS connection. + +```swift +let serverTrustPolicy = ServerTrustPolicy.PinCertificates( + certificates: ServerTrustPolicy.certificatesInBundle(), + validateCertificateChain: true, + validateHost: true +) +``` + +There are many different cases of server trust evaluation giving you complete control over the validation process: + +* `PerformDefaultEvaluation`: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. +* `PinCertificates`: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates. +* `PinPublicKeys`: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys. +* `DisableEvaluation`: Disables all evaluation which in turn will always consider any server trust as valid. +* `CustomEvaluation`: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution. + +#### Server Trust Policy Manager + +The `ServerTrustPolicyManager` is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy. + +```swift +let serverTrustPolicies: [String: ServerTrustPolicy] = [ + "test.example.com": .PinCertificates( + certificates: ServerTrustPolicy.certificatesInBundle(), + validateCertificateChain: true, + validateHost: true + ), + "insecure.expired-apis.com": .DisableEvaluation +] + +let manager = Manager( + serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies) +) +``` + +> Make sure to keep a reference to the new `Manager` instance, otherwise your requests will all get cancelled when your `manager` is deallocated. + +These server trust policies will result in the following behavior: + +* `test.example.com` will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: + * Certificate chain MUST be valid. + * Certificate chain MUST include one of the pinned certificates. + * Challenge host MUST match the host in the certificate chain's leaf certificate. +* `insecure.expired-apis.com` will never evaluate the certificate chain and will always allow the TLS handshake to succeed. +* All other hosts will use the default evaluation provided by Apple. + +##### Subclassing Server Trust Policy Manager + +If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the `ServerTrustPolicyManager` and override the `serverTrustPolicyForHost` method with your own custom implementation. + +```swift +class CustomServerTrustPolicyManager: ServerTrustPolicyManager { + override func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + var policy: ServerTrustPolicy? + + // Implement your custom domain matching behavior... + + return policy + } +} +``` + +#### Validating the Host + +The `.PerformDefaultEvaluation`, `.PinCertificates` and `.PinPublicKeys` server trust policies all take a `validateHost` parameter. Setting the value to `true` will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A `validateHost` value of `false` will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate. + +> It is recommended that `validateHost` always be set to `true` in production environments. + +#### Validating the Certificate Chain + +Pinning certificates and public keys both have the option of validating the certificate chain using the `validateCertificateChain` parameter. By setting this value to `true`, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certificates or public keys. A value of `false` will skip the certificate chain validation, but will still perform the byte equality check. + +There are several cases where it may make sense to disable certificate chain validation. The most common use cases for disabling validation are self-signed and expired certificates. The evaluation would always fail in both of these cases, but the byte equality check will still ensure you are receiving the certificate you expect from the server. + +> It is recommended that `validateCertificateChain` always be set to `true` in production environments. + +#### App Transport Security + +With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom `ServerTrustPolicyManager` with several `ServerTrustPolicy` objects will have no effect. If you continuously see `CFNetwork SSLHandshake failed (-9806)` errors, you have probably run into this problem. Apple's ATS system overrides the entire challenge system unless you configure the ATS settings in your app's plist to disable enough of it to allow your app to evaluate the server trust. + +If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your `Info.plist`. + +```xml + + NSAppTransportSecurity + + NSExceptionDomains + + example.com + + NSExceptionAllowsInsecureHTTPLoads + + NSExceptionRequiresForwardSecrecy + + NSIncludesSubdomains + + + NSTemporaryExceptionMinimumTLSVersion + TLSv1.2 + + + + +``` + +Whether you need to set the `NSExceptionRequiresForwardSecrecy` to `NO` depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to `NO`. The `NSExceptionAllowsInsecureHTTPLoads` MUST be set to `YES` in order to allow the `SessionDelegate` to receive challenge callbacks. Once the challenge callbacks are being called, the `ServerTrustPolicyManager` will take over the server trust evaluation. You may also need to specify the `NSTemporaryExceptionMinimumTLSVersion` if you're trying to connect to a host that only supports TLS versions less than `1.2`. + +> It is recommended to always use valid certificates in production environments. + +### Network Reachability + +The `NetworkReachabilityManager` listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces. + +```swift +let manager = NetworkReachabilityManager(host: "www.apple.com") + +manager?.listener = { status in + print("Network Status Changed: \(status)") +} + +manager?.startListening() +``` + +> Make sure to remember to retain the `manager` in the above example, or no status changes will be reported. + +There are some important things to remember when using network reachability to determine what to do next. + +* **Do NOT** use Reachability to determine if a network request should be sent. + * You should **ALWAYS** send it. +* When Reachability is restored, use the event to retry failed network requests. + * Even though the network requests may still fail, this is a good moment to retry them. +* The network reachability status can be useful for determining why a network request may have failed. + * If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as "request timed out." + +> It is recommended to check out [WWDC 2012 Session 706, "Networking Best Practices"](https://developer.apple.com/videos/play/wwdc2012-706/) for more info. + +--- + +## Open Rdars + +The following rdars have some affect on the current implementation of Alamofire. + +* [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case +* [rdar://26761490](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage + +## FAQ + +### What's the origin of the name Alamofire? + +Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. + +--- + +## Credits + +Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. + +### Security Disclosure + +If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. + +## Donations + +The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially register as a federal non-profit organization. Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. Donating to the ASF will enable us to: + +* Pay our legal fees to register as a federal non-profit organization +* Pay our yearly legal fees to keep the non-profit in good status +* Pay for our mail servers to help us stay on top of all questions and security issues +* Potentially fund test servers to make it easier for us to test the edge cases +* Potentially fund developers to work on one of our projects full-time + +The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiam around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated. + +Click here to lend your support to: Alamofire Software Foundation and make a donation at pledgie.com ! + +## License + +Alamofire is released under the MIT license. See LICENSE for details. diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift new file mode 100644 index 000000000000..0945204dccaa --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -0,0 +1,369 @@ +// +// Alamofire.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +// MARK: - URLStringConvertible + +/** + Types adopting the `URLStringConvertible` protocol can be used to construct URL strings, which are then used to + construct URL requests. +*/ +public protocol URLStringConvertible { + /** + A URL that conforms to RFC 2396. + + Methods accepting a `URLStringConvertible` type parameter parse it according to RFCs 1738 and 1808. + + See https://tools.ietf.org/html/rfc2396 + See https://tools.ietf.org/html/rfc1738 + See https://tools.ietf.org/html/rfc1808 + */ + var URLString: String { get } +} + +extension String: URLStringConvertible { + public var URLString: String { return self } +} + +extension NSURL: URLStringConvertible { + public var URLString: String { return absoluteString } +} + +extension NSURLComponents: URLStringConvertible { + public var URLString: String { return URL!.URLString } +} + +extension NSURLRequest: URLStringConvertible { + public var URLString: String { return URL!.URLString } +} + +// MARK: - URLRequestConvertible + +/** + Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. +*/ +public protocol URLRequestConvertible { + /// The URL request. + var URLRequest: NSMutableURLRequest { get } +} + +extension NSURLRequest: URLRequestConvertible { + public var URLRequest: NSMutableURLRequest { return self.mutableCopy() as! NSMutableURLRequest } +} + +// MARK: - Convenience + +func URLRequest( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil) + -> NSMutableURLRequest +{ + let mutableURLRequest: NSMutableURLRequest + + if let request = URLString as? NSMutableURLRequest { + mutableURLRequest = request + } else if let request = URLString as? NSURLRequest { + mutableURLRequest = request.URLRequest + } else { + mutableURLRequest = NSMutableURLRequest(URL: NSURL(string: URLString.URLString)!) + } + + mutableURLRequest.HTTPMethod = method.rawValue + + if let headers = headers { + for (headerField, headerValue) in headers { + mutableURLRequest.setValue(headerValue, forHTTPHeaderField: headerField) + } + } + + return mutableURLRequest +} + +// MARK: - Request Methods + +/** + Creates a request using the shared manager instance for the specified method, URL string, parameters, and + parameter encoding. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter parameters: The parameters. `nil` by default. + - parameter encoding: The parameter encoding. `.URL` by default. + - parameter headers: The HTTP headers. `nil` by default. + + - returns: The created request. +*/ +public func request( + method: Method, + _ URLString: URLStringConvertible, + parameters: [String: AnyObject]? = nil, + encoding: ParameterEncoding = .URL, + headers: [String: String]? = nil) + -> Request +{ + return Manager.sharedInstance.request( + method, + URLString, + parameters: parameters, + encoding: encoding, + headers: headers + ) +} + +/** + Creates a request using the shared manager instance for the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request + + - returns: The created request. +*/ +public func request(URLRequest: URLRequestConvertible) -> Request { + return Manager.sharedInstance.request(URLRequest.URLRequest) +} + +// MARK: - Upload Methods + +// MARK: File + +/** + Creates an upload request using the shared manager instance for the specified method, URL string, and file. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter file: The file to upload. + + - returns: The created upload request. +*/ +public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + file: NSURL) + -> Request +{ + return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) +} + +/** + Creates an upload request using the shared manager instance for the specified URL request and file. + + - parameter URLRequest: The URL request. + - parameter file: The file to upload. + + - returns: The created upload request. +*/ +public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { + return Manager.sharedInstance.upload(URLRequest, file: file) +} + +// MARK: Data + +/** + Creates an upload request using the shared manager instance for the specified method, URL string, and data. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter data: The data to upload. + + - returns: The created upload request. +*/ +public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + data: NSData) + -> Request +{ + return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) +} + +/** + Creates an upload request using the shared manager instance for the specified URL request and data. + + - parameter URLRequest: The URL request. + - parameter data: The data to upload. + + - returns: The created upload request. +*/ +public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { + return Manager.sharedInstance.upload(URLRequest, data: data) +} + +// MARK: Stream + +/** + Creates an upload request using the shared manager instance for the specified method, URL string, and stream. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter stream: The stream to upload. + + - returns: The created upload request. +*/ +public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + stream: NSInputStream) + -> Request +{ + return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) +} + +/** + Creates an upload request using the shared manager instance for the specified URL request and stream. + + - parameter URLRequest: The URL request. + - parameter stream: The stream to upload. + + - returns: The created upload request. +*/ +public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { + return Manager.sharedInstance.upload(URLRequest, stream: stream) +} + +// MARK: MultipartFormData + +/** + Creates an upload request using the shared manager instance for the specified method and URL string. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + `MultipartFormDataEncodingMemoryThreshold` by default. + - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. +*/ +public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + multipartFormData: MultipartFormData -> Void, + encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, + encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) +{ + return Manager.sharedInstance.upload( + method, + URLString, + headers: headers, + multipartFormData: multipartFormData, + encodingMemoryThreshold: encodingMemoryThreshold, + encodingCompletion: encodingCompletion + ) +} + +/** + Creates an upload request using the shared manager instance for the specified method and URL string. + + - parameter URLRequest: The URL request. + - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + `MultipartFormDataEncodingMemoryThreshold` by default. + - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. +*/ +public func upload( + URLRequest: URLRequestConvertible, + multipartFormData: MultipartFormData -> Void, + encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, + encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) +{ + return Manager.sharedInstance.upload( + URLRequest, + multipartFormData: multipartFormData, + encodingMemoryThreshold: encodingMemoryThreshold, + encodingCompletion: encodingCompletion + ) +} + +// MARK: - Download Methods + +// MARK: URL Request + +/** + Creates a download request using the shared manager instance for the specified method and URL string. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter parameters: The parameters. `nil` by default. + - parameter encoding: The parameter encoding. `.URL` by default. + - parameter headers: The HTTP headers. `nil` by default. + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. +*/ +public func download( + method: Method, + _ URLString: URLStringConvertible, + parameters: [String: AnyObject]? = nil, + encoding: ParameterEncoding = .URL, + headers: [String: String]? = nil, + destination: Request.DownloadFileDestination) + -> Request +{ + return Manager.sharedInstance.download( + method, + URLString, + parameters: parameters, + encoding: encoding, + headers: headers, + destination: destination + ) +} + +/** + Creates a download request using the shared manager instance for the specified URL request. + + - parameter URLRequest: The URL request. + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. +*/ +public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { + return Manager.sharedInstance.download(URLRequest, destination: destination) +} + +// MARK: Resume Data + +/** + Creates a request using the shared manager instance for downloading from the resume data produced from a + previous request cancellation. + + - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` + when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for additional + information. + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. +*/ +public func download(resumeData data: NSData, destination: Request.DownloadFileDestination) -> Request { + return Manager.sharedInstance.download(data, destination: destination) +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift new file mode 100644 index 000000000000..52e90badfdea --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift @@ -0,0 +1,248 @@ +// +// Download.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Manager { + private enum Downloadable { + case Request(NSURLRequest) + case ResumeData(NSData) + } + + private func download(downloadable: Downloadable, destination: Request.DownloadFileDestination) -> Request { + var downloadTask: NSURLSessionDownloadTask! + + switch downloadable { + case .Request(let request): + dispatch_sync(queue) { + downloadTask = self.session.downloadTaskWithRequest(request) + } + case .ResumeData(let resumeData): + dispatch_sync(queue) { + downloadTask = self.session.downloadTaskWithResumeData(resumeData) + } + } + + let request = Request(session: session, task: downloadTask) + + if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate { + downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in + return destination(URL, downloadTask.response as! NSHTTPURLResponse) + } + } + + delegate[request.delegate.task] = request.delegate + + if startRequestsImmediately { + request.resume() + } + + return request + } + + // MARK: Request + + /** + Creates a download request for the specified method, URL string, parameters, parameter encoding, headers + and destination. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter parameters: The parameters. `nil` by default. + - parameter encoding: The parameter encoding. `.URL` by default. + - parameter headers: The HTTP headers. `nil` by default. + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. + */ + public func download( + method: Method, + _ URLString: URLStringConvertible, + parameters: [String: AnyObject]? = nil, + encoding: ParameterEncoding = .URL, + headers: [String: String]? = nil, + destination: Request.DownloadFileDestination) + -> Request + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 + + return download(encodedURLRequest, destination: destination) + } + + /** + Creates a request for downloading from the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. + */ + public func download(URLRequest: URLRequestConvertible, destination: Request.DownloadFileDestination) -> Request { + return download(.Request(URLRequest.URLRequest), destination: destination) + } + + // MARK: Resume Data + + /** + Creates a request for downloading from the resume data produced from a previous request cancellation. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter resumeData: The resume data. This is an opaque data blob produced by `NSURLSessionDownloadTask` + when a task is cancelled. See `NSURLSession -downloadTaskWithResumeData:` for + additional information. + - parameter destination: The closure used to determine the destination of the downloaded file. + + - returns: The created download request. + */ + public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request { + return download(.ResumeData(resumeData), destination: destination) + } +} + +// MARK: - + +extension Request { + /** + A closure executed once a request has successfully completed in order to determine where to move the temporary + file written to during the download process. The closure takes two arguments: the temporary file URL and the URL + response, and returns a single argument: the file URL where the temporary file should be moved. + */ + public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL + + /** + Creates a download file destination closure which uses the default file manager to move the temporary file to a + file URL in the first available directory with the specified search path directory and search path domain mask. + + - parameter directory: The search path directory. `.DocumentDirectory` by default. + - parameter domain: The search path domain mask. `.UserDomainMask` by default. + + - returns: A download file destination closure. + */ + public class func suggestedDownloadDestination( + directory directory: NSSearchPathDirectory = .DocumentDirectory, + domain: NSSearchPathDomainMask = .UserDomainMask) + -> DownloadFileDestination + { + return { temporaryURL, response -> NSURL in + let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) + + if !directoryURLs.isEmpty { + return directoryURLs[0].URLByAppendingPathComponent(response.suggestedFilename!) + } + + return temporaryURL + } + } + + /// The resume data of the underlying download task if available after a failure. + public var resumeData: NSData? { + var data: NSData? + + if let delegate = delegate as? DownloadTaskDelegate { + data = delegate.resumeData + } + + return data + } + + // MARK: - DownloadTaskDelegate + + class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate { + var downloadTask: NSURLSessionDownloadTask? { return task as? NSURLSessionDownloadTask } + var downloadProgress: ((Int64, Int64, Int64) -> Void)? + + var resumeData: NSData? + override var data: NSData? { return resumeData } + + // MARK: - NSURLSessionDownloadDelegate + + // MARK: Override Closures + + var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)? + var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? + + // MARK: Delegate Methods + + func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didFinishDownloadingToURL location: NSURL) + { + if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { + do { + let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) + try NSFileManager.defaultManager().moveItemAtURL(location, toURL: destination) + } catch { + self.error = error as NSError + } + } + } + + func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData( + session, + downloadTask, + bytesWritten, + totalBytesWritten, + totalBytesExpectedToWrite + ) + } else { + progress.totalUnitCount = totalBytesExpectedToWrite + progress.completedUnitCount = totalBytesWritten + + downloadProgress?(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) + } + } + + func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else { + progress.totalUnitCount = expectedTotalBytes + progress.completedUnitCount = fileOffset + } + } + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift new file mode 100644 index 000000000000..cbfb5c77bff5 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift @@ -0,0 +1,779 @@ +// +// Manager.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/** + Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. +*/ +public class Manager { + + // MARK: - Properties + + /** + A shared instance of `Manager`, used by top-level Alamofire request methods, and suitable for use directly + for any ad hoc requests. + */ + public static let sharedInstance: Manager = { + let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() + configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders + + return Manager(configuration: configuration) + }() + + /** + Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. + */ + public static let defaultHTTPHeaders: [String: String] = { + // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 + let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" + + // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 + let acceptLanguage = NSLocale.preferredLanguages().prefix(6).enumerate().map { index, languageCode in + let quality = 1.0 - (Double(index) * 0.1) + return "\(languageCode);q=\(quality)" + }.joinWithSeparator(", ") + + // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 + let userAgent: String = { + if let info = NSBundle.mainBundle().infoDictionary { + let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" + let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" + let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" + let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" + + let osNameVersion: String = { + let versionString: String + + if #available(OSX 10.10, *) { + let version = NSProcessInfo.processInfo().operatingSystemVersion + versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" + } else { + versionString = "10.9" + } + + let osName: String = { + #if os(iOS) + return "iOS" + #elseif os(watchOS) + return "watchOS" + #elseif os(tvOS) + return "tvOS" + #elseif os(OSX) + return "OS X" + #elseif os(Linux) + return "Linux" + #else + return "Unknown" + #endif + }() + + return "\(osName) \(versionString)" + }() + + return "\(executable)/\(bundle) (\(appVersion)/\(appBuild)); \(osNameVersion))" + } + + return "Alamofire" + }() + + return [ + "Accept-Encoding": acceptEncoding, + "Accept-Language": acceptLanguage, + "User-Agent": userAgent + ] + }() + + let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL) + + /// The underlying session. + public let session: NSURLSession + + /// The session delegate handling all the task and session delegate callbacks. + public let delegate: SessionDelegate + + /// Whether to start requests immediately after being constructed. `true` by default. + public var startRequestsImmediately: Bool = true + + /** + The background completion handler closure provided by the UIApplicationDelegate + `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background + completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation + will automatically call the handler. + + If you need to handle your own events before the handler is called, then you need to override the + SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. + + `nil` by default. + */ + public var backgroundCompletionHandler: (() -> Void)? + + // MARK: - Lifecycle + + /** + Initializes the `Manager` instance with the specified configuration, delegate and server trust policy. + + - parameter configuration: The configuration used to construct the managed session. + `NSURLSessionConfiguration.defaultSessionConfiguration()` by default. + - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by + default. + - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + challenges. `nil` by default. + + - returns: The new `Manager` instance. + */ + public init( + configuration: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration(), + delegate: SessionDelegate = SessionDelegate(), + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + self.delegate = delegate + self.session = NSURLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + /** + Initializes the `Manager` instance with the specified session, delegate and server trust policy. + + - parameter session: The URL session. + - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. + - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust + challenges. `nil` by default. + + - returns: The new `Manager` instance if the URL session's delegate matches the delegate parameter. + */ + public init?( + session: NSURLSession, + delegate: SessionDelegate, + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) + { + guard delegate === session.delegate else { return nil } + + self.delegate = delegate + self.session = session + + commonInit(serverTrustPolicyManager: serverTrustPolicyManager) + } + + private func commonInit(serverTrustPolicyManager serverTrustPolicyManager: ServerTrustPolicyManager?) { + session.serverTrustPolicyManager = serverTrustPolicyManager + + delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in + guard let strongSelf = self else { return } + dispatch_async(dispatch_get_main_queue()) { strongSelf.backgroundCompletionHandler?() } + } + } + + deinit { + session.invalidateAndCancel() + } + + // MARK: - Request + + /** + Creates a request for the specified method, URL string, parameters, parameter encoding and headers. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter parameters: The parameters. `nil` by default. + - parameter encoding: The parameter encoding. `.URL` by default. + - parameter headers: The HTTP headers. `nil` by default. + + - returns: The created request. + */ + public func request( + method: Method, + _ URLString: URLStringConvertible, + parameters: [String: AnyObject]? = nil, + encoding: ParameterEncoding = .URL, + headers: [String: String]? = nil) + -> Request + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 + return request(encodedURLRequest) + } + + /** + Creates a request for the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request + + - returns: The created request. + */ + public func request(URLRequest: URLRequestConvertible) -> Request { + var dataTask: NSURLSessionDataTask! + dispatch_sync(queue) { dataTask = self.session.dataTaskWithRequest(URLRequest.URLRequest) } + + let request = Request(session: session, task: dataTask) + delegate[request.delegate.task] = request.delegate + + if startRequestsImmediately { + request.resume() + } + + return request + } + + // MARK: - SessionDelegate + + /** + Responsible for handling all delegate callbacks for the underlying session. + */ + public class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate { + private var subdelegates: [Int: Request.TaskDelegate] = [:] + private let subdelegateQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT) + + /// Access the task delegate for the specified task in a thread-safe manner. + public subscript(task: NSURLSessionTask) -> Request.TaskDelegate? { + get { + var subdelegate: Request.TaskDelegate? + dispatch_sync(subdelegateQueue) { subdelegate = self.subdelegates[task.taskIdentifier] } + + return subdelegate + } + set { + dispatch_barrier_async(subdelegateQueue) { self.subdelegates[task.taskIdentifier] = newValue } + } + } + + /** + Initializes the `SessionDelegate` instance. + + - returns: The new `SessionDelegate` instance. + */ + public override init() { + super.init() + } + + // MARK: - NSURLSessionDelegate + + // MARK: Override Closures + + /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didBecomeInvalidWithError:`. + public var sessionDidBecomeInvalidWithError: ((NSURLSession, NSError?) -> Void)? + + /// Overrides default behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:`. + public var sessionDidReceiveChallenge: ((NSURLSession, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? + + /// Overrides all behavior for NSURLSessionDelegate method `URLSession:didReceiveChallenge:completionHandler:` and requires the caller to call the `completionHandler`. + public var sessionDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? + + /// Overrides default behavior for NSURLSessionDelegate method `URLSessionDidFinishEventsForBackgroundURLSession:`. + public var sessionDidFinishEventsForBackgroundURLSession: ((NSURLSession) -> Void)? + + // MARK: Delegate Methods + + /** + Tells the delegate that the session has been invalidated. + + - parameter session: The session object that was invalidated. + - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. + */ + public func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) { + sessionDidBecomeInvalidWithError?(session, error) + } + + /** + Requests credentials from the delegate in response to a session-level authentication request from the remote server. + + - parameter session: The session containing the task that requested authentication. + - parameter challenge: An object that contains the request for authentication. + - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. + */ + public func URLSession( + session: NSURLSession, + didReceiveChallenge challenge: NSURLAuthenticationChallenge, + completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) + { + guard sessionDidReceiveChallengeWithCompletion == nil else { + sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) + return + } + + var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling + var credential: NSURLCredential? + + if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { + (disposition, credential) = sessionDidReceiveChallenge(session, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if let + serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), + serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { + disposition = .UseCredential + credential = NSURLCredential(forTrust: serverTrust) + } else { + disposition = .CancelAuthenticationChallenge + } + } + } + + completionHandler(disposition, credential) + } + + /** + Tells the delegate that all messages enqueued for a session have been delivered. + + - parameter session: The session that no longer has any outstanding requests. + */ + public func URLSessionDidFinishEventsForBackgroundURLSession(session: NSURLSession) { + sessionDidFinishEventsForBackgroundURLSession?(session) + } + + // MARK: - NSURLSessionTaskDelegate + + // MARK: Override Closures + + /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`. + public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? + + /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:` and + /// requires the caller to call the `completionHandler`. + public var taskWillPerformHTTPRedirectionWithCompletion: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, NSURLRequest? -> Void) -> Void)? + + /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`. + public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? + + /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:` and + /// requires the caller to call the `completionHandler`. + public var taskDidReceiveChallengeWithCompletion: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) -> Void)? + + /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`. + public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? + + /// Overrides all behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:` and + /// requires the caller to call the `completionHandler`. + public var taskNeedNewBodyStreamWithCompletion: ((NSURLSession, NSURLSessionTask, NSInputStream? -> Void) -> Void)? + + /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. + public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didCompleteWithError:`. + public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? + + // MARK: Delegate Methods + + /** + Tells the delegate that the remote server requested an HTTP redirect. + + - parameter session: The session containing the task whose request resulted in a redirect. + - parameter task: The task whose request resulted in a redirect. + - parameter response: An object containing the server’s response to the original request. + - parameter request: A URL request object filled out with the new location. + - parameter completionHandler: A closure that your handler should call with either the value of the request + parameter, a modified URL request object, or NULL to refuse the redirect and + return the body of the redirect response. + */ + public func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + willPerformHTTPRedirection response: NSHTTPURLResponse, + newRequest request: NSURLRequest, + completionHandler: NSURLRequest? -> Void) + { + guard taskWillPerformHTTPRedirectionWithCompletion == nil else { + taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) + return + } + + var redirectRequest: NSURLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + /** + Requests credentials from the delegate in response to an authentication request from the remote server. + + - parameter session: The session containing the task whose request requires authentication. + - parameter task: The task whose request requires authentication. + - parameter challenge: An object that contains the request for authentication. + - parameter completionHandler: A handler that your delegate method must call providing the disposition and credential. + */ + public func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + didReceiveChallenge challenge: NSURLAuthenticationChallenge, + completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) + { + guard taskDidReceiveChallengeWithCompletion == nil else { + taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) + return + } + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + let result = taskDidReceiveChallenge(session, task, challenge) + completionHandler(result.0, result.1) + } else if let delegate = self[task] { + delegate.URLSession( + session, + task: task, + didReceiveChallenge: challenge, + completionHandler: completionHandler + ) + } else { + URLSession(session, didReceiveChallenge: challenge, completionHandler: completionHandler) + } + } + + /** + Tells the delegate when a task requires a new request body stream to send to the remote server. + + - parameter session: The session containing the task that needs a new body stream. + - parameter task: The task that needs a new body stream. + - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + */ + public func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + needNewBodyStream completionHandler: NSInputStream? -> Void) + { + guard taskNeedNewBodyStreamWithCompletion == nil else { + taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) + return + } + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + completionHandler(taskNeedNewBodyStream(session, task)) + } else if let delegate = self[task] { + delegate.URLSession(session, task: task, needNewBodyStream: completionHandler) + } + } + + /** + Periodically informs the delegate of the progress of sending body content to the server. + + - parameter session: The session containing the data task. + - parameter task: The data task. + - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. + - parameter totalBytesSent: The total number of bytes sent so far. + - parameter totalBytesExpectedToSend: The expected length of the body data. + */ + public func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else if let delegate = self[task] as? Request.UploadTaskDelegate { + delegate.URLSession( + session, + task: task, + didSendBodyData: bytesSent, + totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend + ) + } + } + + /** + Tells the delegate that the task finished transferring data. + + - parameter session: The session containing the task whose request finished transferring data. + - parameter task: The task whose request finished transferring data. + - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. + */ + public func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { + if let taskDidComplete = taskDidComplete { + taskDidComplete(session, task, error) + } else if let delegate = self[task] { + delegate.URLSession(session, task: task, didCompleteWithError: error) + } + + NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidComplete, object: task) + + self[task] = nil + } + + // MARK: - NSURLSessionDataDelegate + + // MARK: Override Closures + + /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`. + public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? + + /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:` and + /// requires caller to call the `completionHandler`. + public var dataTaskDidReceiveResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSURLResponse, NSURLSessionResponseDisposition -> Void) -> Void)? + + /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`. + public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? + + /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveData:`. + public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? + + /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`. + public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? + + /// Overrides all behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:` and + /// requires caller to call the `completionHandler`. + public var dataTaskWillCacheResponseWithCompletion: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, NSCachedURLResponse? -> Void) -> Void)? + + // MARK: Delegate Methods + + /** + Tells the delegate that the data task received the initial reply (headers) from the server. + + - parameter session: The session containing the data task that received an initial reply. + - parameter dataTask: The data task that received an initial reply. + - parameter response: A URL response object populated with headers. + - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a + constant to indicate whether the transfer should continue as a data task or + should become a download task. + */ + public func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + didReceiveResponse response: NSURLResponse, + completionHandler: NSURLSessionResponseDisposition -> Void) + { + guard dataTaskDidReceiveResponseWithCompletion == nil else { + dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) + return + } + + var disposition: NSURLSessionResponseDisposition = .Allow + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + /** + Tells the delegate that the data task was changed to a download task. + + - parameter session: The session containing the task that was replaced by a download task. + - parameter dataTask: The data task that was replaced by a download task. + - parameter downloadTask: The new download task that replaced the data task. + */ + public func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) + { + if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { + dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) + } else { + let downloadDelegate = Request.DownloadTaskDelegate(task: downloadTask) + self[downloadTask] = downloadDelegate + } + } + + /** + Tells the delegate that the data task has received some of the expected data. + + - parameter session: The session containing the data task that provided data. + - parameter dataTask: The data task that provided data. + - parameter data: A data object containing the transferred data. + */ + public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { + delegate.URLSession(session, dataTask: dataTask, didReceiveData: data) + } + } + + /** + Asks the delegate whether the data (or upload) task should store the response in the cache. + + - parameter session: The session containing the data (or upload) task. + - parameter dataTask: The data (or upload) task. + - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current + caching policy and the values of certain received headers, such as the Pragma + and Cache-Control headers. + - parameter completionHandler: A block that your handler must call, providing either the original proposed + response, a modified version of that response, or NULL to prevent caching the + response. If your delegate implements this method, it must call this completion + handler; otherwise, your app leaks memory. + */ + public func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + willCacheResponse proposedResponse: NSCachedURLResponse, + completionHandler: NSCachedURLResponse? -> Void) + { + guard dataTaskWillCacheResponseWithCompletion == nil else { + dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) + return + } + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) + } else if let delegate = self[dataTask] as? Request.DataTaskDelegate { + delegate.URLSession( + session, + dataTask: dataTask, + willCacheResponse: proposedResponse, + completionHandler: completionHandler + ) + } else { + completionHandler(proposedResponse) + } + } + + // MARK: - NSURLSessionDownloadDelegate + + // MARK: Override Closures + + /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didFinishDownloadingToURL:`. + public var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> Void)? + + /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. + public var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + + /// Overrides default behavior for NSURLSessionDownloadDelegate method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. + public var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)? + + // MARK: Delegate Methods + + /** + Tells the delegate that a download task has finished downloading. + + - parameter session: The session containing the download task that finished. + - parameter downloadTask: The download task that finished. + - parameter location: A file URL for the temporary file. Because the file is temporary, you must either + open the file for reading or move it to a permanent location in your app’s sandbox + container directory before returning from this delegate method. + */ + public func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didFinishDownloadingToURL location: NSURL) + { + if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { + downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) + } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { + delegate.URLSession(session, downloadTask: downloadTask, didFinishDownloadingToURL: location) + } + } + + /** + Periodically informs the delegate about the download’s progress. + + - parameter session: The session containing the download task. + - parameter downloadTask: The download task. + - parameter bytesWritten: The number of bytes transferred since the last time this delegate + method was called. + - parameter totalBytesWritten: The total number of bytes transferred so far. + - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length + header. If this header was not provided, the value is + `NSURLSessionTransferSizeUnknown`. + */ + public func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) + { + if let downloadTaskDidWriteData = downloadTaskDidWriteData { + downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) + } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { + delegate.URLSession( + session, + downloadTask: downloadTask, + didWriteData: bytesWritten, + totalBytesWritten: totalBytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite + ) + } + } + + /** + Tells the delegate that the download task has resumed downloading. + + - parameter session: The session containing the download task that finished. + - parameter downloadTask: The download task that resumed. See explanation in the discussion. + - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the + existing content, then this value is zero. Otherwise, this value is an + integer representing the number of bytes on disk that do not need to be + retrieved again. + - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. + If this header was not provided, the value is NSURLSessionTransferSizeUnknown. + */ + public func URLSession( + session: NSURLSession, + downloadTask: NSURLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) + { + if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { + downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) + } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { + delegate.URLSession( + session, + downloadTask: downloadTask, + didResumeAtOffset: fileOffset, + expectedTotalBytes: expectedTotalBytes + ) + } + } + + // MARK: - NSURLSessionStreamDelegate + + var _streamTaskReadClosed: Any? + var _streamTaskWriteClosed: Any? + var _streamTaskBetterRouteDiscovered: Any? + var _streamTaskDidBecomeInputStream: Any? + + // MARK: - NSObject + + public override func respondsToSelector(selector: Selector) -> Bool { + #if !os(OSX) + if selector == #selector(NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession(_:)) { + return sessionDidFinishEventsForBackgroundURLSession != nil + } + #endif + + switch selector { + case #selector(NSURLSessionDelegate.URLSession(_:didBecomeInvalidWithError:)): + return sessionDidBecomeInvalidWithError != nil + case #selector(NSURLSessionDelegate.URLSession(_:didReceiveChallenge:completionHandler:)): + return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) + case #selector(NSURLSessionTaskDelegate.URLSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): + return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) + case #selector(NSURLSessionDataDelegate.URLSession(_:dataTask:didReceiveResponse:completionHandler:)): + return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) + default: + return self.dynamicType.instancesRespondToSelector(selector) + } + } + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift new file mode 100644 index 000000000000..5a7ef09c82ed --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -0,0 +1,659 @@ +// +// MultipartFormData.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +#if os(iOS) || os(watchOS) || os(tvOS) +import MobileCoreServices +#elseif os(OSX) +import CoreServices +#endif + +/** + Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode + multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead + to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the + data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for + larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. + + For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well + and the w3 form documentation. + + - https://www.ietf.org/rfc/rfc2388.txt + - https://www.ietf.org/rfc/rfc2045.txt + - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 +*/ +public class MultipartFormData { + + // MARK: - Helper Types + + struct EncodingCharacters { + static let CRLF = "\r\n" + } + + struct BoundaryGenerator { + enum BoundaryType { + case Initial, Encapsulated, Final + } + + static func randomBoundary() -> String { + return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) + } + + static func boundaryData(boundaryType boundaryType: BoundaryType, boundary: String) -> NSData { + let boundaryText: String + + switch boundaryType { + case .Initial: + boundaryText = "--\(boundary)\(EncodingCharacters.CRLF)" + case .Encapsulated: + boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)\(EncodingCharacters.CRLF)" + case .Final: + boundaryText = "\(EncodingCharacters.CRLF)--\(boundary)--\(EncodingCharacters.CRLF)" + } + + return boundaryText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + } + } + + class BodyPart { + let headers: [String: String] + let bodyStream: NSInputStream + let bodyContentLength: UInt64 + var hasInitialBoundary = false + var hasFinalBoundary = false + + init(headers: [String: String], bodyStream: NSInputStream, bodyContentLength: UInt64) { + self.headers = headers + self.bodyStream = bodyStream + self.bodyContentLength = bodyContentLength + } + } + + // MARK: - Properties + + /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. + public var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + + /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. + public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } + + /// The boundary used to separate the body parts in the encoded form data. + public let boundary: String + + private var bodyParts: [BodyPart] + private var bodyPartError: NSError? + private let streamBufferSize: Int + + // MARK: - Lifecycle + + /** + Creates a multipart form data object. + + - returns: The multipart form data object. + */ + public init() { + self.boundary = BoundaryGenerator.randomBoundary() + self.bodyParts = [] + + /** + * The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more + * information, please refer to the following article: + * - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html + */ + + self.streamBufferSize = 1024 + } + + // MARK: - Body Parts + + /** + Creates a body part from the data and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + - Encoded data + - Multipart form boundary + + - parameter data: The data to encode into the multipart form data. + - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + */ + public func appendBodyPart(data data: NSData, name: String) { + let headers = contentHeaders(name: name) + let stream = NSInputStream(data: data) + let length = UInt64(data.length) + + appendBodyPart(stream: stream, length: length, headers: headers) + } + + /** + Creates a body part from the data and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - `Content-Disposition: form-data; name=#{name}` (HTTP Header) + - `Content-Type: #{generated mimeType}` (HTTP Header) + - Encoded data + - Multipart form boundary + + - parameter data: The data to encode into the multipart form data. + - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. + */ + public func appendBodyPart(data data: NSData, name: String, mimeType: String) { + let headers = contentHeaders(name: name, mimeType: mimeType) + let stream = NSInputStream(data: data) + let length = UInt64(data.length) + + appendBodyPart(stream: stream, length: length, headers: headers) + } + + /** + Creates a body part from the data and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + - `Content-Type: #{mimeType}` (HTTP Header) + - Encoded file data + - Multipart form boundary + + - parameter data: The data to encode into the multipart form data. + - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. + - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. + - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. + */ + public func appendBodyPart(data data: NSData, name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) + let stream = NSInputStream(data: data) + let length = UInt64(data.length) + + appendBodyPart(stream: stream, length: length, headers: headers) + } + + /** + Creates a body part from the file and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) + - `Content-Type: #{generated mimeType}` (HTTP Header) + - Encoded file data + - Multipart form boundary + + The filename in the `Content-Disposition` HTTP header is generated from the last path component of the + `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the + system associated MIME type. + + - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + */ + public func appendBodyPart(fileURL fileURL: NSURL, name: String) { + if let + fileName = fileURL.lastPathComponent, + pathExtension = fileURL.pathExtension + { + let mimeType = mimeTypeForPathExtension(pathExtension) + appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) + } else { + let failureReason = "Failed to extract the fileName of the provided URL: \(fileURL)" + setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + } + } + + /** + Creates a body part from the file and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) + - Content-Type: #{mimeType} (HTTP Header) + - Encoded file data + - Multipart form boundary + + - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. + - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. + - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. + */ + public func appendBodyPart(fileURL fileURL: NSURL, name: String, fileName: String, mimeType: String) { + let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) + + //============================================================ + // Check 1 - is file URL? + //============================================================ + + guard fileURL.fileURL else { + let failureReason = "The file URL does not point to a file URL: \(fileURL)" + setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + return + } + + //============================================================ + // Check 2 - is file URL reachable? + //============================================================ + + var isReachable = true + + if #available(OSX 10.10, *) { + isReachable = fileURL.checkPromisedItemIsReachableAndReturnError(nil) + } + + guard isReachable else { + setBodyPartError(code: NSURLErrorBadURL, failureReason: "The file URL is not reachable: \(fileURL)") + return + } + + //============================================================ + // Check 3 - is file URL a directory? + //============================================================ + + var isDirectory: ObjCBool = false + + guard let + path = fileURL.path + where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else + { + let failureReason = "The file URL is a directory, not a file: \(fileURL)" + setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + return + } + + //============================================================ + // Check 4 - can the file size be extracted? + //============================================================ + + var bodyContentLength: UInt64? + + do { + if let + path = fileURL.path, + fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber + { + bodyContentLength = fileSize.unsignedLongLongValue + } + } catch { + // No-op + } + + guard let length = bodyContentLength else { + let failureReason = "Could not fetch attributes from the file URL: \(fileURL)" + setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) + return + } + + //============================================================ + // Check 5 - can a stream be created from file URL? + //============================================================ + + guard let stream = NSInputStream(URL: fileURL) else { + let failureReason = "Failed to create an input stream from the file URL: \(fileURL)" + setBodyPartError(code: NSURLErrorCannotOpenFile, failureReason: failureReason) + return + } + + appendBodyPart(stream: stream, length: length, headers: headers) + } + + /** + Creates a body part from the stream and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) + - `Content-Type: #{mimeType}` (HTTP Header) + - Encoded stream data + - Multipart form boundary + + - parameter stream: The input stream to encode in the multipart form data. + - parameter length: The content length of the stream. + - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. + - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. + - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. + */ + public func appendBodyPart( + stream stream: NSInputStream, + length: UInt64, + name: String, + fileName: String, + mimeType: String) + { + let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) + appendBodyPart(stream: stream, length: length, headers: headers) + } + + /** + Creates a body part with the headers, stream and length and appends it to the multipart form data object. + + The body part data will be encoded using the following format: + + - HTTP headers + - Encoded stream data + - Multipart form boundary + + - parameter stream: The input stream to encode in the multipart form data. + - parameter length: The content length of the stream. + - parameter headers: The HTTP headers for the body part. + */ + public func appendBodyPart(stream stream: NSInputStream, length: UInt64, headers: [String: String]) { + let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) + bodyParts.append(bodyPart) + } + + // MARK: - Data Encoding + + /** + Encodes all the appended body parts into a single `NSData` object. + + It is important to note that this method will load all the appended body parts into memory all at the same + time. This method should only be used when the encoded data will have a small memory footprint. For large data + cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. + + - throws: An `NSError` if encoding encounters an error. + + - returns: The encoded `NSData` if encoding is successful. + */ + public func encode() throws -> NSData { + if let bodyPartError = bodyPartError { + throw bodyPartError + } + + let encoded = NSMutableData() + + bodyParts.first?.hasInitialBoundary = true + bodyParts.last?.hasFinalBoundary = true + + for bodyPart in bodyParts { + let encodedData = try encodeBodyPart(bodyPart) + encoded.appendData(encodedData) + } + + return encoded + } + + /** + Writes the appended body parts into the given file URL. + + This process is facilitated by reading and writing with input and output streams, respectively. Thus, + this approach is very memory efficient and should be used for large body part data. + + - parameter fileURL: The file URL to write the multipart form data into. + + - throws: An `NSError` if encoding encounters an error. + */ + public func writeEncodedDataToDisk(fileURL: NSURL) throws { + if let bodyPartError = bodyPartError { + throw bodyPartError + } + + if let path = fileURL.path where NSFileManager.defaultManager().fileExistsAtPath(path) { + let failureReason = "A file already exists at the given file URL: \(fileURL)" + throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) + } else if !fileURL.fileURL { + let failureReason = "The URL does not point to a valid file: \(fileURL)" + throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorBadURL, failureReason: failureReason) + } + + let outputStream: NSOutputStream + + if let possibleOutputStream = NSOutputStream(URL: fileURL, append: false) { + outputStream = possibleOutputStream + } else { + let failureReason = "Failed to create an output stream with the given URL: \(fileURL)" + throw Error.error(domain: NSURLErrorDomain, code: NSURLErrorCannotOpenFile, failureReason: failureReason) + } + + outputStream.open() + + self.bodyParts.first?.hasInitialBoundary = true + self.bodyParts.last?.hasFinalBoundary = true + + for bodyPart in self.bodyParts { + try writeBodyPart(bodyPart, toOutputStream: outputStream) + } + + outputStream.close() + } + + // MARK: - Private - Body Part Encoding + + private func encodeBodyPart(bodyPart: BodyPart) throws -> NSData { + let encoded = NSMutableData() + + let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() + encoded.appendData(initialData) + + let headerData = encodeHeaderDataForBodyPart(bodyPart) + encoded.appendData(headerData) + + let bodyStreamData = try encodeBodyStreamDataForBodyPart(bodyPart) + encoded.appendData(bodyStreamData) + + if bodyPart.hasFinalBoundary { + encoded.appendData(finalBoundaryData()) + } + + return encoded + } + + private func encodeHeaderDataForBodyPart(bodyPart: BodyPart) -> NSData { + var headerText = "" + + for (key, value) in bodyPart.headers { + headerText += "\(key): \(value)\(EncodingCharacters.CRLF)" + } + headerText += EncodingCharacters.CRLF + + return headerText.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! + } + + private func encodeBodyStreamDataForBodyPart(bodyPart: BodyPart) throws -> NSData { + let inputStream = bodyPart.bodyStream + inputStream.open() + + var error: NSError? + let encoded = NSMutableData() + + while inputStream.hasBytesAvailable { + var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) + + if inputStream.streamError != nil { + error = inputStream.streamError + break + } + + if bytesRead > 0 { + encoded.appendBytes(buffer, length: bytesRead) + } else if bytesRead < 0 { + let failureReason = "Failed to read from input stream: \(inputStream)" + error = Error.error(domain: NSURLErrorDomain, code: .InputStreamReadFailed, failureReason: failureReason) + break + } else { + break + } + } + + inputStream.close() + + if let error = error { + throw error + } + + return encoded + } + + // MARK: - Private - Writing Body Part to Output Stream + + private func writeBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { + try writeInitialBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) + try writeHeaderDataForBodyPart(bodyPart, toOutputStream: outputStream) + try writeBodyStreamForBodyPart(bodyPart, toOutputStream: outputStream) + try writeFinalBoundaryDataForBodyPart(bodyPart, toOutputStream: outputStream) + } + + private func writeInitialBoundaryDataForBodyPart( + bodyPart: BodyPart, + toOutputStream outputStream: NSOutputStream) + throws + { + let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() + return try writeData(initialData, toOutputStream: outputStream) + } + + private func writeHeaderDataForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { + let headerData = encodeHeaderDataForBodyPart(bodyPart) + return try writeData(headerData, toOutputStream: outputStream) + } + + private func writeBodyStreamForBodyPart(bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) throws { + let inputStream = bodyPart.bodyStream + inputStream.open() + + while inputStream.hasBytesAvailable { + var buffer = [UInt8](count: streamBufferSize, repeatedValue: 0) + let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) + + if let streamError = inputStream.streamError { + throw streamError + } + + if bytesRead > 0 { + if buffer.count != bytesRead { + buffer = Array(buffer[0.. 0 { + if outputStream.hasSpaceAvailable { + let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) + + if let streamError = outputStream.streamError { + throw streamError + } + + if bytesWritten < 0 { + let failureReason = "Failed to write to output stream: \(outputStream)" + throw Error.error(domain: NSURLErrorDomain, code: .OutputStreamWriteFailed, failureReason: failureReason) + } + + bytesToWrite -= bytesWritten + + if bytesToWrite > 0 { + buffer = Array(buffer[bytesWritten.. String { + if let + id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), + contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() + { + return contentType as String + } + + return "application/octet-stream" + } + + // MARK: - Private - Content Headers + + private func contentHeaders(name name: String) -> [String: String] { + return ["Content-Disposition": "form-data; name=\"\(name)\""] + } + + private func contentHeaders(name name: String, mimeType: String) -> [String: String] { + return [ + "Content-Disposition": "form-data; name=\"\(name)\"", + "Content-Type": "\(mimeType)" + ] + } + + private func contentHeaders(name name: String, fileName: String, mimeType: String) -> [String: String] { + return [ + "Content-Disposition": "form-data; name=\"\(name)\"; filename=\"\(fileName)\"", + "Content-Type": "\(mimeType)" + ] + } + + // MARK: - Private - Boundary Encoding + + private func initialBoundaryData() -> NSData { + return BoundaryGenerator.boundaryData(boundaryType: .Initial, boundary: boundary) + } + + private func encapsulatedBoundaryData() -> NSData { + return BoundaryGenerator.boundaryData(boundaryType: .Encapsulated, boundary: boundary) + } + + private func finalBoundaryData() -> NSData { + return BoundaryGenerator.boundaryData(boundaryType: .Final, boundary: boundary) + } + + // MARK: - Private - Errors + + private func setBodyPartError(code code: Int, failureReason: String) { + guard bodyPartError == nil else { return } + bodyPartError = Error.error(domain: NSURLErrorDomain, code: code, failureReason: failureReason) + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift new file mode 100644 index 000000000000..d5e00ae70051 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -0,0 +1,244 @@ +// +// NetworkReachabilityManager.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#if !os(watchOS) + +import Foundation +import SystemConfiguration + +/** + The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and + WiFi network interfaces. + + Reachability can be used to determine background information about why a network operation failed, or to retry + network requests when a connection is established. It should not be used to prevent a user from initiating a network + request, as it's possible that an initial request may be required to establish reachability. +*/ +public class NetworkReachabilityManager { + /** + Defines the various states of network reachability. + + - Unknown: It is unknown whether the network is reachable. + - NotReachable: The network is not reachable. + - ReachableOnWWAN: The network is reachable over the WWAN connection. + - ReachableOnWiFi: The network is reachable over the WiFi connection. + */ + public enum NetworkReachabilityStatus { + case Unknown + case NotReachable + case Reachable(ConnectionType) + } + + /** + Defines the various connection types detected by reachability flags. + + - EthernetOrWiFi: The connection type is either over Ethernet or WiFi. + - WWAN: The connection type is a WWAN connection. + */ + public enum ConnectionType { + case EthernetOrWiFi + case WWAN + } + + /// A closure executed when the network reachability status changes. The closure takes a single argument: the + /// network reachability status. + public typealias Listener = NetworkReachabilityStatus -> Void + + // MARK: - Properties + + /// Whether the network is currently reachable. + public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + + /// Whether the network is currently reachable over the WWAN interface. + public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .Reachable(.WWAN) } + + /// Whether the network is currently reachable over Ethernet or WiFi interface. + public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .Reachable(.EthernetOrWiFi) } + + /// The current network reachability status. + public var networkReachabilityStatus: NetworkReachabilityStatus { + guard let flags = self.flags else { return .Unknown } + return networkReachabilityStatusForFlags(flags) + } + + /// The dispatch queue to execute the `listener` closure on. + public var listenerQueue: dispatch_queue_t = dispatch_get_main_queue() + + /// A closure executed when the network reachability status changes. + public var listener: Listener? + + private var flags: SCNetworkReachabilityFlags? { + var flags = SCNetworkReachabilityFlags() + + if SCNetworkReachabilityGetFlags(reachability, &flags) { + return flags + } + + return nil + } + + private let reachability: SCNetworkReachability + private var previousFlags: SCNetworkReachabilityFlags + + // MARK: - Initialization + + /** + Creates a `NetworkReachabilityManager` instance with the specified host. + + - parameter host: The host used to evaluate network reachability. + + - returns: The new `NetworkReachabilityManager` instance. + */ + public convenience init?(host: String) { + guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } + self.init(reachability: reachability) + } + + /** + Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. + + Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing + status of the device, both IPv4 and IPv6. + + - returns: The new `NetworkReachabilityManager` instance. + */ + public convenience init?() { + var address = sockaddr_in() + address.sin_len = UInt8(sizeofValue(address)) + address.sin_family = sa_family_t(AF_INET) + + guard let reachability = withUnsafePointer(&address, { + SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0)) + }) else { return nil } + + self.init(reachability: reachability) + } + + private init(reachability: SCNetworkReachability) { + self.reachability = reachability + self.previousFlags = SCNetworkReachabilityFlags() + } + + deinit { + stopListening() + } + + // MARK: - Listening + + /** + Starts listening for changes in network reachability status. + + - returns: `true` if listening was started successfully, `false` otherwise. + */ + public func startListening() -> Bool { + var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) + context.info = UnsafeMutablePointer(Unmanaged.passUnretained(self).toOpaque()) + + let callbackEnabled = SCNetworkReachabilitySetCallback( + reachability, + { (_, flags, info) in + let reachability = Unmanaged.fromOpaque(COpaquePointer(info)).takeUnretainedValue() + reachability.notifyListener(flags) + }, + &context + ) + + let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) + + dispatch_async(listenerQueue) { + self.previousFlags = SCNetworkReachabilityFlags() + self.notifyListener(self.flags ?? SCNetworkReachabilityFlags()) + } + + return callbackEnabled && queueEnabled + } + + /** + Stops listening for changes in network reachability status. + */ + public func stopListening() { + SCNetworkReachabilitySetCallback(reachability, nil, nil) + SCNetworkReachabilitySetDispatchQueue(reachability, nil) + } + + // MARK: - Internal - Listener Notification + + func notifyListener(flags: SCNetworkReachabilityFlags) { + guard previousFlags != flags else { return } + previousFlags = flags + + listener?(networkReachabilityStatusForFlags(flags)) + } + + // MARK: - Internal - Network Reachability Status + + func networkReachabilityStatusForFlags(flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { + guard flags.contains(.Reachable) else { return .NotReachable } + + var networkStatus: NetworkReachabilityStatus = .NotReachable + + if !flags.contains(.ConnectionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } + + if flags.contains(.ConnectionOnDemand) || flags.contains(.ConnectionOnTraffic) { + if !flags.contains(.InterventionRequired) { networkStatus = .Reachable(.EthernetOrWiFi) } + } + + #if os(iOS) + if flags.contains(.IsWWAN) { networkStatus = .Reachable(.WWAN) } + #endif + + return networkStatus + } +} + +// MARK: - + +extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} + +/** + Returns whether the two network reachability status values are equal. + + - parameter lhs: The left-hand side value to compare. + - parameter rhs: The right-hand side value to compare. + + - returns: `true` if the two values are equal, `false` otherwise. +*/ +public func ==( + lhs: NetworkReachabilityManager.NetworkReachabilityStatus, + rhs: NetworkReachabilityManager.NetworkReachabilityStatus) + -> Bool +{ + switch (lhs, rhs) { + case (.Unknown, .Unknown): + return true + case (.NotReachable, .NotReachable): + return true + case let (.Reachable(lhsConnectionType), .Reachable(rhsConnectionType)): + return lhsConnectionType == rhsConnectionType + default: + return false + } +} + +#endif diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift new file mode 100644 index 000000000000..a7dbcfeffaa3 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Notifications.swift @@ -0,0 +1,47 @@ +// +// Notifications.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Contains all the `NSNotification` names posted by Alamofire with descriptions of each notification's payload. +public struct Notifications { + /// Used as a namespace for all `NSURLSessionTask` related notifications. + public struct Task { + /// Notification posted when an `NSURLSessionTask` is resumed. The notification `object` contains the resumed + /// `NSURLSessionTask`. + public static let DidResume = "com.alamofire.notifications.task.didResume" + + /// Notification posted when an `NSURLSessionTask` is suspended. The notification `object` contains the + /// suspended `NSURLSessionTask`. + public static let DidSuspend = "com.alamofire.notifications.task.didSuspend" + + /// Notification posted when an `NSURLSessionTask` is cancelled. The notification `object` contains the + /// cancelled `NSURLSessionTask`. + public static let DidCancel = "com.alamofire.notifications.task.didCancel" + + /// Notification posted when an `NSURLSessionTask` is completed. The notification `object` contains the + /// completed `NSURLSessionTask`. + public static let DidComplete = "com.alamofire.notifications.task.didComplete" + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift new file mode 100644 index 000000000000..c54e58b32d6f --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -0,0 +1,261 @@ +// +// ParameterEncoding.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/** + HTTP method definitions. + + See https://tools.ietf.org/html/rfc7231#section-4.3 +*/ +public enum Method: String { + case OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, CONNECT +} + +// MARK: ParameterEncoding + +/** + Used to specify the way in which a set of parameters are applied to a URL request. + + - `URL`: Creates a query string to be set as or appended to any existing URL query for `GET`, `HEAD`, + and `DELETE` requests, or set as the body for requests with any other HTTP method. The + `Content-Type` HTTP header field of an encoded request with HTTP body is set to + `application/x-www-form-urlencoded; charset=utf-8`. Since there is no published specification + for how to encode collection types, the convention of appending `[]` to the key for array + values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for nested + dictionary values (`foo[bar]=baz`). + + - `URLEncodedInURL`: Creates query string to be set as or appended to any existing URL query. Uses the same + implementation as the `.URL` case, but always applies the encoded result to the URL. + + - `JSON`: Uses `NSJSONSerialization` to create a JSON representation of the parameters object, which is + set as the body of the request. The `Content-Type` HTTP header field of an encoded request is + set to `application/json`. + + - `PropertyList`: Uses `NSPropertyListSerialization` to create a plist representation of the parameters object, + according to the associated format and write options values, which is set as the body of the + request. The `Content-Type` HTTP header field of an encoded request is set to + `application/x-plist`. + + - `Custom`: Uses the associated closure value to construct a new request given an existing request and + parameters. +*/ +public enum ParameterEncoding { + case URL + case URLEncodedInURL + case JSON + case PropertyList(NSPropertyListFormat, NSPropertyListWriteOptions) + case Custom((URLRequestConvertible, [String: AnyObject]?) -> (NSMutableURLRequest, NSError?)) + + /** + Creates a URL request by encoding parameters and applying them onto an existing request. + + - parameter URLRequest: The request to have parameters applied. + - parameter parameters: The parameters to apply. + + - returns: A tuple containing the constructed request and the error that occurred during parameter encoding, + if any. + */ + public func encode( + URLRequest: URLRequestConvertible, + parameters: [String: AnyObject]?) + -> (NSMutableURLRequest, NSError?) + { + var mutableURLRequest = URLRequest.URLRequest + + guard let parameters = parameters else { return (mutableURLRequest, nil) } + + var encodingError: NSError? = nil + + switch self { + case .URL, .URLEncodedInURL: + func query(parameters: [String: AnyObject]) -> String { + var components: [(String, String)] = [] + + for key in parameters.keys.sort(<) { + let value = parameters[key]! + components += queryComponents(key, value) + } + + return (components.map { "\($0)=\($1)" } as [String]).joinWithSeparator("&") + } + + func encodesParametersInURL(method: Method) -> Bool { + switch self { + case .URLEncodedInURL: + return true + default: + break + } + + switch method { + case .GET, .HEAD, .DELETE: + return true + default: + return false + } + } + + if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { + if let + URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) + where !parameters.isEmpty + { + let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) + URLComponents.percentEncodedQuery = percentEncodedQuery + mutableURLRequest.URL = URLComponents.URL + } + } else { + if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { + mutableURLRequest.setValue( + "application/x-www-form-urlencoded; charset=utf-8", + forHTTPHeaderField: "Content-Type" + ) + } + + mutableURLRequest.HTTPBody = query(parameters).dataUsingEncoding( + NSUTF8StringEncoding, + allowLossyConversion: false + ) + } + case .JSON: + do { + let options = NSJSONWritingOptions() + let data = try NSJSONSerialization.dataWithJSONObject(parameters, options: options) + + if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { + mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + mutableURLRequest.HTTPBody = data + } catch { + encodingError = error as NSError + } + case .PropertyList(let format, let options): + do { + let data = try NSPropertyListSerialization.dataWithPropertyList( + parameters, + format: format, + options: options + ) + + if mutableURLRequest.valueForHTTPHeaderField("Content-Type") == nil { + mutableURLRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") + } + + mutableURLRequest.HTTPBody = data + } catch { + encodingError = error as NSError + } + case .Custom(let closure): + (mutableURLRequest, encodingError) = closure(mutableURLRequest, parameters) + } + + return (mutableURLRequest, encodingError) + } + + /** + Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. + + - parameter key: The key of the query component. + - parameter value: The value of the query component. + + - returns: The percent-escaped, URL encoded query string components. + */ + public func queryComponents(key: String, _ value: AnyObject) -> [(String, String)] { + var components: [(String, String)] = [] + + if let dictionary = value as? [String: AnyObject] { + for (nestedKey, value) in dictionary { + components += queryComponents("\(key)[\(nestedKey)]", value) + } + } else if let array = value as? [AnyObject] { + for value in array { + components += queryComponents("\(key)[]", value) + } + } else { + components.append((escape(key), escape("\(value)"))) + } + + return components + } + + /** + Returns a percent-escaped string following RFC 3986 for a query string key or value. + + RFC 3986 states that the following characters are "reserved" characters. + + - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + + In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + should be percent-escaped in the query string. + + - parameter string: The string to be percent-escaped. + + - returns: The percent-escaped string. + */ + public func escape(string: String) -> String { + let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 + let subDelimitersToEncode = "!$&'()*+,;=" + + let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet + allowedCharacterSet.removeCharactersInString(generalDelimitersToEncode + subDelimitersToEncode) + + var escaped = "" + + //========================================================================================================== + // + // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few + // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no + // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more + // info, please refer to: + // + // - https://github.com/Alamofire/Alamofire/issues/206 + // + //========================================================================================================== + + if #available(iOS 8.3, OSX 10.10, *) { + escaped = string.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) ?? string + } else { + let batchSize = 50 + var index = string.startIndex + + while index != string.endIndex { + let startIndex = index + let endIndex = index.advancedBy(batchSize, limit: string.endIndex) + let range = startIndex.. Self + { + let credential = NSURLCredential(user: user, password: password, persistence: persistence) + + return authenticate(usingCredential: credential) + } + + /** + Associates a specified credential with the request. + + - parameter credential: The credential. + + - returns: The request. + */ + public func authenticate(usingCredential credential: NSURLCredential) -> Self { + delegate.credential = credential + + return self + } + + /** + Returns a base64 encoded basic authentication credential as an authorization header dictionary. + + - parameter user: The user. + - parameter password: The password. + + - returns: A dictionary with Authorization key and credential value or empty dictionary if encoding fails. + */ + public static func authorizationHeader(user user: String, password: String) -> [String: String] { + guard let data = "\(user):\(password)".dataUsingEncoding(NSUTF8StringEncoding) else { return [:] } + + let credential = data.base64EncodedStringWithOptions([]) + + return ["Authorization": "Basic \(credential)"] + } + + // MARK: - Progress + + /** + Sets a closure to be called periodically during the lifecycle of the request as data is written to or read + from the server. + + - For uploads, the progress closure returns the bytes written, total bytes written, and total bytes expected + to write. + - For downloads and data tasks, the progress closure returns the bytes read, total bytes read, and total bytes + expected to read. + + - parameter closure: The code to be executed periodically during the lifecycle of the request. + + - returns: The request. + */ + public func progress(closure: ((Int64, Int64, Int64) -> Void)? = nil) -> Self { + if let uploadDelegate = delegate as? UploadTaskDelegate { + uploadDelegate.uploadProgress = closure + } else if let dataDelegate = delegate as? DataTaskDelegate { + dataDelegate.dataProgress = closure + } else if let downloadDelegate = delegate as? DownloadTaskDelegate { + downloadDelegate.downloadProgress = closure + } + + return self + } + + /** + Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + + This closure returns the bytes most recently received from the server, not including data from previous calls. + If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is + also important to note that the `response` closure will be called with nil `responseData`. + + - parameter closure: The code to be executed periodically during the lifecycle of the request. + + - returns: The request. + */ + public func stream(closure: (NSData -> Void)? = nil) -> Self { + if let dataDelegate = delegate as? DataTaskDelegate { + dataDelegate.dataStream = closure + } + + return self + } + + // MARK: - State + + /** + Resumes the request. + */ + public func resume() { + if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } + + task.resume() + NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidResume, object: task) + } + + /** + Suspends the request. + */ + public func suspend() { + task.suspend() + NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidSuspend, object: task) + } + + /** + Cancels the request. + */ + public func cancel() { + if let + downloadDelegate = delegate as? DownloadTaskDelegate, + downloadTask = downloadDelegate.downloadTask + { + downloadTask.cancelByProducingResumeData { data in + downloadDelegate.resumeData = data + } + } else { + task.cancel() + } + + NSNotificationCenter.defaultCenter().postNotificationName(Notifications.Task.DidCancel, object: task) + } + + // MARK: - TaskDelegate + + /** + The task delegate is responsible for handling all delegate callbacks for the underlying task as well as + executing all operations attached to the serial operation queue upon task completion. + */ + public class TaskDelegate: NSObject { + + /// The serial operation queue used to execute all operations after the task completes. + public let queue: NSOperationQueue + + let task: NSURLSessionTask + let progress: NSProgress + + var data: NSData? { return nil } + var error: NSError? + + var initialResponseTime: CFAbsoluteTime? + var credential: NSURLCredential? + + init(task: NSURLSessionTask) { + self.task = task + self.progress = NSProgress(totalUnitCount: 0) + self.queue = { + let operationQueue = NSOperationQueue() + operationQueue.maxConcurrentOperationCount = 1 + operationQueue.suspended = true + + if #available(OSX 10.10, *) { + operationQueue.qualityOfService = NSQualityOfService.Utility + } + + return operationQueue + }() + } + + deinit { + queue.cancelAllOperations() + queue.suspended = false + } + + // MARK: - NSURLSessionTaskDelegate + + // MARK: Override Closures + + var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)? + var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))? + var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)? + var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)? + + // MARK: Delegate Methods + + func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + willPerformHTTPRedirection response: NSHTTPURLResponse, + newRequest request: NSURLRequest, + completionHandler: ((NSURLRequest?) -> Void)) + { + var redirectRequest: NSURLRequest? = request + + if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { + redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + } + + completionHandler(redirectRequest) + } + + func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + didReceiveChallenge challenge: NSURLAuthenticationChallenge, + completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) + { + var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling + var credential: NSURLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { + let host = challenge.protectionSpace.host + + if let + serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), + serverTrust = challenge.protectionSpace.serverTrust + { + if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { + disposition = .UseCredential + credential = NSURLCredential(forTrust: serverTrust) + } else { + disposition = .CancelAuthenticationChallenge + } + } + } else { + if challenge.previousFailureCount > 0 { + disposition = .RejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.URLCredentialStorage?.defaultCredentialForProtectionSpace(challenge.protectionSpace) + + if credential != nil { + disposition = .UseCredential + } + } + } + + completionHandler(disposition, credential) + } + + func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) + { + var bodyStream: NSInputStream? + + if let taskNeedNewBodyStream = taskNeedNewBodyStream { + bodyStream = taskNeedNewBodyStream(session, task) + } + + completionHandler(bodyStream) + } + + func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { + if let taskDidCompleteWithError = taskDidCompleteWithError { + taskDidCompleteWithError(session, task, error) + } else { + if let error = error { + self.error = error + + if let + downloadDelegate = self as? DownloadTaskDelegate, + userInfo = error.userInfo as? [String: AnyObject], + resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData + { + downloadDelegate.resumeData = resumeData + } + } + + queue.suspended = false + } + } + } + + // MARK: - DataTaskDelegate + + class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate { + var dataTask: NSURLSessionDataTask? { return task as? NSURLSessionDataTask } + + private var totalBytesReceived: Int64 = 0 + private var mutableData: NSMutableData + override var data: NSData? { + if dataStream != nil { + return nil + } else { + return mutableData + } + } + + private var expectedContentLength: Int64? + private var dataProgress: ((bytesReceived: Int64, totalBytesReceived: Int64, totalBytesExpectedToReceive: Int64) -> Void)? + private var dataStream: ((data: NSData) -> Void)? + + override init(task: NSURLSessionTask) { + mutableData = NSMutableData() + super.init(task: task) + } + + // MARK: - NSURLSessionDataDelegate + + // MARK: Override Closures + + var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)? + var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)? + var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)? + var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)? + + // MARK: Delegate Methods + + func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + didReceiveResponse response: NSURLResponse, + completionHandler: (NSURLSessionResponseDisposition -> Void)) + { + var disposition: NSURLSessionResponseDisposition = .Allow + + expectedContentLength = response.expectedContentLength + + if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { + disposition = dataTaskDidReceiveResponse(session, dataTask, response) + } + + completionHandler(disposition) + } + + func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) + { + dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) + } + + func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let dataTaskDidReceiveData = dataTaskDidReceiveData { + dataTaskDidReceiveData(session, dataTask, data) + } else { + if let dataStream = dataStream { + dataStream(data: data) + } else { + mutableData.appendData(data) + } + + totalBytesReceived += data.length + let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + + progress.totalUnitCount = totalBytesExpected + progress.completedUnitCount = totalBytesReceived + + dataProgress?( + bytesReceived: Int64(data.length), + totalBytesReceived: totalBytesReceived, + totalBytesExpectedToReceive: totalBytesExpected + ) + } + } + + func URLSession( + session: NSURLSession, + dataTask: NSURLSessionDataTask, + willCacheResponse proposedResponse: NSCachedURLResponse, + completionHandler: ((NSCachedURLResponse?) -> Void)) + { + var cachedResponse: NSCachedURLResponse? = proposedResponse + + if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { + cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) + } + + completionHandler(cachedResponse) + } + } +} + +// MARK: - CustomStringConvertible + +extension Request: CustomStringConvertible { + + /** + The textual representation used when written to an output stream, which includes the HTTP method and URL, as + well as the response status code if a response has been received. + */ + public var description: String { + var components: [String] = [] + + if let HTTPMethod = request?.HTTPMethod { + components.append(HTTPMethod) + } + + if let URLString = request?.URL?.absoluteString { + components.append(URLString) + } + + if let response = response { + components.append("(\(response.statusCode))") + } + + return components.joinWithSeparator(" ") + } +} + +// MARK: - CustomDebugStringConvertible + +extension Request: CustomDebugStringConvertible { + func cURLRepresentation() -> String { + var components = ["$ curl -i"] + + guard let + request = self.request, + URL = request.URL, + host = URL.host + else { + return "$ curl command could not be created" + } + + if let HTTPMethod = request.HTTPMethod where HTTPMethod != "GET" { + components.append("-X \(HTTPMethod)") + } + + if let credentialStorage = self.session.configuration.URLCredentialStorage { + let protectionSpace = NSURLProtectionSpace( + host: host, + port: URL.port?.integerValue ?? 0, + protocol: URL.scheme, + realm: host, + authenticationMethod: NSURLAuthenticationMethodHTTPBasic + ) + + if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values { + for credential in credentials { + components.append("-u \(credential.user!):\(credential.password!)") + } + } else { + if let credential = delegate.credential { + components.append("-u \(credential.user!):\(credential.password!)") + } + } + } + + if session.configuration.HTTPShouldSetCookies { + if let + cookieStorage = session.configuration.HTTPCookieStorage, + cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty + { + let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } + components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") + } + } + + var headers: [NSObject: AnyObject] = [:] + + if let additionalHeaders = session.configuration.HTTPAdditionalHeaders { + for (field, value) in additionalHeaders where field != "Cookie" { + headers[field] = value + } + } + + if let headerFields = request.allHTTPHeaderFields { + for (field, value) in headerFields where field != "Cookie" { + headers[field] = value + } + } + + for (field, value) in headers { + components.append("-H \"\(field): \(value)\"") + } + + if let + HTTPBodyData = request.HTTPBody, + HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) + { + var escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\\\"", withString: "\\\\\"") + escapedBody = escapedBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") + + components.append("-d \"\(escapedBody)\"") + } + + components.append("\"\(URL.absoluteString)\"") + + return components.joinWithSeparator(" \\\n\t") + } + + /// The textual representation used when written to an output stream, in the form of a cURL command. + public var debugDescription: String { + return cURLRepresentation() + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift new file mode 100644 index 000000000000..9c437ff6e416 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -0,0 +1,97 @@ +// +// Response.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Used to store all response data returned from a completed `Request`. +public struct Response { + /// The URL request sent to the server. + public let request: NSURLRequest? + + /// The server's response to the URL request. + public let response: NSHTTPURLResponse? + + /// The data returned by the server. + public let data: NSData? + + /// The result of response serialization. + public let result: Result + + /// The timeline of the complete lifecycle of the `Request`. + public let timeline: Timeline + + /** + Initializes the `Response` instance with the specified URL request, URL response, server data and response + serialization result. + + - parameter request: The URL request sent to the server. + - parameter response: The server's response to the URL request. + - parameter data: The data returned by the server. + - parameter result: The result of response serialization. + - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. + + - returns: the new `Response` instance. + */ + public init( + request: NSURLRequest?, + response: NSHTTPURLResponse?, + data: NSData?, + result: Result, + timeline: Timeline = Timeline()) + { + self.request = request + self.response = response + self.data = data + self.result = result + self.timeline = timeline + } +} + +// MARK: - CustomStringConvertible + +extension Response: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + return result.debugDescription + } +} + +// MARK: - CustomDebugStringConvertible + +extension Response: CustomDebugStringConvertible { + /// The debug textual representation used when written to an output stream, which includes the URL request, the URL + /// response, the server data and the response serialization result. + public var debugDescription: String { + var output: [String] = [] + + output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") + output.append("[Data]: \(data?.length ?? 0) bytes") + output.append("[Result]: \(result.debugDescription)") + output.append("[Timeline]: \(timeline.debugDescription)") + + return output.joinWithSeparator("\n") + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift new file mode 100644 index 000000000000..89e39544b8c9 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -0,0 +1,378 @@ +// +// ResponseSerialization.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +// MARK: ResponseSerializer + +/** + The type in which all response serializers must conform to in order to serialize a response. +*/ +public protocol ResponseSerializerType { + /// The type of serialized object to be created by this `ResponseSerializerType`. + associatedtype SerializedObject + + /// The type of error to be created by this `ResponseSerializer` if serialization fails. + associatedtype ErrorObject: ErrorType + + /** + A closure used by response handlers that takes a request, response, data and error and returns a result. + */ + var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result { get } +} + +// MARK: - + +/** + A generic `ResponseSerializerType` used to serialize a request, response, and data into a serialized object. +*/ +public struct ResponseSerializer: ResponseSerializerType { + /// The type of serialized object to be created by this `ResponseSerializer`. + public typealias SerializedObject = Value + + /// The type of error to be created by this `ResponseSerializer` if serialization fails. + public typealias ErrorObject = Error + + /** + A closure used by response handlers that takes a request, response, data and error and returns a result. + */ + public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result + + /** + Initializes the `ResponseSerializer` instance with the given serialize response closure. + + - parameter serializeResponse: The closure used to serialize the response. + + - returns: The new generic response serializer instance. + */ + public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result) { + self.serializeResponse = serializeResponse + } +} + +// MARK: - Default + +extension Request { + + /** + Adds a handler to be called once the request has finished. + + - parameter queue: The queue on which the completion handler is dispatched. + - parameter completionHandler: The code to be executed once the request has finished. + + - returns: The request. + */ + public func response( + queue queue: dispatch_queue_t? = nil, + completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Void) + -> Self + { + delegate.queue.addOperationWithBlock { + dispatch_async(queue ?? dispatch_get_main_queue()) { + completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) + } + } + + return self + } + + /** + Adds a handler to be called once the request has finished. + + - parameter queue: The queue on which the completion handler is dispatched. + - parameter responseSerializer: The response serializer responsible for serializing the request, response, + and data. + - parameter completionHandler: The code to be executed once the request has finished. + + - returns: The request. + */ + public func response( + queue queue: dispatch_queue_t? = nil, + responseSerializer: T, + completionHandler: Response -> Void) + -> Self + { + delegate.queue.addOperationWithBlock { + let result = responseSerializer.serializeResponse( + self.request, + self.response, + self.delegate.data, + self.delegate.error + ) + + let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() + let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + + let timeline = Timeline( + requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + initialResponseTime: initialResponseTime, + requestCompletedTime: requestCompletedTime, + serializationCompletedTime: CFAbsoluteTimeGetCurrent() + ) + + let response = Response( + request: self.request, + response: self.response, + data: self.delegate.data, + result: result, + timeline: timeline + ) + + dispatch_async(queue ?? dispatch_get_main_queue()) { completionHandler(response) } + } + + return self + } +} + +// MARK: - Data + +extension Request { + + /** + Creates a response serializer that returns the associated data as-is. + + - returns: A data response serializer. + */ + public static func dataResponseSerializer() -> ResponseSerializer { + return ResponseSerializer { _, response, data, error in + guard error == nil else { return .Failure(error!) } + + if let response = response where response.statusCode == 204 { return .Success(NSData()) } + + guard let validData = data else { + let failureReason = "Data could not be serialized. Input data was nil." + let error = Error.error(code: .DataSerializationFailed, failureReason: failureReason) + return .Failure(error) + } + + return .Success(validData) + } + } + + /** + Adds a handler to be called once the request has finished. + + - parameter completionHandler: The code to be executed once the request has finished. + + - returns: The request. + */ + public func responseData( + queue queue: dispatch_queue_t? = nil, + completionHandler: Response -> Void) + -> Self + { + return response(queue: queue, responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) + } +} + +// MARK: - String + +extension Request { + + /** + Creates a response serializer that returns a string initialized from the response data with the specified + string encoding. + + - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1. + + - returns: A string response serializer. + */ + public static func stringResponseSerializer( + encoding encoding: NSStringEncoding? = nil) + -> ResponseSerializer + { + return ResponseSerializer { _, response, data, error in + guard error == nil else { return .Failure(error!) } + + if let response = response where response.statusCode == 204 { return .Success("") } + + guard let validData = data else { + let failureReason = "String could not be serialized. Input data was nil." + let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) + return .Failure(error) + } + + var convertedEncoding = encoding + + if let encodingName = response?.textEncodingName where convertedEncoding == nil { + convertedEncoding = CFStringConvertEncodingToNSStringEncoding( + CFStringConvertIANACharSetNameToEncoding(encodingName) + ) + } + + let actualEncoding = convertedEncoding ?? NSISOLatin1StringEncoding + + if let string = String(data: validData, encoding: actualEncoding) { + return .Success(string) + } else { + let failureReason = "String could not be serialized with encoding: \(actualEncoding)" + let error = Error.error(code: .StringSerializationFailed, failureReason: failureReason) + return .Failure(error) + } + } + } + + /** + Adds a handler to be called once the request has finished. + + - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the + server response, falling back to the default HTTP default character set, + ISO-8859-1. + - parameter completionHandler: A closure to be executed once the request has finished. + + - returns: The request. + */ + public func responseString( + queue queue: dispatch_queue_t? = nil, + encoding: NSStringEncoding? = nil, + completionHandler: Response -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: Request.stringResponseSerializer(encoding: encoding), + completionHandler: completionHandler + ) + } +} + +// MARK: - JSON + +extension Request { + + /** + Creates a response serializer that returns a JSON object constructed from the response data using + `NSJSONSerialization` with the specified reading options. + + - parameter options: The JSON serialization reading options. `.AllowFragments` by default. + + - returns: A JSON object response serializer. + */ + public static func JSONResponseSerializer( + options options: NSJSONReadingOptions = .AllowFragments) + -> ResponseSerializer + { + return ResponseSerializer { _, response, data, error in + guard error == nil else { return .Failure(error!) } + + if let response = response where response.statusCode == 204 { return .Success(NSNull()) } + + guard let validData = data where validData.length > 0 else { + let failureReason = "JSON could not be serialized. Input data was nil or zero length." + let error = Error.error(code: .JSONSerializationFailed, failureReason: failureReason) + return .Failure(error) + } + + do { + let JSON = try NSJSONSerialization.JSONObjectWithData(validData, options: options) + return .Success(JSON) + } catch { + return .Failure(error as NSError) + } + } + } + + /** + Adds a handler to be called once the request has finished. + + - parameter options: The JSON serialization reading options. `.AllowFragments` by default. + - parameter completionHandler: A closure to be executed once the request has finished. + + - returns: The request. + */ + public func responseJSON( + queue queue: dispatch_queue_t? = nil, + options: NSJSONReadingOptions = .AllowFragments, + completionHandler: Response -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: Request.JSONResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} + +// MARK: - Property List + +extension Request { + + /** + Creates a response serializer that returns an object constructed from the response data using + `NSPropertyListSerialization` with the specified reading options. + + - parameter options: The property list reading options. `NSPropertyListReadOptions()` by default. + + - returns: A property list object response serializer. + */ + public static func propertyListResponseSerializer( + options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) + -> ResponseSerializer + { + return ResponseSerializer { _, response, data, error in + guard error == nil else { return .Failure(error!) } + + if let response = response where response.statusCode == 204 { return .Success(NSNull()) } + + guard let validData = data where validData.length > 0 else { + let failureReason = "Property list could not be serialized. Input data was nil or zero length." + let error = Error.error(code: .PropertyListSerializationFailed, failureReason: failureReason) + return .Failure(error) + } + + do { + let plist = try NSPropertyListSerialization.propertyListWithData(validData, options: options, format: nil) + return .Success(plist) + } catch { + return .Failure(error as NSError) + } + } + } + + /** + Adds a handler to be called once the request has finished. + + - parameter options: The property list reading options. `0` by default. + - parameter completionHandler: A closure to be executed once the request has finished. The closure takes 3 + arguments: the URL request, the URL response, the server data and the result + produced while creating the property list. + + - returns: The request. + */ + public func responsePropertyList( + queue queue: dispatch_queue_t? = nil, + options: NSPropertyListReadOptions = NSPropertyListReadOptions(), + completionHandler: Response -> Void) + -> Self + { + return response( + queue: queue, + responseSerializer: Request.propertyListResponseSerializer(options: options), + completionHandler: completionHandler + ) + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift new file mode 100644 index 000000000000..4aabf08bf8b4 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Result.swift @@ -0,0 +1,103 @@ +// +// Result.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/** + Used to represent whether a request was successful or encountered an error. + + - Success: The request and all post processing operations were successful resulting in the serialization of the + provided associated value. + - Failure: The request encountered an error resulting in a failure. The associated values are the original data + provided by the server as well as the error that caused the failure. +*/ +public enum Result { + case Success(Value) + case Failure(Error) + + /// Returns `true` if the result is a success, `false` otherwise. + public var isSuccess: Bool { + switch self { + case .Success: + return true + case .Failure: + return false + } + } + + /// Returns `true` if the result is a failure, `false` otherwise. + public var isFailure: Bool { + return !isSuccess + } + + /// Returns the associated value if the result is a success, `nil` otherwise. + public var value: Value? { + switch self { + case .Success(let value): + return value + case .Failure: + return nil + } + } + + /// Returns the associated error value if the result is a failure, `nil` otherwise. + public var error: Error? { + switch self { + case .Success: + return nil + case .Failure(let error): + return error + } + } +} + +// MARK: - CustomStringConvertible + +extension Result: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes whether the result was a + /// success or failure. + public var description: String { + switch self { + case .Success: + return "SUCCESS" + case .Failure: + return "FAILURE" + } + } +} + +// MARK: - CustomDebugStringConvertible + +extension Result: CustomDebugStringConvertible { + /// The debug textual representation used when written to an output stream, which includes whether the result was a + /// success or failure in addition to the value or error. + public var debugDescription: String { + switch self { + case .Success(let value): + return "SUCCESS: \(value)" + case .Failure(let error): + return "FAILURE: \(error)" + } + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift new file mode 100644 index 000000000000..7da516e8038e --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -0,0 +1,304 @@ +// +// ServerTrustPolicy.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. +public class ServerTrustPolicyManager { + /// The dictionary of policies mapped to a particular host. + public let policies: [String: ServerTrustPolicy] + + /** + Initializes the `ServerTrustPolicyManager` instance with the given policies. + + Since different servers and web services can have different leaf certificates, intermediate and even root + certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This + allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key + pinning for host3 and disabling evaluation for host4. + + - parameter policies: A dictionary of all policies mapped to a particular host. + + - returns: The new `ServerTrustPolicyManager` instance. + */ + public init(policies: [String: ServerTrustPolicy]) { + self.policies = policies + } + + /** + Returns the `ServerTrustPolicy` for the given host if applicable. + + By default, this method will return the policy that perfectly matches the given host. Subclasses could override + this method and implement more complex mapping implementations such as wildcards. + + - parameter host: The host to use when searching for a matching policy. + + - returns: The server trust policy for the given host if found. + */ + public func serverTrustPolicyForHost(host: String) -> ServerTrustPolicy? { + return policies[host] + } +} + +// MARK: - + +extension NSURLSession { + private struct AssociatedKeys { + static var ManagerKey = "NSURLSession.ServerTrustPolicyManager" + } + + var serverTrustPolicyManager: ServerTrustPolicyManager? { + get { + return objc_getAssociatedObject(self, &AssociatedKeys.ManagerKey) as? ServerTrustPolicyManager + } + set (manager) { + objc_setAssociatedObject(self, &AssociatedKeys.ManagerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + } +} + +// MARK: - ServerTrustPolicy + +/** + The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when + connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust + with a given set of criteria to determine whether the server trust is valid and the connection should be made. + + Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other + vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged + to route all communication over an HTTPS connection with pinning enabled. + + - PerformDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to + validate the host provided by the challenge. Applications are encouraged to always + validate the host in production environments to guarantee the validity of the server's + certificate chain. + + - PinCertificates: Uses the pinned certificates to validate the server trust. The server trust is + considered valid if one of the pinned certificates match one of the server certificates. + By validating both the certificate chain and host, certificate pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments. + + - PinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered + valid if one of the pinned public keys match one of the server certificate public keys. + By validating both the certificate chain and host, public key pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments. + + - DisableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. + + - CustomEvaluation: Uses the associated closure to evaluate the validity of the server trust. +*/ +public enum ServerTrustPolicy { + case PerformDefaultEvaluation(validateHost: Bool) + case PinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) + case PinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) + case DisableEvaluation + case CustomEvaluation((serverTrust: SecTrust, host: String) -> Bool) + + // MARK: - Bundle Location + + /** + Returns all certificates within the given bundle with a `.cer` file extension. + + - parameter bundle: The bundle to search for all `.cer` files. + + - returns: All certificates within the given bundle. + */ + public static func certificatesInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecCertificate] { + var certificates: [SecCertificate] = [] + + let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in + bundle.pathsForResourcesOfType(fileExtension, inDirectory: nil) + }.flatten()) + + for path in paths { + if let + certificateData = NSData(contentsOfFile: path), + certificate = SecCertificateCreateWithData(nil, certificateData) + { + certificates.append(certificate) + } + } + + return certificates + } + + /** + Returns all public keys within the given bundle with a `.cer` file extension. + + - parameter bundle: The bundle to search for all `*.cer` files. + + - returns: All public keys within the given bundle. + */ + public static func publicKeysInBundle(bundle: NSBundle = NSBundle.mainBundle()) -> [SecKey] { + var publicKeys: [SecKey] = [] + + for certificate in certificatesInBundle(bundle) { + if let publicKey = publicKeyForCertificate(certificate) { + publicKeys.append(publicKey) + } + } + + return publicKeys + } + + // MARK: - Evaluation + + /** + Evaluates whether the server trust is valid for the given host. + + - parameter serverTrust: The server trust to evaluate. + - parameter host: The host of the challenge protection space. + + - returns: Whether the server trust is valid. + */ + public func evaluateServerTrust(serverTrust: SecTrust, isValidForHost host: String) -> Bool { + var serverTrustIsValid = false + + switch self { + case let .PerformDefaultEvaluation(validateHost): + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, [policy]) + + serverTrustIsValid = trustIsValid(serverTrust) + case let .PinCertificates(pinnedCertificates, validateCertificateChain, validateHost): + if validateCertificateChain { + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, [policy]) + + SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates) + SecTrustSetAnchorCertificatesOnly(serverTrust, true) + + serverTrustIsValid = trustIsValid(serverTrust) + } else { + let serverCertificatesDataArray = certificateDataForTrust(serverTrust) + let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates) + + outerLoop: for serverCertificateData in serverCertificatesDataArray { + for pinnedCertificateData in pinnedCertificatesDataArray { + if serverCertificateData.isEqualToData(pinnedCertificateData) { + serverTrustIsValid = true + break outerLoop + } + } + } + } + case let .PinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): + var certificateChainEvaluationPassed = true + + if validateCertificateChain { + let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + SecTrustSetPolicies(serverTrust, [policy]) + + certificateChainEvaluationPassed = trustIsValid(serverTrust) + } + + if certificateChainEvaluationPassed { + outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeysForTrust(serverTrust) as [AnyObject] { + for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { + if serverPublicKey.isEqual(pinnedPublicKey) { + serverTrustIsValid = true + break outerLoop + } + } + } + } + case .DisableEvaluation: + serverTrustIsValid = true + case let .CustomEvaluation(closure): + serverTrustIsValid = closure(serverTrust: serverTrust, host: host) + } + + return serverTrustIsValid + } + + // MARK: - Private - Trust Validation + + private func trustIsValid(trust: SecTrust) -> Bool { + var isValid = false + + var result = SecTrustResultType(kSecTrustResultInvalid) + let status = SecTrustEvaluate(trust, &result) + + if status == errSecSuccess { + let unspecified = SecTrustResultType(kSecTrustResultUnspecified) + let proceed = SecTrustResultType(kSecTrustResultProceed) + + isValid = result == unspecified || result == proceed + } + + return isValid + } + + // MARK: - Private - Certificate Data + + private func certificateDataForTrust(trust: SecTrust) -> [NSData] { + var certificates: [SecCertificate] = [] + + for index in 0.. [NSData] { + return certificates.map { SecCertificateCopyData($0) as NSData } + } + + // MARK: - Private - Public Key Extraction + + private static func publicKeysForTrust(trust: SecTrust) -> [SecKey] { + var publicKeys: [SecKey] = [] + + for index in 0.. SecKey? { + var publicKey: SecKey? + + let policy = SecPolicyCreateBasicX509() + var trust: SecTrust? + let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) + + if let trust = trust where trustCreationStatus == errSecSuccess { + publicKey = SecTrustCopyPublicKey(trust) + } + + return publicKey + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift new file mode 100644 index 000000000000..e463d9b2f818 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Stream.swift @@ -0,0 +1,182 @@ +// +// Stream.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +#if !os(watchOS) + +@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) +extension Manager { + private enum Streamable { + case Stream(String, Int) + case NetService(NSNetService) + } + + private func stream(streamable: Streamable) -> Request { + var streamTask: NSURLSessionStreamTask! + + switch streamable { + case .Stream(let hostName, let port): + dispatch_sync(queue) { + streamTask = self.session.streamTaskWithHostName(hostName, port: port) + } + case .NetService(let netService): + dispatch_sync(queue) { + streamTask = self.session.streamTaskWithNetService(netService) + } + } + + let request = Request(session: session, task: streamTask) + + delegate[request.delegate.task] = request.delegate + + if startRequestsImmediately { + request.resume() + } + + return request + } + + /** + Creates a request for bidirectional streaming with the given hostname and port. + + - parameter hostName: The hostname of the server to connect to. + - parameter port: The port of the server to connect to. + + - returns: The created stream request. + */ + public func stream(hostName hostName: String, port: Int) -> Request { + return stream(.Stream(hostName, port)) + } + + /** + Creates a request for bidirectional streaming with the given `NSNetService`. + + - parameter netService: The net service used to identify the endpoint. + + - returns: The created stream request. + */ + public func stream(netService netService: NSNetService) -> Request { + return stream(.NetService(netService)) + } +} + +// MARK: - + +@available(iOS 9.0, OSX 10.11, tvOS 9.0, *) +extension Manager.SessionDelegate: NSURLSessionStreamDelegate { + + // MARK: Override Closures + + /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:readClosedForStreamTask:`. + public var streamTaskReadClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { + get { + return _streamTaskReadClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void + } + set { + _streamTaskReadClosed = newValue + } + } + + /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:writeClosedForStreamTask:`. + public var streamTaskWriteClosed: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { + get { + return _streamTaskWriteClosed as? (NSURLSession, NSURLSessionStreamTask) -> Void + } + set { + _streamTaskWriteClosed = newValue + } + } + + /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:betterRouteDiscoveredForStreamTask:`. + public var streamTaskBetterRouteDiscovered: ((NSURLSession, NSURLSessionStreamTask) -> Void)? { + get { + return _streamTaskBetterRouteDiscovered as? (NSURLSession, NSURLSessionStreamTask) -> Void + } + set { + _streamTaskBetterRouteDiscovered = newValue + } + } + + /// Overrides default behavior for NSURLSessionStreamDelegate method `URLSession:streamTask:didBecomeInputStream:outputStream:`. + public var streamTaskDidBecomeInputStream: ((NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void)? { + get { + return _streamTaskDidBecomeInputStream as? (NSURLSession, NSURLSessionStreamTask, NSInputStream, NSOutputStream) -> Void + } + set { + _streamTaskDidBecomeInputStream = newValue + } + } + + // MARK: Delegate Methods + + /** + Tells the delegate that the read side of the connection has been closed. + + - parameter session: The session. + - parameter streamTask: The stream task. + */ + public func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask) { + streamTaskReadClosed?(session, streamTask) + } + + /** + Tells the delegate that the write side of the connection has been closed. + + - parameter session: The session. + - parameter streamTask: The stream task. + */ + public func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask) { + streamTaskWriteClosed?(session, streamTask) + } + + /** + Tells the delegate that the system has determined that a better route to the host is available. + + - parameter session: The session. + - parameter streamTask: The stream task. + */ + public func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask) { + streamTaskBetterRouteDiscovered?(session, streamTask) + } + + /** + Tells the delegate that the stream task has been completed and provides the unopened stream objects. + + - parameter session: The session. + - parameter streamTask: The stream task. + - parameter inputStream: The new input stream. + - parameter outputStream: The new output stream. + */ + public func URLSession( + session: NSURLSession, + streamTask: NSURLSessionStreamTask, + didBecomeInputStream inputStream: NSInputStream, + outputStream: NSOutputStream) + { + streamTaskDidBecomeInputStream?(session, streamTask, inputStream, outputStream) + } +} + +#endif diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift new file mode 100644 index 000000000000..f34770579877 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Timeline.swift @@ -0,0 +1,138 @@ +// +// Timeline.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. +public struct Timeline { + /// The time the request was initialized. + public let requestStartTime: CFAbsoluteTime + + /// The time the first bytes were received from or sent to the server. + public let initialResponseTime: CFAbsoluteTime + + /// The time when the request was completed. + public let requestCompletedTime: CFAbsoluteTime + + /// The time when the response serialization was completed. + public let serializationCompletedTime: CFAbsoluteTime + + /// The time interval in seconds from the time the request started to the initial response from the server. + public let latency: NSTimeInterval + + /// The time interval in seconds from the time the request started to the time the request completed. + public let requestDuration: NSTimeInterval + + /// The time interval in seconds from the time the request completed to the time response serialization completed. + public let serializationDuration: NSTimeInterval + + /// The time interval in seconds from the time the request started to the time response serialization completed. + public let totalDuration: NSTimeInterval + + /** + Creates a new `Timeline` instance with the specified request times. + + - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. + - parameter initialResponseTime: The time the first bytes were received from or sent to the server. + Defaults to `0.0`. + - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. + - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults + to `0.0`. + + - returns: The new `Timeline` instance. + */ + public init( + requestStartTime: CFAbsoluteTime = 0.0, + initialResponseTime: CFAbsoluteTime = 0.0, + requestCompletedTime: CFAbsoluteTime = 0.0, + serializationCompletedTime: CFAbsoluteTime = 0.0) + { + self.requestStartTime = requestStartTime + self.initialResponseTime = initialResponseTime + self.requestCompletedTime = requestCompletedTime + self.serializationCompletedTime = serializationCompletedTime + + self.latency = initialResponseTime - requestStartTime + self.requestDuration = requestCompletedTime - requestStartTime + self.serializationDuration = serializationCompletedTime - requestCompletedTime + self.totalDuration = serializationCompletedTime - requestStartTime + } +} + +// MARK: - CustomStringConvertible + +extension Timeline: CustomStringConvertible { + /// The textual representation used when written to an output stream, which includes the latency, the request + /// duration and the total duration. + public var description: String { + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joinWithSeparator(", ") + " }" + } +} + +// MARK: - CustomDebugStringConvertible + +extension Timeline: CustomDebugStringConvertible { + /// The textual representation used when written to an output stream, which includes the request start time, the + /// initial response time, the request completed time, the serialization completed time, the latency, the request + /// duration and the total duration. + public var debugDescription: String { + let requestStartTime = String(format: "%.3f", self.requestStartTime) + let initialResponseTime = String(format: "%.3f", self.initialResponseTime) + let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) + let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) + let latency = String(format: "%.3f", self.latency) + let requestDuration = String(format: "%.3f", self.requestDuration) + let serializationDuration = String(format: "%.3f", self.serializationDuration) + let totalDuration = String(format: "%.3f", self.totalDuration) + + // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is + // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. + let timings = [ + "\"Request Start Time\": " + requestStartTime, + "\"Initial Response Time\": " + initialResponseTime, + "\"Request Completed Time\": " + requestCompletedTime, + "\"Serialization Completed Time\": " + serializationCompletedTime, + "\"Latency\": " + latency + " secs", + "\"Request Duration\": " + requestDuration + " secs", + "\"Serialization Duration\": " + serializationDuration + " secs", + "\"Total Duration\": " + totalDuration + " secs" + ] + + return "Timeline: { " + timings.joinWithSeparator(", ") + " }" + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift new file mode 100644 index 000000000000..21971e6e4657 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Upload.swift @@ -0,0 +1,376 @@ +// +// Upload.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Manager { + private enum Uploadable { + case Data(NSURLRequest, NSData) + case File(NSURLRequest, NSURL) + case Stream(NSURLRequest, NSInputStream) + } + + private func upload(uploadable: Uploadable) -> Request { + var uploadTask: NSURLSessionUploadTask! + var HTTPBodyStream: NSInputStream? + + switch uploadable { + case .Data(let request, let data): + dispatch_sync(queue) { + uploadTask = self.session.uploadTaskWithRequest(request, fromData: data) + } + case .File(let request, let fileURL): + dispatch_sync(queue) { + uploadTask = self.session.uploadTaskWithRequest(request, fromFile: fileURL) + } + case .Stream(let request, let stream): + dispatch_sync(queue) { + uploadTask = self.session.uploadTaskWithStreamedRequest(request) + } + + HTTPBodyStream = stream + } + + let request = Request(session: session, task: uploadTask) + + if HTTPBodyStream != nil { + request.delegate.taskNeedNewBodyStream = { _, _ in + return HTTPBodyStream + } + } + + delegate[request.delegate.task] = request.delegate + + if startRequestsImmediately { + request.resume() + } + + return request + } + + // MARK: File + + /** + Creates a request for uploading a file to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request + - parameter file: The file to upload + + - returns: The created upload request. + */ + public func upload(URLRequest: URLRequestConvertible, file: NSURL) -> Request { + return upload(.File(URLRequest.URLRequest, file)) + } + + /** + Creates a request for uploading a file to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter file: The file to upload + + - returns: The created upload request. + */ + public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + file: NSURL) + -> Request + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + return upload(mutableURLRequest, file: file) + } + + // MARK: Data + + /** + Creates a request for uploading data to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request. + - parameter data: The data to upload. + + - returns: The created upload request. + */ + public func upload(URLRequest: URLRequestConvertible, data: NSData) -> Request { + return upload(.Data(URLRequest.URLRequest, data)) + } + + /** + Creates a request for uploading data to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter data: The data to upload + + - returns: The created upload request. + */ + public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + data: NSData) + -> Request + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + + return upload(mutableURLRequest, data: data) + } + + // MARK: Stream + + /** + Creates a request for uploading a stream to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request. + - parameter stream: The stream to upload. + + - returns: The created upload request. + */ + public func upload(URLRequest: URLRequestConvertible, stream: NSInputStream) -> Request { + return upload(.Stream(URLRequest.URLRequest, stream)) + } + + /** + Creates a request for uploading a stream to the specified URL request. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter stream: The stream to upload. + + - returns: The created upload request. + */ + public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + stream: NSInputStream) + -> Request + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + + return upload(mutableURLRequest, stream: stream) + } + + // MARK: MultipartFormData + + /// Default memory threshold used when encoding `MultipartFormData`. + public static let MultipartFormDataEncodingMemoryThreshold: UInt64 = 10 * 1024 * 1024 + + /** + Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as + associated values. + + - Success: Represents a successful `MultipartFormData` encoding and contains the new `Request` along with + streaming information. + - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding + error. + */ + public enum MultipartFormDataEncodingResult { + case Success(request: Request, streamingFromDisk: Bool, streamFileURL: NSURL?) + case Failure(ErrorType) + } + + /** + Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. + + It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + used for larger payloads such as video content. + + The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + technique was used. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter method: The HTTP method. + - parameter URLString: The URL string. + - parameter headers: The HTTP headers. `nil` by default. + - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + `MultipartFormDataEncodingMemoryThreshold` by default. + - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + */ + public func upload( + method: Method, + _ URLString: URLStringConvertible, + headers: [String: String]? = nil, + multipartFormData: MultipartFormData -> Void, + encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, + encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) + { + let mutableURLRequest = URLRequest(method, URLString, headers: headers) + + return upload( + mutableURLRequest, + multipartFormData: multipartFormData, + encodingMemoryThreshold: encodingMemoryThreshold, + encodingCompletion: encodingCompletion + ) + } + + /** + Encodes the `MultipartFormData` and creates a request to upload the result to the specified URL request. + + It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative + payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + used for larger payloads such as video content. + + The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + technique was used. + + If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. + + - parameter URLRequest: The URL request. + - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. + - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. + `MultipartFormDataEncodingMemoryThreshold` by default. + - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. + */ + public func upload( + URLRequest: URLRequestConvertible, + multipartFormData: MultipartFormData -> Void, + encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, + encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) + { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { + let formData = MultipartFormData() + multipartFormData(formData) + + let URLRequestWithContentType = URLRequest.URLRequest + URLRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") + + let isBackgroundSession = self.session.configuration.identifier != nil + + if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { + do { + let data = try formData.encode() + let encodingResult = MultipartFormDataEncodingResult.Success( + request: self.upload(URLRequestWithContentType, data: data), + streamingFromDisk: false, + streamFileURL: nil + ) + + dispatch_async(dispatch_get_main_queue()) { + encodingCompletion?(encodingResult) + } + } catch { + dispatch_async(dispatch_get_main_queue()) { + encodingCompletion?(.Failure(error as NSError)) + } + } + } else { + let fileManager = NSFileManager.defaultManager() + let tempDirectoryURL = NSURL(fileURLWithPath: NSTemporaryDirectory()) + let directoryURL = tempDirectoryURL.URLByAppendingPathComponent("com.alamofire.manager/multipart.form.data") + let fileName = NSUUID().UUIDString + let fileURL = directoryURL.URLByAppendingPathComponent(fileName) + + do { + try fileManager.createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil) + try formData.writeEncodedDataToDisk(fileURL) + + dispatch_async(dispatch_get_main_queue()) { + let encodingResult = MultipartFormDataEncodingResult.Success( + request: self.upload(URLRequestWithContentType, file: fileURL), + streamingFromDisk: true, + streamFileURL: fileURL + ) + encodingCompletion?(encodingResult) + } + } catch { + dispatch_async(dispatch_get_main_queue()) { + encodingCompletion?(.Failure(error as NSError)) + } + } + } + } + } +} + +// MARK: - + +extension Request { + + // MARK: - UploadTaskDelegate + + class UploadTaskDelegate: DataTaskDelegate { + var uploadTask: NSURLSessionUploadTask? { return task as? NSURLSessionUploadTask } + var uploadProgress: ((Int64, Int64, Int64) -> Void)! + + // MARK: - NSURLSessionTaskDelegate + + // MARK: Override Closures + + var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)? + + // MARK: Delegate Methods + + func URLSession( + session: NSURLSession, + task: NSURLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) + { + if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } + + if let taskDidSendBodyData = taskDidSendBodyData { + taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) + } else { + progress.totalUnitCount = totalBytesExpectedToSend + progress.completedUnitCount = totalBytesSent + + uploadProgress?(bytesSent, totalBytesSent, totalBytesExpectedToSend) + } + } + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift new file mode 100644 index 000000000000..b94e07d1e4eb --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -0,0 +1,214 @@ +// +// Validation.swift +// +// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Request { + + /** + Used to represent whether validation was successful or encountered an error resulting in a failure. + + - Success: The validation was successful. + - Failure: The validation failed encountering the provided error. + */ + public enum ValidationResult { + case Success + case Failure(NSError) + } + + /** + A closure used to validate a request that takes a URL request and URL response, and returns whether the + request was valid. + */ + public typealias Validation = (NSURLRequest?, NSHTTPURLResponse) -> ValidationResult + + /** + Validates the request, using the specified closure. + + If validation fails, subsequent calls to response handlers will have an associated error. + + - parameter validation: A closure to validate the request. + + - returns: The request. + */ + public func validate(validation: Validation) -> Self { + delegate.queue.addOperationWithBlock { + if let + response = self.response where self.delegate.error == nil, + case let .Failure(error) = validation(self.request, response) + { + self.delegate.error = error + } + } + + return self + } + + // MARK: - Status Code + + /** + Validates that the response has a status code in the specified range. + + If validation fails, subsequent calls to response handlers will have an associated error. + + - parameter range: The range of acceptable status codes. + + - returns: The request. + */ + public func validate(statusCode acceptableStatusCode: S) -> Self { + return validate { _, response in + if acceptableStatusCode.contains(response.statusCode) { + return .Success + } else { + let failureReason = "Response status code was unacceptable: \(response.statusCode)" + + let error = NSError( + domain: Error.Domain, + code: Error.Code.StatusCodeValidationFailed.rawValue, + userInfo: [ + NSLocalizedFailureReasonErrorKey: failureReason, + Error.UserInfoKeys.StatusCode: response.statusCode + ] + ) + + return .Failure(error) + } + } + } + + // MARK: - Content-Type + + private struct MIMEType { + let type: String + let subtype: String + + init?(_ string: String) { + let components: [String] = { + let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) + let split = stripped.substringToIndex(stripped.rangeOfString(";")?.startIndex ?? stripped.endIndex) + return split.componentsSeparatedByString("/") + }() + + if let + type = components.first, + subtype = components.last + { + self.type = type + self.subtype = subtype + } else { + return nil + } + } + + func matches(MIME: MIMEType) -> Bool { + switch (type, subtype) { + case (MIME.type, MIME.subtype), (MIME.type, "*"), ("*", MIME.subtype), ("*", "*"): + return true + default: + return false + } + } + } + + /** + Validates that the response has a content type in the specified array. + + If validation fails, subsequent calls to response handlers will have an associated error. + + - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. + + - returns: The request. + */ + public func validate(contentType acceptableContentTypes: S) -> Self { + return validate { _, response in + guard let validData = self.delegate.data where validData.length > 0 else { return .Success } + + if let + responseContentType = response.MIMEType, + responseMIMEType = MIMEType(responseContentType) + { + for contentType in acceptableContentTypes { + if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { + return .Success + } + } + } else { + for contentType in acceptableContentTypes { + if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" { + return .Success + } + } + } + + let contentType: String + let failureReason: String + + if let responseContentType = response.MIMEType { + contentType = responseContentType + + failureReason = ( + "Response content type \"\(responseContentType)\" does not match any acceptable " + + "content types: \(acceptableContentTypes)" + ) + } else { + contentType = "" + failureReason = "Response content type was missing and acceptable content type does not match \"*/*\"" + } + + let error = NSError( + domain: Error.Domain, + code: Error.Code.ContentTypeValidationFailed.rawValue, + userInfo: [ + NSLocalizedFailureReasonErrorKey: failureReason, + Error.UserInfoKeys.ContentType: contentType + ] + ) + + return .Failure(error) + } + } + + // MARK: - Automatic + + /** + Validates that the response has a status code in the default acceptable range of 200...299, and that the content + type matches any specified in the Accept HTTP header field. + + If validation fails, subsequent calls to response handlers will have an associated error. + + - returns: The request. + */ + public func validate() -> Self { + let acceptableStatusCodes: Range = 200..<300 + let acceptableContentTypes: [String] = { + if let accept = request?.valueForHTTPHeaderField("Accept") { + return accept.componentsSeparatedByString(",") + } + + return ["*/*"] + }() + + return validate(statusCode: acceptableStatusCodes).validate(contentType: acceptableContentTypes) + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json new file mode 100644 index 000000000000..b0f254bb81c2 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Local Podspecs/PetstoreClient.podspec.json @@ -0,0 +1,25 @@ +{ + "name": "PetstoreClient", + "platforms": { + "ios": "8.0", + "osx": "10.9" + }, + "version": "0.0.1", + "source": { + "git": "git@github.com:swagger-api/swagger-mustache.git", + "tag": "v1.0.0" + }, + "authors": "", + "license": "Proprietary", + "homepage": "https://github.com/swagger-api/swagger-codegen", + "summary": "PetstoreClient", + "source_files": "PetstoreClient/Classes/Swaggers/**/*.swift", + "dependencies": { + "PromiseKit": [ + "~> 3.1.1" + ], + "Alamofire": [ + "~> 3.4.1" + ] + } +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock new file mode 100644 index 000000000000..f63b50721dde --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Manifest.lock @@ -0,0 +1,41 @@ +PODS: + - Alamofire (3.4.2) + - OMGHTTPURLRQ (3.1.3): + - OMGHTTPURLRQ/RQ (= 3.1.3) + - OMGHTTPURLRQ/FormURLEncode (3.1.3) + - OMGHTTPURLRQ/RQ (3.1.3): + - OMGHTTPURLRQ/FormURLEncode + - OMGHTTPURLRQ/UserAgent + - OMGHTTPURLRQ/UserAgent (3.1.3) + - PetstoreClient (0.0.1): + - Alamofire (~> 3.4.1) + - PromiseKit (~> 3.1.1) + - PromiseKit (3.1.1): + - PromiseKit/Foundation (= 3.1.1) + - PromiseKit/QuartzCore (= 3.1.1) + - PromiseKit/UIKit (= 3.1.1) + - PromiseKit/CorePromise (3.1.1) + - PromiseKit/Foundation (3.1.1): + - OMGHTTPURLRQ (~> 3.1.0) + - PromiseKit/CorePromise + - PromiseKit/QuartzCore (3.1.1): + - PromiseKit/CorePromise + - PromiseKit/UIKit (3.1.1): + - PromiseKit/CorePromise + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + Alamofire: 6aa33201d20d069e1598891cf928883ff1888c7a + OMGHTTPURLRQ: a547be1b9721ddfbf9d08aab56ab72dc4c1cc417 + PetstoreClient: c1836ff59f46bfeae155be0b53bc9ba55b827bc9 + PromiseKit: 4e8127c22a9b29d1b44958ab2ec762ea6115cbfb + +PODFILE CHECKSUM: 84472aca2a88b7f7ed9fcd63e9f5fdb5ad4aab94 + +COCOAPODS: 1.1.1 diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 000000000000..0428f9c6d062 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,1662 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 009A705EB41A7BD11E77200CD1FB65CC /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */; }; + 029AC3390FBF6FE9A66FC3D937065ED8 /* UIActionSheet+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 061D9A45538674253A809E070A8A089D /* UIViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */; }; + 086EF9C01D071D88D853A11539D42B9F /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F0266C5AE0B23A436291F6647902086 /* Models.swift */; }; + 0DB7734F8CD7D40D922F73C1C9146EE4 /* OMGFormURLEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 13C8FE870121B96B85458487D176292A /* OMGUserAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 162CFCD9335EB4583A6247A6116FEB0D /* NSURLConnection+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 19481BE7602C732E16A4C1FDE7D800DA /* NSURLConnection+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */; }; + 1B3395001A4E5AB2E7EEEFE9964348B5 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E49ED544745AD479AFA0B6766F441CE /* after.swift */; }; + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2192B0DEE9028936168890C1D6EB0259 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = 770621722C3B98D9380F76F3310EAA7F /* Download.swift */; }; + 21B837E7DB2A98D7B3E2D64AABA828F2 /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */; }; + 23FFDF15FBA1EC26909CB3BC5CCEB3A8 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */; }; + 258F28EA87BCDBE2307CD728D6847F44 /* OMGHTTPURLRQ.h in Headers */ = {isa = PBXBuildFile; fileRef = 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 28AF3FD0C6798D6A36A13C2AB39F8239 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F60254382C7024DDFD16533FB81750A /* Result.swift */; }; + 2A926E5EA0483C43023F396648F31100 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */; }; + 2C65AE47419BA083958A5D9F760F7150 /* OMGHTTPURLRQ-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */; }; + 2E3A55DBE5D58E6E6B3068D0BF84BA42 /* OMGUserAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2FF723F26615EB2ACAE54BDA6E3707DC /* Pods-SwaggerClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */; }; + 31D35FA0B2173504DBA8E2F450CAC665 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */; }; + 31F8B86E3672D0B828B6352C875649C4 /* Pods-SwaggerClientTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 32A893A9FE628EDBC482D40F753699F9 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */; }; + 3360421DE3672EDEC5D92072E5FB3DEA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + 33D7D29D9E53DA84337D305017107505 /* PetstoreClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3FE36566EFBFEFABC46589686A7ADCD2 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435721889B71489503A007D233559DF /* Validation.swift */; }; + 4CDF7F31FC91171478EC0A2E2AB4E758 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */; }; + 5344CCD94F668BD41A0417B3A3CDF4F2 /* OMGFormURLEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 54BAF231DB704DB87968C54637AF9551 /* PetstoreClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */; }; + 55F5CB213AA2AE0675636AC73B7D7FB1 /* OMGHTTPURLRQ.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 563431FCE9268B58BFD2F32E358673C6 /* UIAlertView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */; }; + 57BFFADED3A561DB8420A8B74A5A57BB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */; }; + 58597FACD9B948EB5E4EB1A96E84F9DE /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */; }; + 5919AA12FFE36B8D4D60D7032547A2B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + 5C067F2478F7DD077A0496925F57CE8C /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5ECBDDFA4329B4AB812B4A10DBD2EB1A /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */; }; + 5F193AFDA8E41A904D4B657769F49A93 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */; }; + 629C5CA00E2A6A40D7AEF34A7FD7772F /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66130A4C8A83C11558EC154FA1C9D191 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 4765491FCD8E096D84D4E57E005B8B49 /* after.m */; }; + 689CD9721F90D45A57369D76461CA5E2 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */; }; + 68B6B55AA10FA42481892FE79996D4F0 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */; }; + 6ADCA5D4BB1C66A8FC959C38CAEA4488 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6FA4548F5D2921C78F45295A21147A04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + 74231A47F9018E69CB8390B3BD9815B8 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 955F5499BB7496155FBF443B524F1D50 /* hang.m */; }; + 7519B50597E2DC5B47FC6927BA94D3A7 /* NSError+Cancellation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7546CDAE72452E874E5DB53099BF3E70 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */; }; + 7892B90D39A86C32BD7ECFF8F6C52A38 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3192434754120C2AAF44818AEE054B /* Request.swift */; }; + 7A2A45654491E53EA0DF0C7749C7D6BB /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */; }; + 7EC6F570997E9A0CC65AD7E7E319C0EF /* Promise+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */; }; + 7F89336AE817C0C79287405B01352B8F /* OMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */; }; + 8179D1D51A9219B01C0C007F96F02F33 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */; }; + 897985FA042CD12B825C3032898FAB26 /* Pods-SwaggerClientTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */; }; + 8A858C9291A59130A4A3AE2FB193E480 /* UIAlertView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */; }; + 8ADEA58D7C48EC4973D667F87C5AE948 /* URLDataPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */; }; + 8BC2037248D2FA8B2E2475AC2E466494 /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */; }; + 98971D531D9D7138ED04B55FE458D66D /* NSURLConnection+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */; }; + 989ED6D4ECDEF446FB68EFF07F0CBEF5 /* PromiseKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */; }; + 98C216E54478D7F70674111361A4DB7E /* Pods-SwaggerClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9B70D1F82BB1FA9EAEF67815AB211B47 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */; }; + 9C88873949B0DCF8A580D0F65A43A482 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */; }; + 9E16513086BC96F16B7F73065AE84AC4 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */; }; + A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + A3C3B39CE3715B4260DC6FF0B621C142 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */; }; + A3D61ED4990E52E06A3315F2A9A00C6D /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */; }; + AF02896B7B6B213C98324CD75871275A /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */; }; + AF1AE4A9DCBCD5BEA4818AB39C73F2FB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */; }; + B067653C1D7B7214CD0079A279326610 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */; }; + B1A09AAC19DAB39B1C7F172CEBF0AAAD /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */; }; + B924DB98A633A09B12A6226F75261F83 /* Stream.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */; }; + BF43C103A91BDDC98FA10577CBA76D8B /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C2249D68F55536B774806E6ED01D3431 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */; }; + C3EC2C7BE760D6CEE606445A1AE2E071 /* dispatch_promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */; }; + C5938D7FB0EC73BE33F4A6B31BE937B9 /* join.swift in Sources */ = {isa = PBXBuildFile; fileRef = BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */; }; + C884C9ADEA7330CF670815C9689FBBD9 /* UIActionSheet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */; }; + CEE2E4C0A2875A6C0CA9BB46572D6224 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */; }; + CEF24FA13891DB5422B2DAF72DE83A9A /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */; }; + D02588110E13C2C2F223EAE690848951 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */; }; + D13DFBC6575E7DB809A1420CB9F920B5 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */; }; + D2230D11A1EE4A48E9EC72EA44D09EAC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */; }; + D32130A2C8AC5B1FF21AF43BCC2B5217 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + D3A23B867EBFCD3AC86370D26250C290 /* OMGHTTPURLRQ-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D509E607CAE14D8848E2BBAC478BEED5 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB573F3C977C55072704AA24EC06164 /* Promise.swift */; }; + D5ECD91CE99A115543BEC3B993C11BD3 /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */; }; + D733EB627BBBA34769C0CDEF5ABE0E41 /* UIActionSheet+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */; }; + DB9ED067DD1525127DFBE4B5647E502C /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */; }; + E5E62E286336AB2FBB84501E1ACEEE7C /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */; }; + E7D7EF4C9B8164062D3C5E6EA7C534C2 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */; }; + E968D568838BC789817F6009838349A3 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */; }; + EC284D0372D446702CC9585351E4027D /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */; }; + ECD1DE9F631F8BCD514213BF97385BAE /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */; }; + EECED5D6A7CD41D58DF352339C8C4844 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */; }; + EF45D47D7EBC09983C83946F2BB75C92 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EF4BCB7BBAB19687FAD3A5A71C859A7F /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */; }; + EF9B6103AC1A233089E5317B1E2D8031 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8072E1108951F272C003553FC8926C7 /* APIs.swift */; }; + F38E53627E8AD5C92AF674C15A3A2493 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C307C0A58A490D3080DB4C1E745C973 /* when.m */; }; + F6BC9BD76DB32C32BFDAD6582DC9F9B0 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */; }; + F84E18C37A7B3B8A338E817574491335 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */; }; + F986101B7E81C6AABC67FF43C958D54A /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */; }; + FADE7DCB53BC63ECC585A5192BC15843 /* Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FC438D87EC736F347E1068A05360974E /* UIAlertView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FCA5211A7610129D1EAFC03D5F5351D2 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */; }; + FCB8ADBF2A01486B7D575EA3326A70BD /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */; }; + FCDEC7CF7180ECD18CA73EB08EA4624D /* PMKAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */; }; + FF2BDB83CB6FE636673DD089D26FBCB8 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 094864AE73DBB274F1E39300864E9C62 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1FCDFB2162BF49E98CC34F69A4EB87B9; + remoteInfo = PromiseKit; + }; + 1F4208A7D556EA95487DDE364B0345D5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6AA38233456D5A22BF4E286D26DBBC53; + remoteInfo = PetstoreClient; + }; + 26F113882698B5132DB9F4537EF58E9A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; + }; + 65851406A9AA058E6966942F3A75BEFB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5AD1507205D908987C216D989FDDD0CD; + remoteInfo = OMGHTTPURLRQ; + }; + CC71B8F089BD4B650825DDAA5DB71E07 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; + }; + E66AC3FE6854646CAC1BEA7B966F17B0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1FCDFB2162BF49E98CC34F69A4EB87B9; + remoteInfo = PromiseKit; + }; + FB51D93BE6962BF86154BCCE6C6161E9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5AD1507205D908987C216D989FDDD0CD; + remoteInfo = OMGHTTPURLRQ; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = ""; }; + 02F28E719AA874BE9213D6CF8CE7E36B /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = ""; }; + 0435721889B71489503A007D233559DF /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PMKAlertController.swift; path = Categories/UIKit/PMKAlertController.swift; sourceTree = ""; }; + 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLDataPromise.swift; path = Sources/URLDataPromise.swift; sourceTree = ""; }; + 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + 11683764D40FE241FCEEB379EE92E817 /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = ""; }; + 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Categories/UIKit/UIView+AnyPromise.h"; sourceTree = ""; }; + 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Categories/Foundation/afterlife.swift; sourceTree = ""; }; + 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Manager.swift; path = Source/Manager.swift; sourceTree = ""; }; + 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; + 1F60254382C7024DDFD16533FB81750A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; + 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; + 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = ""; }; + 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PromiseKit.xcconfig; sourceTree = ""; }; + 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSError+Cancellation.h"; path = "Sources/NSError+Cancellation.h"; sourceTree = ""; }; + 2FF17440CCD2E1A69791A4AA23325AD5 /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = ""; }; + 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OMGHTTPURLRQ-umbrella.h"; sourceTree = ""; }; + 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = ""; }; + 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = State.swift; path = Sources/State.swift; sourceTree = ""; }; + 3E49ED544745AD479AFA0B6766F441CE /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; + 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; + 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClient-umbrella.h"; sourceTree = ""; }; + 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/OMGHTTPURLRQ.m; sourceTree = ""; }; + 3F16B43ABD2C8CD4A311AA1AB3B6C02F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 43FC49AA70D3E2A84CAED9C37BE9C4B5 /* Pods-SwaggerClientTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClientTests-frameworks.sh"; sourceTree = ""; }; + 467F288FF1A023115720F192FD4D9297 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; + 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PetstoreClient-dummy.m"; sourceTree = ""; }; + 4765491FCD8E096D84D4E57E005B8B49 /* after.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; + 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AnyPromise.h"; path = "Categories/UIKit/UIAlertView+AnyPromise.h"; sourceTree = ""; }; + 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = ""; }; + 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Categories/UIKit/UIViewController+AnyPromise.m"; sourceTree = ""; }; + 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/OMGFormURLEncode.m; sourceTree = ""; }; + 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIActionSheet+AnyPromise.h"; path = "Categories/UIKit/UIActionSheet+AnyPromise.h"; sourceTree = ""; }; + 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Categories/Foundation/NSURLSession+Promise.swift"; sourceTree = ""; }; + 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Categories/UIKit/UIView+Promise.swift"; sourceTree = ""; }; + 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Categories/Foundation/NSObject+Promise.swift"; sourceTree = ""; }; + 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = ""; }; + 705D1370384B46A3E5A39B39E7B4D181 /* OMGHTTPURLRQ-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OMGHTTPURLRQ-prefix.pch"; sourceTree = ""; }; + 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; + 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Source/Error.swift; sourceTree = ""; }; + 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 770621722C3B98D9380F76F3310EAA7F /* Download.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Download.swift; path = Source/Download.swift; sourceTree = ""; }; + 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Categories/Foundation/NSNotificationCenter+Promise.swift"; sourceTree = ""; }; + 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Categories/UIKit/UIViewController+AnyPromise.h"; sourceTree = ""; }; + 7C8E63660D346FD8ED2A97242E74EA09 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7D3192434754120C2AAF44818AEE054B /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 835E52C658674D7A44ED95B966432726 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; + 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/OMGHTTPURLRQ.h; sourceTree = ""; }; + 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = dispatch_promise.swift; path = Sources/dispatch_promise.swift; sourceTree = ""; }; + 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIAlertView+Promise.swift"; path = "Categories/UIKit/UIAlertView+Promise.swift"; sourceTree = ""; }; + 8F0266C5AE0B23A436291F6647902086 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 8F8078A9DEC41CD886A8676D889912A4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OMGHTTPURLRQ-dummy.m"; sourceTree = ""; }; + 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSURLConnection+Promise.swift"; path = "Categories/Foundation/NSURLConnection+Promise.swift"; sourceTree = ""; }; + 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/OMGUserAgent.m; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 94F9363EEBC7855FA6B9A6B7485D5170 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + 955F5499BB7496155FBF443B524F1D50 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; + 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OMGHTTPURLRQ.framework; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9C307C0A58A490D3080DB4C1E745C973 /* when.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; + 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-umbrella.h"; sourceTree = ""; }; + 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AnyPromise.m"; path = "Categories/UIKit/UIAlertView+AnyPromise.m"; sourceTree = ""; }; + A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Upload.swift; path = Source/Upload.swift; sourceTree = ""; }; + AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = ""; }; + B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Umbrella.h; path = Sources/Umbrella.h; sourceTree = ""; }; + B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+Properties.swift"; path = "Sources/Promise+Properties.swift"; sourceTree = ""; }; + B349821C1F2B2C5F593BC228C462C99D /* OMGHTTPURLRQ.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = OMGHTTPURLRQ.modulemap; sourceTree = ""; }; + B3A144887C8B13FD888B76AB096B0CA1 /* PetstoreClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PetstoreClient-prefix.pch"; sourceTree = ""; }; + B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewController+Promise.swift"; path = "Categories/UIKit/UIViewController+Promise.swift"; sourceTree = ""; }; + BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stream.swift; path = Source/Stream.swift; sourceTree = ""; }; + BCF2D4DFF08D2A18E8C8FE4C4B4633FB /* Pods-SwaggerClient-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-frameworks.sh"; sourceTree = ""; }; + BDEAF9E48610133B23BB992381D0E22B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = join.swift; path = Sources/join.swift; sourceTree = ""; }; + CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIActionSheet+AnyPromise.m"; path = "Categories/UIKit/UIActionSheet+AnyPromise.m"; sourceTree = ""; }; + CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + D2841E5E2183846280B97F6E660DA26C /* Pods-SwaggerClient-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-resources.sh"; sourceTree = ""; }; + D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + D3A577E7C7DF4A2157D9001CA0D40A72 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PromiseKit.modulemap; sourceTree = ""; }; + D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; + D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + D8072E1108951F272C003553FC8926C7 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSURLConnection+AnyPromise.m"; path = "Categories/Foundation/NSURLConnection+AnyPromise.m"; sourceTree = ""; }; + DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PetstoreClient.xcconfig; sourceTree = ""; }; + DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Categories/Foundation/NSNotificationCenter+AnyPromise.m"; sourceTree = ""; }; + DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CALayer+AnyPromise.m"; path = "Categories/QuartzCore/CALayer+AnyPromise.m"; sourceTree = ""; }; + DDB573F3C977C55072704AA24EC06164 /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; + DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIActionSheet+Promise.swift"; path = "Categories/UIKit/UIActionSheet+Promise.swift"; sourceTree = ""; }; + DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClient.modulemap"; sourceTree = ""; }; + DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; + DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; + E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSURLConnection+AnyPromise.h"; path = "Categories/Foundation/NSURLConnection+AnyPromise.h"; sourceTree = ""; }; + E1E4BCB344D3C100253B24B79421F00A /* Pods-SwaggerClient-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClient-acknowledgements.plist"; sourceTree = ""; }; + E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; + E3D1141B63DF38660CD6F3AC588A782B /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PetstoreClient.modulemap; sourceTree = ""; }; + E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CALayer+AnyPromise.h"; path = "Categories/QuartzCore/CALayer+AnyPromise.h"; sourceTree = ""; }; + E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + E4E6F4A58FE7868CA2177D3AC79AD2FA /* Pods-SwaggerClientTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClientTests-resources.sh"; sourceTree = ""; }; + E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OMGHTTPURLRQ.xcconfig; sourceTree = ""; }; + EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Categories/UIKit/UIView+AnyPromise.m"; sourceTree = ""; }; + EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; + EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Categories/Foundation/NSNotificationCenter+AnyPromise.h"; sourceTree = ""; }; + F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + F0D4E00A8974E74325E9E53D456F9AD4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwaggerClientTests-umbrella.h"; sourceTree = ""; }; + F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FB170EFD14935F121CDE3211DB4C5CA3 /* Pods-SwaggerClientTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClientTests-acknowledgements.markdown"; sourceTree = ""; }; + FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 364E2313E2B201E3BBE0ED3C8DDF7812 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6FA4548F5D2921C78F45295A21147A04 /* Foundation.framework in Frameworks */, + 7F89336AE817C0C79287405B01352B8F /* OMGHTTPURLRQ.framework in Frameworks */, + 57BFFADED3A561DB8420A8B74A5A57BB /* QuartzCore.framework in Frameworks */, + AF1AE4A9DCBCD5BEA4818AB39C73F2FB /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 87AF7EC7404199AC8C5D22375A6059BF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D32130A2C8AC5B1FF21AF43BCC2B5217 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 93A52D8380E47350C27ABFF726B0EE7D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3360421DE3672EDEC5D92072E5FB3DEA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 99195E4207764744AEC07ECCBCD550EB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BC1E0CC70F02685289292200DADFB7F0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A2A45654491E53EA0DF0C7749C7D6BB /* Alamofire.framework in Frameworks */, + 5919AA12FFE36B8D4D60D7032547A2B5 /* Foundation.framework in Frameworks */, + 23FFDF15FBA1EC26909CB3BC5CCEB3A8 /* PromiseKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BCD2EA67C3EE2725B5C1EEADB0F66AF4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EECED5D6A7CD41D58DF352339C8C4844 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00ED77B3FFE891B16DC5B4DD2FCC0408 /* UserAgent */ = { + isa = PBXGroup; + children = ( + 4FF818D195F8814F5F8878A2FD02AF1D /* OMGUserAgent.h */, + 937CB6976C5F585A76A9383107F5AF73 /* OMGUserAgent.m */, + ); + name = UserAgent; + sourceTree = ""; + }; + 01A9CB10E1E9A90B6A796034AF093E8C /* Products */ = { + isa = PBXGroup; + children = ( + F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */, + 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */, + FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */, + CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */, + FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */, + 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */, + ); + name = Products; + sourceTree = ""; + }; + 1322FED69118C64DAD026CAF7F4C38C6 /* Models */ = { + isa = PBXGroup; + children = ( + D4DF0604EDC1460935E6E445A47023A4 /* Category.swift */, + 0A545673F09F49CDD60A13B4B0AF1020 /* Order.swift */, + 284B3DE9B793FCC633E971DB1798AFAF /* Pet.swift */, + 211F73A46D90346F7FC6D0D29640EE4F /* Tag.swift */, + 5B248364ABF60ACD7DB31A17DCFDFD0C /* User.swift */, + ); + name = Models; + path = Models; + sourceTree = ""; + }; + 188F1582EFF9CD3E8AB3A7470820B51F /* PromiseKit */ = { + isa = PBXGroup; + children = ( + 72B5E9FE2F2C23CD28C86A837D09964A /* CorePromise */, + 79A7166061336F6A7FF214DB285A9584 /* Foundation */, + 2115C8F445286DAD6754A21C2ABE2E78 /* QuartzCore */, + 977CD7DB18C38452FB8DCFCEC690CBDE /* Support Files */, + 933F0A2EBD44D53190D1E9FAF3F54AFB /* UIKit */, + ); + name = PromiseKit; + path = PromiseKit; + sourceTree = ""; + }; + 2115C8F445286DAD6754A21C2ABE2E78 /* QuartzCore */ = { + isa = PBXGroup; + children = ( + E48946E76C93EE81F20C76C0EE272B8E /* CALayer+AnyPromise.h */, + DD83C2B5FF3BF5AB85E18B1BB6293857 /* CALayer+AnyPromise.m */, + ); + name = QuartzCore; + sourceTree = ""; + }; + 22F52349E1BE90FC6E064DAAC9EA9612 /* Development Pods */ = { + isa = PBXGroup; + children = ( + E9F8459055B900A58FB97600A53E5D1C /* PetstoreClient */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 27098387544928716460DD8F5024EE8A /* Pods */ = { + isa = PBXGroup; + children = ( + 41488276780D879BE61AA0617BDC29A0 /* Alamofire */, + 6C55196C7E1A0F95D0BEFD790EA1450C /* OMGHTTPURLRQ */, + 188F1582EFF9CD3E8AB3A7470820B51F /* PromiseKit */, + ); + name = Pods; + sourceTree = ""; + }; + 41488276780D879BE61AA0617BDC29A0 /* Alamofire */ = { + isa = PBXGroup; + children = ( + FDA7C65B58A0E739E615FA7A750AA0AD /* Alamofire.swift */, + 770621722C3B98D9380F76F3310EAA7F /* Download.swift */, + 7390892336E4D605CF390FFA4B55EF0A /* Error.swift */, + 1AA002805CE140B0968FC965A53F0A4C /* Manager.swift */, + CA79CBD1DDA33C45473F8807605719BC /* MultipartFormData.swift */, + FFB0686D05BA9C4D5A69D6058C029FF2 /* NetworkReachabilityManager.swift */, + 9519BB8B059D8A17CE43587EB6EFA61D /* Notifications.swift */, + E4B2CF9B72BC56E74E6B0037BDE92031 /* ParameterEncoding.swift */, + 7D3192434754120C2AAF44818AEE054B /* Request.swift */, + 74E1D5C24530737CDD54FA854E37B371 /* Response.swift */, + DA62734652B80C3897AA655226B3BCF3 /* ResponseSerialization.swift */, + 1F60254382C7024DDFD16533FB81750A /* Result.swift */, + 8D1D96AB285E285A3CC15FAD1CD875B2 /* ServerTrustPolicy.swift */, + BCC88BB5150F5865EE3017D1B9AB4CF5 /* Stream.swift */, + 47B728204DA3D60FAB04A757D3B09D2E /* Timeline.swift */, + A9E0C3DC76C639C91EF9B920C8E3D60F /* Upload.swift */, + 0435721889B71489503A007D233559DF /* Validation.swift */, + DFFDACE0170FB00C7ECFDA52A87A7665 /* Support Files */, + ); + name = Alamofire; + path = Alamofire; + sourceTree = ""; + }; + 45199ED47CEA398ADDDFDE8F9D0A591D /* Support Files */ = { + isa = PBXGroup; + children = ( + 8F8078A9DEC41CD886A8676D889912A4 /* Info.plist */, + B349821C1F2B2C5F593BC228C462C99D /* OMGHTTPURLRQ.modulemap */, + E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */, + 8F88352C39FB2D4A0D36696674E7C05D /* OMGHTTPURLRQ-dummy.m */, + 705D1370384B46A3E5A39B39E7B4D181 /* OMGHTTPURLRQ-prefix.pch */, + 3029ADF04ADC2B8F3A7264A416D70B56 /* OMGHTTPURLRQ-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/OMGHTTPURLRQ"; + sourceTree = ""; + }; + 4EE5FA0111D74A644A1CAA11AE22251D /* iOS */ = { + isa = PBXGroup; + children = ( + AB034280B33CDA4CAB9BB6A9ADD01052 /* Foundation.framework */, + DA6A54FE4F7D8D9EB477715D46429925 /* QuartzCore.framework */, + 629BAC72A4C38220E0906526E102AC40 /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 6C55196C7E1A0F95D0BEFD790EA1450C /* OMGHTTPURLRQ */ = { + isa = PBXGroup; + children = ( + B00B1E51F2524127FFF78DB52869057E /* FormURLEncode */, + 9466970616DD9491B9B80845EBAF6997 /* RQ */, + 45199ED47CEA398ADDDFDE8F9D0A591D /* Support Files */, + 00ED77B3FFE891B16DC5B4DD2FCC0408 /* UserAgent */, + ); + name = OMGHTTPURLRQ; + path = OMGHTTPURLRQ; + sourceTree = ""; + }; + 72B5E9FE2F2C23CD28C86A837D09964A /* CorePromise */ = { + isa = PBXGroup; + children = ( + 4765491FCD8E096D84D4E57E005B8B49 /* after.m */, + 3E49ED544745AD479AFA0B6766F441CE /* after.swift */, + D475FE9899956F5D2196D1C19DFC1F28 /* AnyPromise.h */, + EC8150042B23FCA7DF9979098694EC0B /* AnyPromise.m */, + 1FB5ABB73E12675999DE989CC2478A7A /* AnyPromise.swift */, + 7356B0365E4182E6E6D55124C678B591 /* dispatch_promise.m */, + 85FD17541BFB4152FD5F2CA46F9E3ACC /* dispatch_promise.swift */, + DFFF6310B8F8C445362FF33E936F85CA /* Error.swift */, + 955F5499BB7496155FBF443B524F1D50 /* hang.m */, + E3B8EDBFFE2A701981A073412ECCF6AD /* join.m */, + BED547C24FF8AE5F91ED94E3BC8052C8 /* join.swift */, + 2E9E05F82273A09FD6E5CA99FD3A74D9 /* NSError+Cancellation.h */, + DDB573F3C977C55072704AA24EC06164 /* Promise.swift */, + B225BF6ADAA247F1300081D25732B5B4 /* Promise+Properties.swift */, + 1AAED38B682D186542DC2B8D273486F4 /* PromiseKit.h */, + 3EC07412ABFB8D5A06E7B38380FFD9C4 /* race.swift */, + 3BEE20F7C5242E616D2D97B5FBE31323 /* State.swift */, + B0B08C036B6283A3D528F1FBBEEF40EC /* Umbrella.h */, + 0E339112CF5C9275CFBEB94C29AD250B /* URLDataPromise.swift */, + 9C307C0A58A490D3080DB4C1E745C973 /* when.m */, + DEFA2BBF978F33CA2112DC5D6209A3EF /* when.swift */, + ); + name = CorePromise; + sourceTree = ""; + }; + 79A7166061336F6A7FF214DB285A9584 /* Foundation */ = { + isa = PBXGroup; + children = ( + 178262A3EEE3B9A6F7B9B2B4ED5AA150 /* afterlife.swift */, + EFC77A5BCF407679FAB606F03E631A11 /* NSNotificationCenter+AnyPromise.h */, + DCBC249F9443D7D79A42B5C4BAC874C8 /* NSNotificationCenter+AnyPromise.m */, + 786AAA1F62613C489FD473D4CE16127A /* NSNotificationCenter+Promise.swift */, + 6650152803DA41F52DA6A26B5DF713D7 /* NSObject+Promise.swift */, + E0B0C8D6D1D56B95983D680363E6F785 /* NSURLConnection+AnyPromise.h */, + D9A940E08D42AC7D07C6B74D3310C69A /* NSURLConnection+AnyPromise.m */, + 9066E09FAD7A3236DAD81317C1E48214 /* NSURLConnection+Promise.swift */, + 5A5AEB5CADDFFFC419A0D8D6FD914800 /* NSURLSession+Promise.swift */, + ); + name = Foundation; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 22F52349E1BE90FC6E064DAAC9EA9612 /* Development Pods */, + E85F5154C248966A1EC7B7B6EACB20CF /* Frameworks */, + 27098387544928716460DD8F5024EE8A /* Pods */, + 01A9CB10E1E9A90B6A796034AF093E8C /* Products */, + C1A60D10CED0E61146591438999C7502 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 88CE2B3F08C34DDB098AD8A5DCC1DF1E /* Pods-SwaggerClient */ = { + isa = PBXGroup; + children = ( + 7C8E63660D346FD8ED2A97242E74EA09 /* Info.plist */, + DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */, + 2FF17440CCD2E1A69791A4AA23325AD5 /* Pods-SwaggerClient-acknowledgements.markdown */, + E1E4BCB344D3C100253B24B79421F00A /* Pods-SwaggerClient-acknowledgements.plist */, + 291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */, + BCF2D4DFF08D2A18E8C8FE4C4B4633FB /* Pods-SwaggerClient-frameworks.sh */, + D2841E5E2183846280B97F6E660DA26C /* Pods-SwaggerClient-resources.sh */, + 3EEBA91980AEC8774CF7EC08035B089A /* Pods-SwaggerClient-umbrella.h */, + 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */, + 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */, + ); + name = "Pods-SwaggerClient"; + path = "Target Support Files/Pods-SwaggerClient"; + sourceTree = ""; + }; + 8F6D133867EE63820DFB7E83F4C51252 /* Support Files */ = { + isa = PBXGroup; + children = ( + F0D4E00A8974E74325E9E53D456F9AD4 /* Info.plist */, + E3D1141B63DF38660CD6F3AC588A782B /* PetstoreClient.modulemap */, + DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */, + 46A8E0328DC896E0893B565FE8742167 /* PetstoreClient-dummy.m */, + B3A144887C8B13FD888B76AB096B0CA1 /* PetstoreClient-prefix.pch */, + 9F681D2C508D1BA8F62893120D9343A4 /* PetstoreClient-umbrella.h */, + ); + name = "Support Files"; + path = "SwaggerClientTests/Pods/Target Support Files/PetstoreClient"; + sourceTree = ""; + }; + 933F0A2EBD44D53190D1E9FAF3F54AFB /* UIKit */ = { + isa = PBXGroup; + children = ( + 0608A7843513940A299A88D778388F9D /* PMKAlertController.swift */, + 590BCD68D24A72708312E57A91360AC7 /* UIActionSheet+AnyPromise.h */, + CABB6C822D84DC5F0596B6D7B60CC5AA /* UIActionSheet+AnyPromise.m */, + DDDBF73F440D96AB666A6418AEEF2946 /* UIActionSheet+Promise.swift */, + 4E19A7D44620C4AED963248648938767 /* UIAlertView+AnyPromise.h */, + 9FB7C011EC5C968D7A91E71A028913B7 /* UIAlertView+AnyPromise.m */, + 8E29EB54AEC61300AD412C40991FFED5 /* UIAlertView+Promise.swift */, + 13DB7D7990FD3354E34510894CC30CD1 /* UIView+AnyPromise.h */, + EA13BF2FADA101A1AB34BF5EC8C7BA85 /* UIView+AnyPromise.m */, + 5E69FDAAF09817F0BA67D7C575BAFF48 /* UIView+Promise.swift */, + 7B892AF5EA37A5C7962FEA3E294B2526 /* UIViewController+AnyPromise.h */, + 53F1201EF49979297542207D6EB6EC55 /* UIViewController+AnyPromise.m */, + B7C40ADE30634419CED97EC829EE5D2C /* UIViewController+Promise.swift */, + ); + name = UIKit; + sourceTree = ""; + }; + 9466970616DD9491B9B80845EBAF6997 /* RQ */ = { + isa = PBXGroup; + children = ( + 859DDC0FFB13DB9C838BA38D0641A1BA /* OMGHTTPURLRQ.h */, + 3EEC1FB4B45C5C247D2D0FB33D4F5A1D /* OMGHTTPURLRQ.m */, + ); + name = RQ; + sourceTree = ""; + }; + 977CD7DB18C38452FB8DCFCEC690CBDE /* Support Files */ = { + isa = PBXGroup; + children = ( + 94F9363EEBC7855FA6B9A6B7485D5170 /* Info.plist */, + D3A577E7C7DF4A2157D9001CA0D40A72 /* PromiseKit.modulemap */, + 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */, + B09DEE52CBDEC1EA108DD327EF036F4A /* PromiseKit-dummy.m */, + 11683764D40FE241FCEEB379EE92E817 /* PromiseKit-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/PromiseKit"; + sourceTree = ""; + }; + AD94092456F8ABCB18F74CAC75AD85DE /* Classes */ = { + isa = PBXGroup; + children = ( + F64549CFCC17C7AC6479508BE180B18D /* Swaggers */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + B00B1E51F2524127FFF78DB52869057E /* FormURLEncode */ = { + isa = PBXGroup; + children = ( + 3B1578E353CE37C4C4201EC9101DE67F /* OMGFormURLEncode.h */, + 56CDA7C9327CF6F3DFC66FC128D7365B /* OMGFormURLEncode.m */, + ); + name = FormURLEncode; + sourceTree = ""; + }; + C1A60D10CED0E61146591438999C7502 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 88CE2B3F08C34DDB098AD8A5DCC1DF1E /* Pods-SwaggerClient */, + D6D0CD30E3EAF2ED10AE0CBC07506C5A /* Pods-SwaggerClientTests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + D6D0CD30E3EAF2ED10AE0CBC07506C5A /* Pods-SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + 3F16B43ABD2C8CD4A311AA1AB3B6C02F /* Info.plist */, + 00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */, + FB170EFD14935F121CDE3211DB4C5CA3 /* Pods-SwaggerClientTests-acknowledgements.markdown */, + 02F28E719AA874BE9213D6CF8CE7E36B /* Pods-SwaggerClientTests-acknowledgements.plist */, + 687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */, + 43FC49AA70D3E2A84CAED9C37BE9C4B5 /* Pods-SwaggerClientTests-frameworks.sh */, + E4E6F4A58FE7868CA2177D3AC79AD2FA /* Pods-SwaggerClientTests-resources.sh */, + F22FE315AC1C04A8749BD18281EE9028 /* Pods-SwaggerClientTests-umbrella.h */, + 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */, + 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = "Pods-SwaggerClientTests"; + path = "Target Support Files/Pods-SwaggerClientTests"; + sourceTree = ""; + }; + DFFDACE0170FB00C7ECFDA52A87A7665 /* Support Files */ = { + isa = PBXGroup; + children = ( + 467F288FF1A023115720F192FD4D9297 /* Alamofire.modulemap */, + 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */, + F0962CCF21BDD2EB5751C14F9322AFC9 /* Alamofire-dummy.m */, + 835E52C658674D7A44ED95B966432726 /* Alamofire-prefix.pch */, + 791F2A99A7894F88F8BBAE2F6C627522 /* Alamofire-umbrella.h */, + BDEAF9E48610133B23BB992381D0E22B /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Alamofire"; + sourceTree = ""; + }; + E73D9BF152C59F341559DE62A3143721 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + AD94092456F8ABCB18F74CAC75AD85DE /* Classes */, + ); + name = PetstoreClient; + path = PetstoreClient; + sourceTree = ""; + }; + E85F5154C248966A1EC7B7B6EACB20CF /* Frameworks */ = { + isa = PBXGroup; + children = ( + A1D1571AB15108DF6F9C4FE2064E3C43 /* Alamofire.framework */, + 3530BF15E14D1F6D7134EE67377D5C8C /* OMGHTTPURLRQ.framework */, + A112EF8BB3933C1C1E42F11B3DD3B02A /* PromiseKit.framework */, + 4EE5FA0111D74A644A1CAA11AE22251D /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + E9F8459055B900A58FB97600A53E5D1C /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + E73D9BF152C59F341559DE62A3143721 /* PetstoreClient */, + 8F6D133867EE63820DFB7E83F4C51252 /* Support Files */, + ); + name = PetstoreClient; + path = ../..; + sourceTree = ""; + }; + F64549CFCC17C7AC6479508BE180B18D /* Swaggers */ = { + isa = PBXGroup; + children = ( + 92734297B64DFE0EB0EDE1EA821163DB /* AlamofireImplementations.swift */, + D2BAD338E56EF3CAA6E54490FE0C5DF9 /* APIHelper.swift */, + D8072E1108951F272C003553FC8926C7 /* APIs.swift */, + 5412898DEB10F1983487A10453C6B9CB /* Extensions.swift */, + 8F0266C5AE0B23A436291F6647902086 /* Models.swift */, + F92EFB558CBA923AB1CFA22F708E315A /* APIs */, + 1322FED69118C64DAD026CAF7F4C38C6 /* Models */, + ); + name = Swaggers; + path = Swaggers; + sourceTree = ""; + }; + F92EFB558CBA923AB1CFA22F708E315A /* APIs */ = { + isa = PBXGroup; + children = ( + 261F03A3C73374FD19333EEA59CCD59F /* PetAPI.swift */, + 1A3E5E3CD673B025FD8AC260E67AB47E /* StoreAPI.swift */, + 552D15E0340BF58CC1922B82E864AEC9 /* UserAPI.swift */, + ); + name = APIs; + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 06355A827899CB5DF1AEC2B7AE5343A2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BF43C103A91BDDC98FA10577CBA76D8B /* AnyPromise.h in Headers */, + FF2BDB83CB6FE636673DD089D26FBCB8 /* CALayer+AnyPromise.h in Headers */, + 7519B50597E2DC5B47FC6927BA94D3A7 /* NSError+Cancellation.h in Headers */, + 6ADCA5D4BB1C66A8FC959C38CAEA4488 /* NSNotificationCenter+AnyPromise.h in Headers */, + 162CFCD9335EB4583A6247A6116FEB0D /* NSURLConnection+AnyPromise.h in Headers */, + EF45D47D7EBC09983C83946F2BB75C92 /* PromiseKit.h in Headers */, + 029AC3390FBF6FE9A66FC3D937065ED8 /* UIActionSheet+AnyPromise.h in Headers */, + FC438D87EC736F347E1068A05360974E /* UIAlertView+AnyPromise.h in Headers */, + 629C5CA00E2A6A40D7AEF34A7FD7772F /* UIView+AnyPromise.h in Headers */, + 5C067F2478F7DD077A0496925F57CE8C /* UIViewController+AnyPromise.h in Headers */, + FADE7DCB53BC63ECC585A5192BC15843 /* Umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1353AC7A6419F876B294A55E5550D1E4 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 31F8B86E3672D0B828B6352C875649C4 /* Pods-SwaggerClientTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C894FFAF7CC3AB5A548AF1B61F8FA548 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0DB7734F8CD7D40D922F73C1C9146EE4 /* OMGFormURLEncode.h in Headers */, + D3A23B867EBFCD3AC86370D26250C290 /* OMGHTTPURLRQ-umbrella.h in Headers */, + 258F28EA87BCDBE2307CD728D6847F44 /* OMGHTTPURLRQ.h in Headers */, + 2E3A55DBE5D58E6E6B3068D0BF84BA42 /* OMGUserAgent.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CC52385505985AE1C33D731864E5D615 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 98C216E54478D7F70674111361A4DB7E /* Pods-SwaggerClient-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F2A4B8C726CEA196EABADDBEF5345846 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 33D7D29D9E53DA84337D305017107505 /* PetstoreClient-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = C3A6D0B1F2716E6C57E728BE318F35F2 /* Build configuration list for PBXNativeTarget "PromiseKit" */; + buildPhases = ( + 80CA432D5B71DB2B28AD6FF75E7D4F37 /* Sources */, + 364E2313E2B201E3BBE0ED3C8DDF7812 /* Frameworks */, + 06355A827899CB5DF1AEC2B7AE5343A2 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + E1CA092FD90F43E3E462BC6A412B1C74 /* PBXTargetDependency */, + ); + name = PromiseKit; + productName = PromiseKit; + productReference = 0C552CDBDD89D489D23D5D4E28356F84 /* PromiseKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 2CD30C6ABD3A18ABB3C4BE6D88151D89 /* Pods-SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = DC6C838E5FD0AA55D4D19AF5445C3BDC /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */; + buildPhases = ( + B6FCB0C9137B17D4C8594118B6E09C6D /* Sources */, + 93A52D8380E47350C27ABFF726B0EE7D /* Frameworks */, + CC52385505985AE1C33D731864E5D615 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 2A8AB7B6B910ACA4A4CFA5F59BC763C1 /* PBXTargetDependency */, + 8379AE2AD3B7EFAEA32EECB166A69A35 /* PBXTargetDependency */, + 685342E14A1D26CC3D02B797F78CCC17 /* PBXTargetDependency */, + 014BBBC4434EB1A54BF32C7358BE0426 /* PBXTargetDependency */, + ); + name = "Pods-SwaggerClient"; + productName = "Pods-SwaggerClient"; + productReference = CF8754792D6C49D6F5C8859350F48B35 /* Pods_SwaggerClient.framework */; + productType = "com.apple.product-type.framework"; + }; + 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */ = { + isa = PBXNativeTarget; + buildConfigurationList = CD74B5CE2C2265348D1B613B9368C079 /* Build configuration list for PBXNativeTarget "OMGHTTPURLRQ" */; + buildPhases = ( + F80308E9C89F9A33F945AB69CA1EEAEB /* Sources */, + BCD2EA67C3EE2725B5C1EEADB0F66AF4 /* Frameworks */, + C894FFAF7CC3AB5A548AF1B61F8FA548 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OMGHTTPURLRQ; + productName = OMGHTTPURLRQ; + productReference = 97FF5C0140A433518CF653B6A520F27A /* OMGHTTPURLRQ.framework */; + productType = "com.apple.product-type.framework"; + }; + 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5F11F7876E9302E80161D33223E3D230 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + 4EB24B8C43007B6C21D7481167C1F9CF /* Sources */, + BC1E0CC70F02685289292200DADFB7F0 /* Frameworks */, + F2A4B8C726CEA196EABADDBEF5345846 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 59FB04A6684D0690467260C91518EC03 /* PBXTargetDependency */, + 24C8C29561020566F8E06E1180327058 /* PBXTargetDependency */, + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = FE74210E04DEED84E2357049E4589759 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; + 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { + isa = PBXNativeTarget; + buildConfigurationList = 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */; + buildPhases = ( + 3792E88F656464AEB17FE4EF5FA2887A /* Sources */, + 99195E4207764744AEC07ECCBCD550EB /* Frameworks */, + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Alamofire; + productName = Alamofire; + productReference = F2BEA8A3A2770EF455BB2ECCDA8CE0AD /* Alamofire.framework */; + productType = "com.apple.product-type.framework"; + }; + F3DF8DD6DBDCB07B04D7B1CC8A462562 /* Pods-SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B462F7329881FF6565EF44016BE2B959 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */; + buildPhases = ( + BDFDEE831A91E115AA482B4E9E9B5CC8 /* Sources */, + 87AF7EC7404199AC8C5D22375A6059BF /* Frameworks */, + 1353AC7A6419F876B294A55E5550D1E4 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-SwaggerClientTests"; + productName = "Pods-SwaggerClientTests"; + productReference = FEEC58138887E454A6CBD0A7BFF2910A /* Pods_SwaggerClientTests.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 01A9CB10E1E9A90B6A796034AF093E8C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */, + 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */, + 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */, + 2CD30C6ABD3A18ABB3C4BE6D88151D89 /* Pods-SwaggerClient */, + F3DF8DD6DBDCB07B04D7B1CC8A462562 /* Pods-SwaggerClientTests */, + 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 3792E88F656464AEB17FE4EF5FA2887A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8BC2037248D2FA8B2E2475AC2E466494 /* Alamofire-dummy.m in Sources */, + 9B70D1F82BB1FA9EAEF67815AB211B47 /* Alamofire.swift in Sources */, + 2192B0DEE9028936168890C1D6EB0259 /* Download.swift in Sources */, + E7D7EF4C9B8164062D3C5E6EA7C534C2 /* Error.swift in Sources */, + 9C88873949B0DCF8A580D0F65A43A482 /* Manager.swift in Sources */, + 5F193AFDA8E41A904D4B657769F49A93 /* MultipartFormData.swift in Sources */, + 58597FACD9B948EB5E4EB1A96E84F9DE /* NetworkReachabilityManager.swift in Sources */, + 8179D1D51A9219B01C0C007F96F02F33 /* Notifications.swift in Sources */, + E968D568838BC789817F6009838349A3 /* ParameterEncoding.swift in Sources */, + 7892B90D39A86C32BD7ECFF8F6C52A38 /* Request.swift in Sources */, + 4CDF7F31FC91171478EC0A2E2AB4E758 /* Response.swift in Sources */, + A3D61ED4990E52E06A3315F2A9A00C6D /* ResponseSerialization.swift in Sources */, + 28AF3FD0C6798D6A36A13C2AB39F8239 /* Result.swift in Sources */, + 31D35FA0B2173504DBA8E2F450CAC665 /* ServerTrustPolicy.swift in Sources */, + B924DB98A633A09B12A6226F75261F83 /* Stream.swift in Sources */, + CEE2E4C0A2875A6C0CA9BB46572D6224 /* Timeline.swift in Sources */, + CEF24FA13891DB5422B2DAF72DE83A9A /* Upload.swift in Sources */, + 3FE36566EFBFEFABC46589686A7ADCD2 /* Validation.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4EB24B8C43007B6C21D7481167C1F9CF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F84E18C37A7B3B8A338E817574491335 /* AlamofireImplementations.swift in Sources */, + 2A926E5EA0483C43023F396648F31100 /* APIHelper.swift in Sources */, + EF9B6103AC1A233089E5317B1E2D8031 /* APIs.swift in Sources */, + A3C3B39CE3715B4260DC6FF0B621C142 /* Category.swift in Sources */, + FCB8ADBF2A01486B7D575EA3326A70BD /* Extensions.swift in Sources */, + 086EF9C01D071D88D853A11539D42B9F /* Models.swift in Sources */, + EF4BCB7BBAB19687FAD3A5A71C859A7F /* Order.swift in Sources */, + D5ECD91CE99A115543BEC3B993C11BD3 /* Pet.swift in Sources */, + 21B837E7DB2A98D7B3E2D64AABA828F2 /* PetAPI.swift in Sources */, + 54BAF231DB704DB87968C54637AF9551 /* PetstoreClient-dummy.m in Sources */, + F986101B7E81C6AABC67FF43C958D54A /* StoreAPI.swift in Sources */, + ECD1DE9F631F8BCD514213BF97385BAE /* Tag.swift in Sources */, + FCA5211A7610129D1EAFC03D5F5351D2 /* User.swift in Sources */, + D02588110E13C2C2F223EAE690848951 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 80CA432D5B71DB2B28AD6FF75E7D4F37 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 66130A4C8A83C11558EC154FA1C9D191 /* after.m in Sources */, + 1B3395001A4E5AB2E7EEEFE9964348B5 /* after.swift in Sources */, + DB9ED067DD1525127DFBE4B5647E502C /* afterlife.swift in Sources */, + 009A705EB41A7BD11E77200CD1FB65CC /* AnyPromise.m in Sources */, + B067653C1D7B7214CD0079A279326610 /* AnyPromise.swift in Sources */, + AF02896B7B6B213C98324CD75871275A /* CALayer+AnyPromise.m in Sources */, + D13DFBC6575E7DB809A1420CB9F920B5 /* dispatch_promise.m in Sources */, + C3EC2C7BE760D6CEE606445A1AE2E071 /* dispatch_promise.swift in Sources */, + D2230D11A1EE4A48E9EC72EA44D09EAC /* Error.swift in Sources */, + 74231A47F9018E69CB8390B3BD9815B8 /* hang.m in Sources */, + 5ECBDDFA4329B4AB812B4A10DBD2EB1A /* join.m in Sources */, + C5938D7FB0EC73BE33F4A6B31BE937B9 /* join.swift in Sources */, + 689CD9721F90D45A57369D76461CA5E2 /* NSNotificationCenter+AnyPromise.m in Sources */, + 9E16513086BC96F16B7F73065AE84AC4 /* NSNotificationCenter+Promise.swift in Sources */, + F6BC9BD76DB32C32BFDAD6582DC9F9B0 /* NSObject+Promise.swift in Sources */, + 98971D531D9D7138ED04B55FE458D66D /* NSURLConnection+AnyPromise.m in Sources */, + 19481BE7602C732E16A4C1FDE7D800DA /* NSURLConnection+Promise.swift in Sources */, + C2249D68F55536B774806E6ED01D3431 /* NSURLSession+Promise.swift in Sources */, + FCDEC7CF7180ECD18CA73EB08EA4624D /* PMKAlertController.swift in Sources */, + 7EC6F570997E9A0CC65AD7E7E319C0EF /* Promise+Properties.swift in Sources */, + D509E607CAE14D8848E2BBAC478BEED5 /* Promise.swift in Sources */, + 989ED6D4ECDEF446FB68EFF07F0CBEF5 /* PromiseKit-dummy.m in Sources */, + 32A893A9FE628EDBC482D40F753699F9 /* race.swift in Sources */, + E5E62E286336AB2FBB84501E1ACEEE7C /* State.swift in Sources */, + D733EB627BBBA34769C0CDEF5ABE0E41 /* UIActionSheet+AnyPromise.m in Sources */, + C884C9ADEA7330CF670815C9689FBBD9 /* UIActionSheet+Promise.swift in Sources */, + 563431FCE9268B58BFD2F32E358673C6 /* UIAlertView+AnyPromise.m in Sources */, + 8A858C9291A59130A4A3AE2FB193E480 /* UIAlertView+Promise.swift in Sources */, + EC284D0372D446702CC9585351E4027D /* UIView+AnyPromise.m in Sources */, + 68B6B55AA10FA42481892FE79996D4F0 /* UIView+Promise.swift in Sources */, + 7546CDAE72452E874E5DB53099BF3E70 /* UIViewController+AnyPromise.m in Sources */, + 061D9A45538674253A809E070A8A089D /* UIViewController+Promise.swift in Sources */, + 8ADEA58D7C48EC4973D667F87C5AE948 /* URLDataPromise.swift in Sources */, + F38E53627E8AD5C92AF674C15A3A2493 /* when.m in Sources */, + B1A09AAC19DAB39B1C7F172CEBF0AAAD /* when.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B6FCB0C9137B17D4C8594118B6E09C6D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2FF723F26615EB2ACAE54BDA6E3707DC /* Pods-SwaggerClient-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BDFDEE831A91E115AA482B4E9E9B5CC8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 897985FA042CD12B825C3032898FAB26 /* Pods-SwaggerClientTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F80308E9C89F9A33F945AB69CA1EEAEB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5344CCD94F668BD41A0417B3A3CDF4F2 /* OMGFormURLEncode.m in Sources */, + 2C65AE47419BA083958A5D9F760F7150 /* OMGHTTPURLRQ-dummy.m in Sources */, + 55F5CB213AA2AE0675636AC73B7D7FB1 /* OMGHTTPURLRQ.m in Sources */, + 13C8FE870121B96B85458487D176292A /* OMGUserAgent.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 014BBBC4434EB1A54BF32C7358BE0426 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */; + targetProxy = 094864AE73DBB274F1E39300864E9C62 /* PBXContainerItemProxy */; + }; + 24C8C29561020566F8E06E1180327058 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PromiseKit; + target = 1FCDFB2162BF49E98CC34F69A4EB87B9 /* PromiseKit */; + targetProxy = E66AC3FE6854646CAC1BEA7B966F17B0 /* PBXContainerItemProxy */; + }; + 2A8AB7B6B910ACA4A4CFA5F59BC763C1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = 26F113882698B5132DB9F4537EF58E9A /* PBXContainerItemProxy */; + }; + 59FB04A6684D0690467260C91518EC03 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = CC71B8F089BD4B650825DDAA5DB71E07 /* PBXContainerItemProxy */; + }; + 685342E14A1D26CC3D02B797F78CCC17 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PetstoreClient; + target = 6AA38233456D5A22BF4E286D26DBBC53 /* PetstoreClient */; + targetProxy = 1F4208A7D556EA95487DDE364B0345D5 /* PBXContainerItemProxy */; + }; + 8379AE2AD3B7EFAEA32EECB166A69A35 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OMGHTTPURLRQ; + target = 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */; + targetProxy = FB51D93BE6962BF86154BCCE6C6161E9 /* PBXContainerItemProxy */; + }; + E1CA092FD90F43E3E462BC6A412B1C74 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OMGHTTPURLRQ; + target = 5AD1507205D908987C216D989FDDD0CD /* OMGHTTPURLRQ */; + targetProxy = 65851406A9AA058E6966942F3A75BEFB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 37A6D3ECFEC1FCED0CAA398BE3B7CBB7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = PetstoreClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 507820EAC09E90412FDF1F737638B0D4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 969C2AF48F4307163B301A92E78AFCF2 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_SwaggerClientTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 61067068269EECAA2F1CB7DE4AF96F2F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 549C6527D10094289B101749047807C5 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_SwaggerClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6F3A3A099BF6DB77A326F9CDFA4FA550 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DADAB10704E49D6B9E18F59F995BB88F /* PetstoreClient.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PetstoreClient/PetstoreClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PetstoreClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PetstoreClient/PetstoreClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = PetstoreClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + AADB9822762AD81BBAE83335B2AB1EB0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B1B5EB0850F98CB5AECDB015B690777F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + B6E8E8BCFD17BC4CC5B002AB5B2DF697 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OMGHTTPURLRQ/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = OMGHTTPURLRQ; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + BDB92B86F05A6E1B01A06399F6A57A01 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + C7A5906C8108C4163D0ED41985878B78 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClientTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_SwaggerClientTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + CF5DD5054942688BADBDB2E2EBB88C61 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E6EC6723A17EAD72862789D6748FAA26 /* OMGHTTPURLRQ.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OMGHTTPURLRQ/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = OMGHTTPURLRQ; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DC06B8741A907E0921F8314D215543AB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = PromiseKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E14528B983F58350151EE2B619628CAB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SwaggerClient/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_SwaggerClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + EE004CEA3EB3656D1EBF14311F29CE18 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 10A634092EE6D018EB00C75E9864A6A2 /* Alamofire.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FD1D1987A0C5BBBFA02B72B6A1908057 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2E750A27FAB06DE866BC27CC8FA07806 /* PromiseKit.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PromiseKit/PromiseKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PromiseKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PromiseKit/PromiseKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = PromiseKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B1B5EB0850F98CB5AECDB015B690777F /* Debug */, + AADB9822762AD81BBAE83335B2AB1EB0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EE004CEA3EB3656D1EBF14311F29CE18 /* Debug */, + BDB92B86F05A6E1B01A06399F6A57A01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5F11F7876E9302E80161D33223E3D230 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 37A6D3ECFEC1FCED0CAA398BE3B7CBB7 /* Debug */, + 6F3A3A099BF6DB77A326F9CDFA4FA550 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B462F7329881FF6565EF44016BE2B959 /* Build configuration list for PBXNativeTarget "Pods-SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 507820EAC09E90412FDF1F737638B0D4 /* Debug */, + C7A5906C8108C4163D0ED41985878B78 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C3A6D0B1F2716E6C57E728BE318F35F2 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FD1D1987A0C5BBBFA02B72B6A1908057 /* Debug */, + DC06B8741A907E0921F8314D215543AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CD74B5CE2C2265348D1B613B9368C079 /* Build configuration list for PBXNativeTarget "OMGHTTPURLRQ" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B6E8E8BCFD17BC4CC5B002AB5B2DF697 /* Debug */, + CF5DD5054942688BADBDB2E2EBB88C61 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DC6C838E5FD0AA55D4D19AF5445C3BDC /* Build configuration list for PBXNativeTarget "Pods-SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 61067068269EECAA2F1CB7DE4AF96F2F /* Debug */, + E14528B983F58350151EE2B619628CAB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h new file mode 100644 index 000000000000..02327b85e884 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double AlamofireVersionNumber; +FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist new file mode 100644 index 000000000000..152c333e4414 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Alamofire/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.4.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h new file mode 100644 index 000000000000..cef2f3bb5b33 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/OMGHTTPURLRQ/OMGHTTPURLRQ-umbrella.h @@ -0,0 +1,11 @@ +#ifdef __OBJC__ +#import +#endif + +#import "OMGFormURLEncode.h" +#import "OMGHTTPURLRQ.h" +#import "OMGUserAgent.h" + +FOUNDATION_EXPORT double OMGHTTPURLRQVersionNumber; +FOUNDATION_EXPORT const unsigned char OMGHTTPURLRQVersionString[]; + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h new file mode 100644 index 000000000000..435b682a1068 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/PetstoreClient/PetstoreClient-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double PetstoreClientVersionNumber; +FOUNDATION_EXPORT const unsigned char PetstoreClientVersionString[]; + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown new file mode 100644 index 000000000000..bb7c5a67fc4b --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.markdown @@ -0,0 +1,11 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## OMGHTTPURLRQ + +https://github.com/mxcl/OMGHTTPURLRQ/blob/master/README.markdown + +## PromiseKit + +@see README +Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist new file mode 100644 index 000000000000..476c1044a32d --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-acknowledgements.plist @@ -0,0 +1,49 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + https://github.com/mxcl/OMGHTTPURLRQ/blob/master/README.markdown + License + MIT + Title + OMGHTTPURLRQ + Type + PSGroupSpecifier + + + FooterText + @see README + License + MIT + Title + PromiseKit + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh new file mode 100755 index 000000000000..25e9d37757fc --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h new file mode 100644 index 000000000000..2bdb03cd9399 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double Pods_SwaggerClientVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientVersionString[]; + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig new file mode 100644 index 000000000000..4b678f396a68 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "OMGHTTPURLRQ" -framework "PetstoreClient" -framework "PromiseKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods +SWIFT_INSTALL_OBJC_HEADER = NO diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig new file mode 100644 index 000000000000..4b678f396a68 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "OMGHTTPURLRQ" -framework "PetstoreClient" -framework "PromiseKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods +SWIFT_INSTALL_OBJC_HEADER = NO diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh new file mode 100755 index 000000000000..25e9d37757fc --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h new file mode 100644 index 000000000000..950bb19ca7a1 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double Pods_SwaggerClientTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_SwaggerClientTestsVersionString[]; + diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig new file mode 100644 index 000000000000..85fcf66813e6 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig @@ -0,0 +1,8 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig new file mode 100644 index 000000000000..85fcf66813e6 --- /dev/null +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig @@ -0,0 +1,8 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ" "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient" "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/OMGHTTPURLRQ/OMGHTTPURLRQ.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PetstoreClient/PetstoreClient.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PromiseKit/PromiseKit.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock new file mode 100644 index 000000000000..187218299fbe --- /dev/null +++ b/samples/client/petstore/swift3/default/SwaggerClientTests/Podfile.lock @@ -0,0 +1,19 @@ +PODS: + - Alamofire (4.5.0) + - PetstoreClient (0.0.1): + - Alamofire (~> 4.5.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: ../ + +SPEC CHECKSUMS: + Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 + PetstoreClient: bbb95cd0adc059bbdbe541b384f8294f4e241226 + +PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418 + +COCOAPODS: 1.3.1 diff --git a/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock new file mode 100644 index 000000000000..3add4cf9b4a2 --- /dev/null +++ b/samples/client/petstore/swift3/promisekit/SwaggerClientTests/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - Alamofire (4.5.0) + - PetstoreClient (0.0.1): + - Alamofire (~> 4.5.0) + - PromiseKit/CorePromise (~> 4.4.0) + - PromiseKit/CorePromise (4.4.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: ../ + +SPEC CHECKSUMS: + Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 + PetstoreClient: 529644d7d853d985a2748d43c7d4848db0fd62bb + PromiseKit: ecf5fe92275d57ee77c9ede858af47a162e9b97e + +PODFILE CHECKSUM: da9f5a7ad6086f2c7abb73cf2c35cefce04a9a30 + +COCOAPODS: 1.3.1 diff --git a/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock new file mode 100644 index 000000000000..56a6c42e699d --- /dev/null +++ b/samples/client/petstore/swift3/rxswift/SwaggerClientTests/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - Alamofire (4.5.0) + - PetstoreClient (0.0.1): + - Alamofire (~> 4.5.0) + - RxSwift (~> 3.4.1) + - RxSwift (3.4.1) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: ../ + +SPEC CHECKSUMS: + Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 + PetstoreClient: 89ba1ed13b6653200cc34a2248644e7e6a142b60 + RxSwift: 656f8fbeca5bc372121a72d9ebdd3cd3bc0ffade + +PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418 + +COCOAPODS: 1.3.1 diff --git a/samples/server/petstore-security-test/slim/composer.lock b/samples/server/petstore-security-test/slim/composer.lock new file mode 100644 index 000000000000..c31fb841c9b8 --- /dev/null +++ b/samples/server/petstore-security-test/slim/composer.lock @@ -0,0 +1,315 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "913417690829da41975a473b88f30f64", + "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "nikic/fast-route", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "time": "2018-02-13T20:26:39+00:00" + }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "slim/slim", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", + "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "nikic/fast-route": "^1.0", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/container": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Slim\\": "Slim" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" + }, + { + "name": "Gabriel Manricks", + "email": "gmanricks@me.com", + "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + } + ], + "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", + "homepage": "https://slimframework.com", + "keywords": [ + "api", + "framework", + "micro", + "router" + ], + "time": "2018-04-19T19:29:08+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "RC", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/samples/server/petstore/php-slim/composer.lock b/samples/server/petstore/php-slim/composer.lock new file mode 100644 index 000000000000..c31fb841c9b8 --- /dev/null +++ b/samples/server/petstore/php-slim/composer.lock @@ -0,0 +1,315 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "913417690829da41975a473b88f30f64", + "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "nikic/fast-route", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "time": "2018-02-13T20:26:39+00:00" + }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "slim/slim", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", + "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "nikic/fast-route": "^1.0", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/container": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Slim\\": "Slim" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" + }, + { + "name": "Gabriel Manricks", + "email": "gmanricks@me.com", + "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + } + ], + "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", + "homepage": "https://slimframework.com", + "keywords": [ + "api", + "framework", + "micro", + "router" + ], + "time": "2018-04-19T19:29:08+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "RC", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/samples/server/petstore/rails5/vendor/.keep b/samples/server/petstore/rails5/vendor/.keep new file mode 100644 index 000000000000..e69de29bb2d1 From eb1e146e4f237d1b1f009036bac197c18be0e6b0 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 20:55:35 -0700 Subject: [PATCH 13/18] Trigger CI due to race condition From 2684c0c71140dd5dc36e985e7df8fd8a20e197b5 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 22:25:32 -0700 Subject: [PATCH 14/18] update samples --- .../java/feign/.openapi-generator/VERSION | 6 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../.openapi-generator/VERSION | 6 +- .../java/google-api-client/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../java/jersey1/.openapi-generator/VERSION | 6 +- .../petstore/java/jersey1/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../jersey2-java6/.openapi-generator/VERSION | 6 +- .../java/jersey2-java6/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 64 ------------- .../jersey2-java8/.openapi-generator/VERSION | 6 +- .../java/jersey2-java8/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../java/jersey2/.openapi-generator/VERSION | 6 +- .../petstore/java/jersey2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../.openapi-generator/VERSION | 6 +- .../docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 11 +-- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 91 ------------------- .../okhttp-gson/.openapi-generator/VERSION | 6 +- .../petstore/java/okhttp-gson/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../rest-assured/.openapi-generator/VERSION | 6 +- .../java/rest-assured/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../java/resteasy/.openapi-generator/VERSION | 6 +- .../petstore/java/resteasy/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../.openapi-generator/VERSION | 6 +- .../java/resttemplate-withXml/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 70 -------------- .../resttemplate/.openapi-generator/VERSION | 6 +- .../java/resttemplate/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../java/retrofit/.openapi-generator/VERSION | 6 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../.openapi-generator/VERSION | 6 +- .../java/retrofit2-play24/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 67 -------------- .../.openapi-generator/VERSION | 6 +- .../java/retrofit2-play25/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 67 -------------- .../java/retrofit2/.openapi-generator/VERSION | 6 +- .../petstore/java/retrofit2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../retrofit2rx/.openapi-generator/VERSION | 6 +- .../petstore/java/retrofit2rx/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../retrofit2rx2/.openapi-generator/VERSION | 6 +- .../java/retrofit2rx2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../java/vertx/.openapi-generator/VERSION | 6 +- .../petstore/java/vertx/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 ------------- .../kotlin-string/.openapi-generator/VERSION | 6 +- .../.openapi-generator/VERSION | 6 +- .../kotlin/.openapi-generator/VERSION | 6 +- .../petstore/php/.openapi-generator/VERSION | 6 +- .../petstore/php/OpenAPIClient-php/README.md | 1 - .../OpenAPIClient-php/docs/Model/MapTest.md | 2 +- .../lib/Api/AnotherFakeApi.php | 4 - .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 4 - .../lib/Api/FakeClassnameTags123Api.php | 4 - .../php/OpenAPIClient-php/lib/Api/PetApi.php | 4 - .../OpenAPIClient-php/lib/Api/StoreApi.php | 4 - .../php/OpenAPIClient-php/lib/Api/UserApi.php | 4 - .../OpenAPIClient-php/lib/ApiException.php | 4 - .../OpenAPIClient-php/lib/Configuration.php | 4 - .../OpenAPIClient-php/lib/HeaderSelector.php | 4 - .../lib/Model/AdditionalPropertiesClass.php | 4 - .../OpenAPIClient-php/lib/Model/Animal.php | 4 - .../lib/Model/AnimalFarm.php | 4 - .../lib/Model/ApiResponse.php | 4 - .../lib/Model/ArrayOfArrayOfNumberOnly.php | 4 - .../lib/Model/ArrayOfNumberOnly.php | 4 - .../OpenAPIClient-php/lib/Model/ArrayTest.php | 4 - .../lib/Model/Capitalization.php | 4 - .../php/OpenAPIClient-php/lib/Model/Cat.php | 4 - .../OpenAPIClient-php/lib/Model/Category.php | 4 - .../lib/Model/ClassModel.php | 4 - .../OpenAPIClient-php/lib/Model/Client.php | 4 - .../php/OpenAPIClient-php/lib/Model/Dog.php | 4 - .../lib/Model/EnumArrays.php | 4 - .../OpenAPIClient-php/lib/Model/EnumClass.php | 4 - .../OpenAPIClient-php/lib/Model/EnumTest.php | 4 - .../lib/Model/FormatTest.php | 4 - .../lib/Model/HasOnlyReadOnly.php | 4 - .../OpenAPIClient-php/lib/Model/MapTest.php | 10 +- ...PropertiesAndAdditionalPropertiesClass.php | 4 - .../lib/Model/Model200Response.php | 4 - .../lib/Model/ModelInterface.php | 4 - .../OpenAPIClient-php/lib/Model/ModelList.php | 4 - .../lib/Model/ModelReturn.php | 4 - .../php/OpenAPIClient-php/lib/Model/Name.php | 4 - .../lib/Model/NumberOnly.php | 4 - .../php/OpenAPIClient-php/lib/Model/Order.php | 4 - .../lib/Model/OuterComposite.php | 4 - .../OpenAPIClient-php/lib/Model/OuterEnum.php | 4 - .../php/OpenAPIClient-php/lib/Model/Pet.php | 4 - .../lib/Model/ReadOnlyFirst.php | 4 - .../lib/Model/SpecialModelName.php | 4 - .../php/OpenAPIClient-php/lib/Model/Tag.php | 4 - .../php/OpenAPIClient-php/lib/Model/User.php | 4 - .../lib/ObjectSerializer.php | 4 - .../test/Api/AnotherFakeApiTest.php | 4 - .../test/Api/FakeApiTest.php | 4 - .../test/Api/FakeClassnameTags123ApiTest.php | 4 - .../OpenAPIClient-php/test/Api/PetApiTest.php | 4 - .../test/Api/StoreApiTest.php | 4 - .../test/Api/UserApiTest.php | 4 - .../Model/AdditionalPropertiesClassTest.php | 4 - .../test/Model/AnimalFarmTest.php | 4 - .../test/Model/AnimalTest.php | 4 - .../test/Model/ApiResponseTest.php | 4 - .../Model/ArrayOfArrayOfNumberOnlyTest.php | 4 - .../test/Model/ArrayOfNumberOnlyTest.php | 4 - .../test/Model/ArrayTestTest.php | 4 - .../test/Model/CapitalizationTest.php | 4 - .../OpenAPIClient-php/test/Model/CatTest.php | 4 - .../test/Model/CategoryTest.php | 4 - .../test/Model/ClassModelTest.php | 4 - .../test/Model/ClientTest.php | 4 - .../OpenAPIClient-php/test/Model/DogTest.php | 4 - .../test/Model/EnumArraysTest.php | 4 - .../test/Model/EnumClassTest.php | 4 - .../test/Model/EnumTestTest.php | 4 - .../test/Model/FormatTestTest.php | 4 - .../test/Model/HasOnlyReadOnlyTest.php | 4 - .../test/Model/MapTestTest.php | 4 - ...ertiesAndAdditionalPropertiesClassTest.php | 4 - .../test/Model/Model200ResponseTest.php | 4 - .../test/Model/ModelListTest.php | 4 - .../test/Model/ModelReturnTest.php | 4 - .../OpenAPIClient-php/test/Model/NameTest.php | 4 - .../test/Model/NumberOnlyTest.php | 4 - .../test/Model/OrderTest.php | 4 - .../test/Model/OuterCompositeTest.php | 4 - .../test/Model/OuterEnumTest.php | 4 - .../OpenAPIClient-php/test/Model/PetTest.php | 4 - .../test/Model/ReadOnlyFirstTest.php | 4 - .../test/Model/SpecialModelNameTest.php | 4 - .../test/Model/StringBooleanMapTest.php | 78 ---------------- .../OpenAPIClient-php/test/Model/TagTest.php | 4 - .../OpenAPIClient-php/test/Model/UserTest.php | 4 - .../petstore/ruby/.openapi-generator/VERSION | 6 +- samples/client/petstore/ruby/README.md | 1 - samples/client/petstore/ruby/docs/MapTest.md | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 5 - .../ruby/lib/petstore/api/another_fake_api.rb | 4 - .../ruby/lib/petstore/api/fake_api.rb | 4 - .../api/fake_classname_tags123_api.rb | 4 - .../petstore/ruby/lib/petstore/api/pet_api.rb | 4 - .../ruby/lib/petstore/api/store_api.rb | 4 - .../ruby/lib/petstore/api/user_api.rb | 4 - .../petstore/ruby/lib/petstore/api_client.rb | 4 - .../petstore/ruby/lib/petstore/api_error.rb | 4 - .../ruby/lib/petstore/configuration.rb | 4 - .../models/additional_properties_class.rb | 4 - .../ruby/lib/petstore/models/animal.rb | 4 - .../ruby/lib/petstore/models/animal_farm.rb | 4 - .../ruby/lib/petstore/models/api_response.rb | 4 - .../models/array_of_array_of_number_only.rb | 4 - .../petstore/models/array_of_number_only.rb | 4 - .../ruby/lib/petstore/models/array_test.rb | 4 - .../lib/petstore/models/capitalization.rb | 4 - .../petstore/ruby/lib/petstore/models/cat.rb | 4 - .../ruby/lib/petstore/models/category.rb | 4 - .../ruby/lib/petstore/models/class_model.rb | 4 - .../ruby/lib/petstore/models/client.rb | 4 - .../petstore/ruby/lib/petstore/models/dog.rb | 4 - .../ruby/lib/petstore/models/enum_arrays.rb | 4 - .../ruby/lib/petstore/models/enum_class.rb | 4 - .../ruby/lib/petstore/models/enum_test.rb | 4 - .../ruby/lib/petstore/models/format_test.rb | 4 - .../lib/petstore/models/has_only_read_only.rb | 4 - .../petstore/ruby/lib/petstore/models/list.rb | 4 - .../ruby/lib/petstore/models/map_test.rb | 6 +- ...perties_and_additional_properties_class.rb | 4 - .../lib/petstore/models/model200_response.rb | 4 - .../ruby/lib/petstore/models/model_return.rb | 4 - .../petstore/ruby/lib/petstore/models/name.rb | 4 - .../ruby/lib/petstore/models/number_only.rb | 4 - .../ruby/lib/petstore/models/order.rb | 4 - .../lib/petstore/models/outer_composite.rb | 4 - .../ruby/lib/petstore/models/outer_enum.rb | 4 - .../petstore/ruby/lib/petstore/models/pet.rb | 4 - .../lib/petstore/models/read_only_first.rb | 4 - .../lib/petstore/models/special_model_name.rb | 4 - .../petstore/ruby/lib/petstore/models/tag.rb | 4 - .../petstore/ruby/lib/petstore/models/user.rb | 4 - .../petstore/ruby/lib/petstore/version.rb | 4 - samples/client/petstore/ruby/petstore.gemspec | 4 - .../spring-cloud/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../spring-stubs/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../petstore/php/.openapi-generator/VERSION | 6 +- .../lib/Api/AnotherFakeApi.php | 4 - .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 4 - .../lib/Api/FakeClassnameTags123Api.php | 4 - .../php/OpenAPIClient-php/lib/Api/PetApi.php | 4 - .../OpenAPIClient-php/lib/Api/StoreApi.php | 4 - .../php/OpenAPIClient-php/lib/Api/UserApi.php | 4 - .../OpenAPIClient-php/lib/ApiException.php | 4 - .../OpenAPIClient-php/lib/Configuration.php | 4 - .../OpenAPIClient-php/lib/HeaderSelector.php | 4 - .../lib/Model/AdditionalPropertiesClass.php | 4 - .../OpenAPIClient-php/lib/Model/Animal.php | 4 - .../lib/Model/AnimalFarm.php | 4 - .../lib/Model/ApiResponse.php | 4 - .../lib/Model/ArrayOfArrayOfNumberOnly.php | 4 - .../lib/Model/ArrayOfNumberOnly.php | 4 - .../OpenAPIClient-php/lib/Model/ArrayTest.php | 4 - .../lib/Model/Capitalization.php | 4 - .../php/OpenAPIClient-php/lib/Model/Cat.php | 4 - .../OpenAPIClient-php/lib/Model/Category.php | 4 - .../lib/Model/ClassModel.php | 4 - .../OpenAPIClient-php/lib/Model/Client.php | 4 - .../php/OpenAPIClient-php/lib/Model/Dog.php | 4 - .../lib/Model/EnumArrays.php | 4 - .../OpenAPIClient-php/lib/Model/EnumClass.php | 4 - .../OpenAPIClient-php/lib/Model/EnumTest.php | 4 - .../lib/Model/FormatTest.php | 4 - .../lib/Model/HasOnlyReadOnly.php | 4 - .../OpenAPIClient-php/lib/Model/MapTest.php | 4 - ...PropertiesAndAdditionalPropertiesClass.php | 4 - .../lib/Model/Model200Response.php | 4 - .../lib/Model/ModelInterface.php | 4 - .../OpenAPIClient-php/lib/Model/ModelList.php | 4 - .../lib/Model/ModelReturn.php | 4 - .../php/OpenAPIClient-php/lib/Model/Name.php | 4 - .../lib/Model/NumberOnly.php | 4 - .../php/OpenAPIClient-php/lib/Model/Order.php | 4 - .../lib/Model/OuterComposite.php | 4 - .../OpenAPIClient-php/lib/Model/OuterEnum.php | 4 - .../php/OpenAPIClient-php/lib/Model/Pet.php | 4 - .../lib/Model/ReadOnlyFirst.php | 4 - .../lib/Model/SpecialModelName.php | 4 - .../php/OpenAPIClient-php/lib/Model/Tag.php | 4 - .../php/OpenAPIClient-php/lib/Model/User.php | 4 - .../lib/ObjectSerializer.php | 4 - .../test/Api/AnotherFakeApiTest.php | 4 - .../test/Api/FakeApiTest.php | 4 - .../test/Api/FakeClassnameTags123ApiTest.php | 4 - .../OpenAPIClient-php/test/Api/PetApiTest.php | 4 - .../test/Api/StoreApiTest.php | 4 - .../test/Api/UserApiTest.php | 4 - .../Model/AdditionalPropertiesClassTest.php | 4 - .../test/Model/AnimalFarmTest.php | 4 - .../test/Model/AnimalTest.php | 4 - .../test/Model/ApiResponseTest.php | 4 - .../Model/ArrayOfArrayOfNumberOnlyTest.php | 4 - .../test/Model/ArrayOfNumberOnlyTest.php | 4 - .../test/Model/ArrayTestTest.php | 4 - .../test/Model/CapitalizationTest.php | 4 - .../OpenAPIClient-php/test/Model/CatTest.php | 4 - .../test/Model/CategoryTest.php | 4 - .../test/Model/ClassModelTest.php | 4 - .../test/Model/ClientTest.php | 4 - .../OpenAPIClient-php/test/Model/DogTest.php | 4 - .../test/Model/EnumArraysTest.php | 4 - .../test/Model/EnumClassTest.php | 4 - .../test/Model/EnumTestTest.php | 4 - .../test/Model/FormatTestTest.php | 4 - .../test/Model/HasOnlyReadOnlyTest.php | 4 - .../test/Model/MapTestTest.php | 4 - ...ertiesAndAdditionalPropertiesClassTest.php | 4 - .../test/Model/Model200ResponseTest.php | 4 - .../test/Model/ModelListTest.php | 4 - .../test/Model/ModelReturnTest.php | 4 - .../OpenAPIClient-php/test/Model/NameTest.php | 4 - .../test/Model/NumberOnlyTest.php | 4 - .../test/Model/OrderTest.php | 4 - .../test/Model/OuterCompositeTest.php | 4 - .../test/Model/OuterEnumTest.php | 4 - .../OpenAPIClient-php/test/Model/PetTest.php | 4 - .../test/Model/ReadOnlyFirstTest.php | 4 - .../test/Model/SpecialModelNameTest.php | 4 - .../OpenAPIClient-php/test/Model/TagTest.php | 4 - .../OpenAPIClient-php/test/Model/UserTest.php | 4 - .../.openapi-generator/VERSION | 6 +- .../jaxrs-cxf-cdi/.openapi-generator/VERSION | 6 +- .../.openapi-generator/VERSION | 6 +- .../jaxrs-cxf/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../default/.openapi-generator/VERSION | 6 +- .../eap-java8/.openapi-generator/VERSION | 6 +- .../eap-joda/.openapi-generator/VERSION | 6 +- .../eap/.openapi-generator/VERSION | 6 +- .../joda/.openapi-generator/VERSION | 6 +- .../.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../src/main/openapi/openapi.yaml | 12 +-- .../jaxrs-spec/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 12 +-- .../.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs/jersey1/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs/jersey2/.openapi-generator/VERSION | 6 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../php-lumen/.openapi-generator/VERSION | 6 +- .../php-slim/.openapi-generator/VERSION | 6 +- .../petstore/php-slim/lib/Models/MapTest.php | 2 +- .../php-slim/lib/Models/OuterComposite.php | 4 +- .../php-symfony/.openapi-generator/VERSION | 6 +- .../php-ze-ph/.openapi-generator/VERSION | 6 +- .../php-ze-ph/src/App/DTO/MapTest.php | 6 +- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../spring-mvc/.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 4 - .../openapitools/api/FakeApiController.java | 2 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 4 - .../openapitools/api/FakeApiController.java | 2 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 4 - .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 4 - .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../src/main/resources/openapi.yaml | 12 +-- .../.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- .../springboot/.openapi-generator/VERSION | 6 +- .../org/openapitools/api/AnotherFakeApi.java | 4 - .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/FakeClassnameTestApi.java | 4 - .../java/org/openapitools/api/PetApi.java | 4 - .../java/org/openapitools/api/StoreApi.java | 4 - .../java/org/openapitools/api/UserApi.java | 4 - .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 ----------- 465 files changed, 293 insertions(+), 3385 deletions(-) delete mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php delete mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java delete mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/docs/MapTest.md b/samples/client/petstore/java/google-api-client/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/google-api-client/docs/MapTest.md +++ b/samples/client/petstore/java/google-api-client/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/docs/MapTest.md b/samples/client/petstore/java/jersey1/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/jersey1/docs/MapTest.md +++ b/samples/client/petstore/java/jersey1/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/docs/MapTest.md b/samples/client/petstore/java/jersey2-java6/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java6/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java index a42b294efdf8..b7964b574e28 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +73,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +153,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +163,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java index 0307a6368dd3..bb6ac11fad36 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -81,7 +81,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 5b20288f8f62..000000000000 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.apache.commons.lang3.ObjectUtils; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return ObjectUtils.hashCodeMulti(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java index be0640778833..25acc48ebec2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/docs/MapTest.md b/samples/client/petstore/java/jersey2/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/jersey2/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index 7d3065804308..a779e2d31b46 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; import android.os.Parcelable; import android.os.Parcel; @@ -96,7 +95,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest() { } @@ -178,7 +177,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -188,11 +187,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } @@ -254,7 +253,7 @@ public void writeToParcel(Parcel out, int flags) { mapMapOfString = (Map>)in.readValue(Map.class.getClassLoader()); mapOfEnumString = (Map)in.readValue(null); directMap = (Map)in.readValue(null); - indirectMap = (StringBooleanMap)in.readValue(StringBooleanMap.class.getClassLoader()); + indirectMap = (Map)in.readValue(Map.class.getClassLoader()); } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index 815af56c993d..eca5cc502141 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -92,7 +92,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index fa40c1e911a7..000000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import android.os.Parcelable; -import android.os.Parcel; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap implements Parcelable { - public StringBooleanMap() { - super(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); - } - - StringBooleanMap(Parcel in) { - super(in); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public StringBooleanMap createFromParcel(Parcel in) { - return new StringBooleanMap(in); - } - public StringBooleanMap[] newArray(int size) { - return new StringBooleanMap[size]; - } - }; -} - diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/docs/MapTest.md b/samples/client/petstore/java/rest-assured/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/rest-assured/docs/MapTest.md +++ b/samples/client/petstore/java/rest-assured/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/docs/MapTest.md b/samples/client/petstore/java/resteasy/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/resteasy/docs/MapTest.md +++ b/samples/client/petstore/java/resteasy/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index d142e7ea62eb..f72497ad1bfd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; @@ -94,7 +93,7 @@ public static InnerEnum fromValue(String text) { @JsonProperty("indirect_map") @JacksonXmlProperty(localName = "indirect_map") @XmlElement(name = "indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index dab2f1bb6fbf..a595be8f33a2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -93,7 +93,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 83beddee9201..000000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; - -/** - * StringBooleanMap - */ - -@XmlRootElement(name = "StringBooleanMap") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "StringBooleanMap") -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/docs/MapTest.md b/samples/client/petstore/java/resttemplate/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/resttemplate/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index 4dedd32ad76a..110bfcdf54d6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md b/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java index a0facaa95d51..afd200c2a853 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -77,7 +76,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -158,7 +157,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -169,11 +168,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @Valid @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java index c60256d92273..f0bf1fbaab2b 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index c651556f7d0a..000000000000 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md b/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java index a0facaa95d51..afd200c2a853 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -77,7 +76,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -158,7 +157,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -169,11 +168,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @Valid @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java index c60256d92273..f0bf1fbaab2b 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index c651556f7d0a..000000000000 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/docs/MapTest.md b/samples/client/petstore/java/retrofit2/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/retrofit2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java index 8de793aede1d..2b3afbf04ed4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,7 +26,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -94,7 +93,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -174,7 +173,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -184,11 +183,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java index 57c787596530..63b156072872 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/docs/MapTest.md b/samples/client/petstore/java/vertx/docs/MapTest.md index f3b592d43fed..53c9921be299 100644 --- a/samples/client/petstore/java/vertx/docs/MapTest.md +++ b/samples/client/petstore/java/vertx/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirectMap** | [**Map**](Map.md) | | [optional] diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java index be0640778833..25acc48ebec2 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -75,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java index 0abe10bcfc21..e1372035e869 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java deleted file mode 100644 index 8b18b0c9b513..000000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/php/.openapi-generator/VERSION b/samples/client/petstore/php/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 41d7335deb1f..e4d699fe972a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -147,7 +147,6 @@ Class | Method | HTTP request | Description - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) - - [StringBooleanMap](docs/Model/StringBooleanMap.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md index a6b378ac1fe8..abf1115ad246 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **map_map_of_string** | [**map[string,map[string,string]]**](map.md) | | [optional] **map_of_enum_string** | **map[string,string]** | | [optional] **direct_map** | **map[string,bool]** | | [optional] -**indirect_map** | [**\OpenAPI\Client\Model\StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirect_map** | [**\OpenAPI\Client\Model\map**](map.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 56231c4daff7..5892fe3245c9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index b11d455811fc..2c40a01b4f9a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 39353e47da04..69df7f8229e1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 673f1ca549b9..3d3ed046e9d5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 93d0c054d9cb..e49133d4642a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 6b650690f414..7e7254b0dcb4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index f88330930e86..068489bf3f4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 53e88fbefcc9..f6f11acaecca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 83933b3704fd..956e562e07d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 5b35961af590..24d099ae9f10 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index e6340ad782c2..8cfaeb0339fc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 7226c4ae1171..6ab8fb874bc0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 048a6b8880d3..530b447626fe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 3a2a1bc3eb71..140a4f65936a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index f9e9c0638741..4220ab9f4068 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index e854381fca88..b2b0c4e2d7ee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 2f8dc89f2aa3..1afa94edbe40 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 5e813840022c..3a67d13acdb8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 1ab8766546a7..6055eacb00af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 8f584846003d..be2145fd847a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 3bb9e3859b82..138823eb93d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 83147f90e137..a53c8c10e22e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 6d8f687cd70c..4af4453992ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index c91e4b2bb7d1..997deb17631c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 3b92d9f20e4e..f676cf2e7fde 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index ad6fc0c0fe8b..e8237af335da 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 43093294874b..5950e75f499c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index f573faedda51..6cb3c7cb2dcf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** @@ -64,7 +60,7 @@ class MapTest implements ModelInterface, ArrayAccess 'map_map_of_string' => 'map[string,map[string,string]]', 'map_of_enum_string' => 'map[string,string]', 'direct_map' => 'map[string,bool]', - 'indirect_map' => '\OpenAPI\Client\Model\StringBooleanMap' + 'indirect_map' => '\OpenAPI\Client\Model\map' ]; /** @@ -325,7 +321,7 @@ public function setDirectMap($direct_map) /** * Gets indirect_map * - * @return \OpenAPI\Client\Model\StringBooleanMap|null + * @return \OpenAPI\Client\Model\map|null */ public function getIndirectMap() { @@ -335,7 +331,7 @@ public function getIndirectMap() /** * Sets indirect_map * - * @param \OpenAPI\Client\Model\StringBooleanMap|null $indirect_map indirect_map + * @param \OpenAPI\Client\Model\map|null $indirect_map indirect_map * * @return $this */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 0c548870828e..2483418c5cd6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3dced246aad6..78dd064c91b9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 5d8070865baa..f77147b51d0d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 6adfc2e61e3f..8f98802b36dc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 16113b205612..7bed78ef1176 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index ad4428f017fe..eb4042a1bde0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 060e949fe65f..3999135c65e0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index b63742ddc0a5..ca3bb50cc9b3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 223aab627093..007d98995d4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 7b68cbfe9b6d..656697e8c3d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index d71a1f08d105..ff148524cd8b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 31490a90f1b7..41a2cd355e75 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index c3dbd455a440..b34310013a42 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index ad6702e4ef4a..0511bd8584af 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 7fc55b7e34da..e2e89e4dfd77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index a40a0b84a8a9..a7760c6c3bce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index dccb61a9c95f..86dda5841001 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index edb53697799d..32b60cb7858b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index ba8a57cf8328..b22c8952fce7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 1628e837f676..38768c8cc22d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 45dcf5ac4f1d..60d3ba37641a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index ff2146531704..6d46e33d3f7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 8d4c4a1384f8..53fb98b6f8fe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index cfe9deefad53..bad9a4ff7a21 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 1c2aa8e1fbe7..77cf8d8c377c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index c4b1019080a5..3d7897cb6f77 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 208ce91f635e..86f6e08d5922 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 46846d0f265c..9af38b98cd6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index edcc82140f50..ad347c5a3955 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 2c08452ad494..bf4a244db51d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index ba1f9f0689c9..3d602e2afdb5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 0c32f8c668db..74744243a388 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index cb90cc66a289..367a01281dbe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index abe1b8a5b809..97b2fe4b3137 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 08a67c9c149a..95caf5749fd1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 06eee83d452d..97a411bf54ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 75e998e7e11f..c361a07c2abe 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 0a2decb13297..2d221b46b692 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index f331993604c9..23c6cda8037b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 5ac8e011ef04..97d9ff1d26ca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index fe5fffb5883f..19399c6d2509 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index f100b46ea586..63a65ea552f7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 14bb58b70550..d305c67d1074 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 4f389e725fce..239ac38847a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 8d0e40fdca93..ac28f1b19099 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 8e9f9a600b1d..8569ae423f22 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index a96df168f7ef..28f3046abad7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index aca0b5ac3cae..5626620b2117 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index adb67ac92e3b..451224e892d4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index eea76e0f9ee2..6474554c55ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 4a70fa4c900c..a136d3003ec4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 26f9fe8ca3a2..c974fb9c8f68 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 8a0914054697..9081228bc6b5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php deleted file mode 100644 index aff312636b3a..000000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php +++ /dev/null @@ -1,78 +0,0 @@ ->>>>>> master */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 3fb8b82e15df..70f353f41f02 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 98f08b8e3423..0342c82cba65 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -141,7 +141,6 @@ Class | Method | HTTP request | Description - [Petstore::Pet](docs/Pet.md) - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Petstore::SpecialModelName](docs/SpecialModelName.md) - - [Petstore::StringBooleanMap](docs/StringBooleanMap.md) - [Petstore::Tag](docs/Tag.md) - [Petstore::User](docs/User.md) diff --git a/samples/client/petstore/ruby/docs/MapTest.md b/samples/client/petstore/ruby/docs/MapTest.md index e7359118889c..20b2dda0dddb 100644 --- a/samples/client/petstore/ruby/docs/MapTest.md +++ b/samples/client/petstore/ruby/docs/MapTest.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes **map_map_of_string** | **Hash<String, Hash<String, String>>** | | [optional] **map_of_enum_string** | **Hash<String, String>** | | [optional] **direct_map** | **Hash<String, BOOLEAN>** | | [optional] -**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] +**indirect_map** | **Hash** | | [optional] diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 0306a640a349..25dbee09b276 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end @@ -52,7 +48,6 @@ require 'petstore/models/pet' require 'petstore/models/read_only_first' require 'petstore/models/special_model_name' -require 'petstore/models/string_boolean_map' require 'petstore/models/tag' require 'petstore/models/user' diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 5f6b2dc9a8e5..78879ac2e5a1 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 28a56f373bf9..b4237e244c69 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index e44c8aadddfc..2e27e128be82 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 00a92b54a143..832162bed17e 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index f829302e2158..0e52d0a743bf 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 39d8ae111258..7d1b45571a6c 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index fcd6f6958457..dd8fb16206b0 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index ffa33d256958..c54635b3c5d9 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 59aacd50a9af..6c64471e150d 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index 3b9933688afd..b3846c26d85d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 29b861b31f0b..baf9784d3ade 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index b8ab9303a29f..913f3916599d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 34cf52e4d59c..5801264dd3c6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index fc3c703ba694..df1167ba60c3 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index dc0ed1a0a47a..372ec29a2990 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index bdd612449302..fc7eb19fdb31 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index baf1467a8cc6..8bc848210a6f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index adea25412573..2f9b6c9c6b7c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 844694ad5f5c..7a9a37252052 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index d82f56ae0b19..4f07b8eb7c6c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 15ffe99d0571..1d10bb83a536 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 4bb6b996715e..f66c7b6b5b9e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index d0c9513b7183..1ce7d829787f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 3481e1ec1ad4..5cd8f3eebc1b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 624514c15261..6ffbda5b541d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 4dc33309fd6b..57f5859c2053 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 15b885b9e5d6..3b9520c7a807 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index 1449e688eaf4..053754d2fda2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 93ca37789361..e1c1f2da50c8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end @@ -64,7 +60,7 @@ def self.openapi_types :'map_map_of_string' => :'Hash>', :'map_of_enum_string' => :'Hash', :'direct_map' => :'Hash', - :'indirect_map' => :'StringBooleanMap' + :'indirect_map' => :'Hash' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index aa7b42b0ff6b..6272eb532f26 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index b0416a32785b..b2e578955878 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index aec116bde9bb..24a4effe95c5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 14d469b12d34..16623c9172af 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index cfb328d3c1b9..9cc706162f27 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 47b8f4165cec..894d5657698e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index eeeb532b077a..312f149ab96f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index fa96f753e0e7..b640af3dd514 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 97b2c731bdf2..441e29665ed7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index b0bdc8dcdd34..3422f98e985f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index 4db3fbdb6b32..cac6fc0d6974 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index e6a18e464ac0..1622c832086d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 5225410b5c4c..1a0b96fcb20f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 3e5436df90b8..ff566ba51c3c 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,11 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 9757288e7480..2f6a64862156 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,11 +8,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -<<<<<<< HEAD OpenAPI Generator version: 3.0.3 -======= -OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master =end diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 5468d39f7e46..546a211d4295 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 06faf72debf7..520cf12f33dd 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 96b39b66ff34..168658b65700 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 4dd19555fedb..c1ca6d4eed1c 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 4e85de5daa30..b4eef869ca33 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 91cfcc75872c..9d14f976e9ea 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 56231c4daff7..5892fe3245c9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index d1ce53e7993f..45e354ed6432 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 39353e47da04..69df7f8229e1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index e5e036da3789..be184f05d706 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 4a526527c717..8a1dc94b0fb8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index bb7a7e84b058..df814eeaef21 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index f88330930e86..068489bf3f4a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 53e88fbefcc9..f6f11acaecca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 83933b3704fd..956e562e07d3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 5b35961af590..24d099ae9f10 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index e6340ad782c2..8cfaeb0339fc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 7226c4ae1171..6ab8fb874bc0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 048a6b8880d3..530b447626fe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 3a2a1bc3eb71..140a4f65936a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index f9e9c0638741..4220ab9f4068 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index e854381fca88..b2b0c4e2d7ee 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 2f8dc89f2aa3..1afa94edbe40 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 5e813840022c..3a67d13acdb8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 1ab8766546a7..6055eacb00af 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 8f584846003d..be2145fd847a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 3bb9e3859b82..138823eb93d2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 83147f90e137..a53c8c10e22e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 6d8f687cd70c..4af4453992ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index c91e4b2bb7d1..997deb17631c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 3b92d9f20e4e..f676cf2e7fde 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index ad636ef074c1..30e31911c96b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 43093294874b..5950e75f499c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 7f58442fc307..2785e00ef118 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 0c548870828e..2483418c5cd6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3dced246aad6..78dd064c91b9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 5d8070865baa..f77147b51d0d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 6adfc2e61e3f..8f98802b36dc 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 16113b205612..7bed78ef1176 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 184d11a79e36..f0f632339690 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 060e949fe65f..3999135c65e0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index b63742ddc0a5..ca3bb50cc9b3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 223aab627093..007d98995d4a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 7b68cbfe9b6d..656697e8c3d3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index d71a1f08d105..ff148524cd8b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 31490a90f1b7..41a2cd355e75 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 1d2fa00d27de..58e20910a618 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index ad6702e4ef4a..0511bd8584af 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 7fc55b7e34da..e2e89e4dfd77 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index a40a0b84a8a9..a7760c6c3bce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index dccb61a9c95f..86dda5841001 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index edb53697799d..32b60cb7858b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index ba8a57cf8328..b22c8952fce7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 1628e837f676..38768c8cc22d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 45dcf5ac4f1d..60d3ba37641a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index ff2146531704..6d46e33d3f7d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,11 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 8d4c4a1384f8..53fb98b6f8fe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index cfe9deefad53..bad9a4ff7a21 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 1c2aa8e1fbe7..77cf8d8c377c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index c4b1019080a5..3d7897cb6f77 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 208ce91f635e..86f6e08d5922 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 46846d0f265c..9af38b98cd6d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index edcc82140f50..ad347c5a3955 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index 2c08452ad494..bf4a244db51d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index ba1f9f0689c9..3d602e2afdb5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 0c32f8c668db..74744243a388 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index cb90cc66a289..367a01281dbe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index abe1b8a5b809..97b2fe4b3137 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 08a67c9c149a..95caf5749fd1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 06eee83d452d..97a411bf54ce 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 75e998e7e11f..c361a07c2abe 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 0a2decb13297..2d221b46b692 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index f331993604c9..23c6cda8037b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 5ac8e011ef04..97d9ff1d26ca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index f1eed73ff58a..59b0439fd2b7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index f100b46ea586..63a65ea552f7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 14bb58b70550..d305c67d1074 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 4f389e725fce..239ac38847a2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 8d0e40fdca93..ac28f1b19099 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 8e9f9a600b1d..8569ae423f22 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index a96df168f7ef..28f3046abad7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index aca0b5ac3cae..5626620b2117 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index adb67ac92e3b..451224e892d4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index eea76e0f9ee2..6474554c55ec 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 4a70fa4c900c..a136d3003ec4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 26f9fe8ca3a2..c974fb9c8f68 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 8a0914054697..9081228bc6b5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index c3db94ee4456..1a49a5d3971a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 3fb8b82e15df..70f353f41f02 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,11 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech -<<<<<<< HEAD * OpenAPI Generator version: 3.0.3 -======= - * OpenAPI Generator version: 3.1.0-SNAPSHOT ->>>>>>> master */ /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java index 50e018a50356..c31f8ee8fef0 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java @@ -3,7 +3,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -63,7 +62,7 @@ public static InnerEnum fromValue(String v) { @ApiModelProperty(value = "") @Valid - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; /** * Get mapMapOfString * @return mapMapOfString @@ -138,15 +137,15 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * @return indirectMap **/ @JsonProperty("indirect_map") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java index dd8626ae8c73..3feb13756655 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java @@ -66,7 +66,7 @@ public OuterComposite myString(String myString) { * @return myBoolean **/ @JsonProperty("my_boolean") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java index 1863dcb233fc..f2996e981ef3 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; @@ -72,7 +71,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -155,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -166,11 +165,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java index a768b55de38b..5da708d5e196 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index 77bc760d8057..417428e2dc91 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -3,7 +3,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -52,7 +51,7 @@ public static InnerEnum fromValue(String v) { private @Valid Map mapOfEnumString = new HashMap(); private @Valid Map directMap = new HashMap(); - private @Valid StringBooleanMap indirectMap = null; + private @Valid Map indirectMap = null; /** **/ @@ -107,7 +106,7 @@ public void setDirectMap(Map directMap) { /** **/ - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -115,10 +114,10 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @ApiModelProperty(value = "") @JsonProperty("indirect_map") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index 192b50388b0a..f16bef370a77 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -61,7 +61,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") @JsonProperty("my_boolean") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } public void setMyBoolean(Boolean myBoolean) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index fa165f2bff1b..03eb5d29a437 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1384,18 +1384,14 @@ components: type: array type: object OuterComposite: - example: - my_string: my_string - my_number: 0.80082819046101150206595775671303272247314453125 - my_boolean: true + example: {} properties: my_number: - type: number + $ref: '#/components/schemas/OuterNumber' my_string: - type: string + $ref: '#/components/schemas/OuterString' my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body + $ref: '#/components/schemas/OuterBoolean' type: object format_test: properties: diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index 77bc760d8057..417428e2dc91 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -3,7 +3,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -52,7 +51,7 @@ public static InnerEnum fromValue(String v) { private @Valid Map mapOfEnumString = new HashMap(); private @Valid Map directMap = new HashMap(); - private @Valid StringBooleanMap indirectMap = null; + private @Valid Map indirectMap = null; /** **/ @@ -107,7 +106,7 @@ public void setDirectMap(Map directMap) { /** **/ - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -115,10 +114,10 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @ApiModelProperty(value = "") @JsonProperty("indirect_map") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index 192b50388b0a..f16bef370a77 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -61,7 +61,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") @JsonProperty("my_boolean") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } public void setMyBoolean(Boolean myBoolean) { diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index fa165f2bff1b..03eb5d29a437 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1384,18 +1384,14 @@ components: type: array type: object OuterComposite: - example: - my_string: my_string - my_number: 0.80082819046101150206595775671303272247314453125 - my_boolean: true + example: {} properties: my_number: - type: number + $ref: '#/components/schemas/OuterNumber' my_string: - type: string + $ref: '#/components/schemas/OuterString' my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body + $ref: '#/components/schemas/OuterBoolean' type: object format_test: properties: diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java index b39cf01198a3..efbbd70e2bb3 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -71,7 +70,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +153,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java index dd4a7e47be60..7df1ce746e1e 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java index b39cf01198a3..efbbd70e2bb3 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -71,7 +70,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +153,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java index dd4a7e47be60..7df1ce746e1e 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java index b39cf01198a3..efbbd70e2bb3 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -71,7 +70,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +153,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java index dd4a7e47be60..7df1ce746e1e 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java index b39cf01198a3..efbbd70e2bb3 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -71,7 +70,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +153,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +164,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java index dd4a7e47be60..7df1ce746e1e 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-slim/.openapi-generator/VERSION b/samples/server/petstore/php-slim/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/php-slim/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-slim/lib/Models/MapTest.php b/samples/server/petstore/php-slim/lib/Models/MapTest.php index e5c815279b26..c3c70327dfe8 100644 --- a/samples/server/petstore/php-slim/lib/Models/MapTest.php +++ b/samples/server/petstore/php-slim/lib/Models/MapTest.php @@ -14,6 +14,6 @@ class MapTest { private $mapOfEnumString; /* @var map[string,Bool] $directMap */ private $directMap; -/* @var \\Models\StringBooleanMap $indirectMap */ +/* @var \\Models\map $indirectMap */ private $indirectMap; } diff --git a/samples/server/petstore/php-slim/lib/Models/OuterComposite.php b/samples/server/petstore/php-slim/lib/Models/OuterComposite.php index b4364bf655fc..7cdfb8483371 100644 --- a/samples/server/petstore/php-slim/lib/Models/OuterComposite.php +++ b/samples/server/petstore/php-slim/lib/Models/OuterComposite.php @@ -8,10 +8,10 @@ * OuterComposite */ class OuterComposite { - /* @var Number $myNumber */ + /* @var \\Models\Number $myNumber */ private $myNumber; /* @var string $myString */ private $myString; -/* @var Bool $myBoolean */ +/* @var \\Models\Bool $myBoolean */ private $myBoolean; } diff --git a/samples/server/petstore/php-symfony/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/php-symfony/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php b/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php index 0f933f96c122..172f8b9e91ba 100644 --- a/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php +++ b/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php @@ -38,9 +38,9 @@ class MapTest public $direct_map; /** * @DTA\Data(field="indirect_map", nullable=true) - * @DTA\Strategy(name="Object", options={"type":\App\DTO\StringBooleanMap::class}) - * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\StringBooleanMap::class}) - * @var \App\DTO\StringBooleanMap + * @DTA\Strategy(name="Object", options={"type":\App\DTO\map::class}) + * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\map::class}) + * @var \App\DTO\map */ public $indirect_map; } diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index e8e32c3ff8f0..8d44bcf2846a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 8f72f53db8a8..bba644174ee9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -80,7 +76,7 @@ default CompletableFuture> fakeOuterCompositeSeri getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 561d46644a39..2e907cc8bf5a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index de4a1798a731..3ea94df7e7d1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 35cad0ab2833..182c324db240 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 9b0474c59270..5ad00b0a39fa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 205557391619..852959ae715d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index 64ed3b4a03ae..d3ab34cc3630 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -76,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3a2dbc6ab911..6ec203e9150e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 194987eb251a..624d94b7e43c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 31162a9c565f..7abe1703b576 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 81d3efa97982..b94918273090 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6ba5d7cce679..26bcbf2a4992 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 3193fcb18662..10001f1bc616 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index fef8e0576992..624be6d6926a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -52,7 +52,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite outerComposite) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9aa018cc5dc4..237fdee71909 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index aabef412c73f..f57676904153 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 1d921f204289..1e06ac54251b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index d163b9b110f6..da06dff545cf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 8bd49e484086..f5c224b73775 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6ba5d7cce679..26bcbf2a4992 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 3193fcb18662..10001f1bc616 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index 000b811e058e..26af39e6eb1b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -52,7 +52,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite outerComposite) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9aa018cc5dc4..237fdee71909 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index aabef412c73f..f57676904153 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 1d921f204289..1e06ac54251b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index d163b9b110f6..da06dff545cf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 8bd49e484086..f5c224b73775 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index f9baec763cdf..21fc02c5169a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 9d01b04c8b20..33ad8fb5dfc5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index aea629f7edaa..bbc6dcd9176a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -53,7 +53,7 @@ default ResponseEntity fakeOuterCompositeSerialize( OuterComposi getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b7e78c677e1b..0d582b334273 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 8dd96fc7f11d..1fdcb95ddd03 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index f7a775421ead..73d75a8b1ce9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 790fef3766d8..c1fc26fd8b4c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6ba5d7cce679..26bcbf2a4992 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 3193fcb18662..10001f1bc616 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9aa018cc5dc4..237fdee71909 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index aabef412c73f..f57676904153 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 1d921f204289..1e06ac54251b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index d163b9b110f6..da06dff545cf 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 8bd49e484086..f5c224b73775 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3cf05ba62737..62dfcfa2fe3d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 499be7dc10e9..ac59568e1bf4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -80,7 +76,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3ea012c5de33..d9f4c692cf91 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 6f8521b7a819..6a1985bdf8e4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 102f5dd8e856..757fcfc2830a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 6fc86c23d4eb..5199064cb7e0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index ee14a72ffa65..25c9c8c43c78 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index a844103ee129..1ca1d5289745 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -74,7 +70,7 @@ default ResponseEntity> fakeOuterCompositeSerialize(@ApiPar Mono result = Mono.empty(); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - result = ApiUtil.getExampleResponse(exchange, "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}") + result = ApiUtil.getExampleResponse(exchange, "{ }") .then(Mono.empty()); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 072af62642c6..6f2367b13191 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 294c0f4e30ad..13c2117e558b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 4f2c9c539235..208168a8e73f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index ba3f27c1322b..33f906af290a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index b09398ca5e11..a7239a6d9136 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1439,18 +1439,14 @@ components: type: array type: object OuterComposite: - example: - my_string: my_string - my_number: 0.80082819046101150206595775671303272247314453125 - my_boolean: true + example: {} properties: my_number: - type: number + $ref: '#/components/schemas/OuterNumber' my_string: - type: string + $ref: '#/components/schemas/OuterString' my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body + $ref: '#/components/schemas/OuterBoolean' type: object format_test: properties: diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 205557391619..852959ae715d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 7d66ac112e52..f452c18377ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -76,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3a2dbc6ab911..6ec203e9150e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 6458ddeacc7f..d30446f411ac 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 31162a9c565f..7abe1703b576 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 81d3efa97982..b94918273090 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 30e11aad3750..282895a8f8f1 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1,5 +1 @@ -<<<<<<< HEAD -3.0.3 -======= -3.1.0-SNAPSHOT ->>>>>>> master +3.0.3 \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 205557391619..852959ae715d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 4713e5b3a0a0..8620fbf7fe55 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ @@ -76,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); + ApiUtil.setExampleResponse(request, "*/*", "{ }"); break; } } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3a2dbc6ab911..6ec203e9150e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 194987eb251a..624d94b7e43c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 31162a9c565f..7abe1703b576 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 81d3efa97982..b94918273090 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,9 +1,5 @@ /** -<<<<<<< HEAD * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). -======= - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). ->>>>>>> master * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 818a51978c47..fed9bce1c999 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -62,7 +61,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private StringBooleanMap indirectMap = null; + private Map indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -149,7 +148,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } @@ -162,11 +161,11 @@ public MapTest indirectMap(StringBooleanMap indirectMap) { @Valid - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index d8de39544160..c343b0b39edd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean isMyBoolean() { + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java deleted file mode 100644 index 42b689e5e223..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.model; - -import java.util.Objects; -import java.util.HashMap; -import java.util.Map; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * StringBooleanMap - */ - -public class StringBooleanMap extends HashMap { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StringBooleanMap {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - From 34397548925e996a1b87982354916a9ede44aed5 Mon Sep 17 00:00:00 2001 From: grokify Date: Wed, 27 Jun 2018 22:48:18 -0700 Subject: [PATCH 15/18] update samples --- .../java/feign/.openapi-generator/VERSION | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../.openapi-generator/VERSION | 2 +- .../java/google-api-client/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../java/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey1/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../jersey2-java6/.openapi-generator/VERSION | 2 +- .../java/jersey2-java6/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 64 +++++++++++++ .../jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../java/jersey2/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../.openapi-generator/VERSION | 2 +- .../docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 11 ++- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 91 +++++++++++++++++++ .../okhttp-gson/.openapi-generator/VERSION | 2 +- .../petstore/java/okhttp-gson/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../rest-assured/.openapi-generator/VERSION | 2 +- .../java/rest-assured/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../java/resteasy/.openapi-generator/VERSION | 2 +- .../petstore/java/resteasy/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 70 ++++++++++++++ .../resttemplate/.openapi-generator/VERSION | 2 +- .../java/resttemplate/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../java/retrofit/.openapi-generator/VERSION | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../.openapi-generator/VERSION | 2 +- .../java/retrofit2-play24/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 67 ++++++++++++++ .../.openapi-generator/VERSION | 2 +- .../java/retrofit2-play25/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 67 ++++++++++++++ .../java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../retrofit2rx/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../retrofit2rx2/.openapi-generator/VERSION | 2 +- .../java/retrofit2rx2/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../java/vertx/.openapi-generator/VERSION | 2 +- .../petstore/java/vertx/docs/MapTest.md | 2 +- .../openapitools/client/model/MapTest.java | 9 +- .../client/model/OuterComposite.java | 2 +- .../client/model/StringBooleanMap.java | 65 +++++++++++++ .../kotlin-string/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin/.openapi-generator/VERSION | 2 +- .../petstore/php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/README.md | 1 + .../OpenAPIClient-php/docs/Model/MapTest.md | 2 +- .../lib/Api/AnotherFakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../lib/Api/FakeClassnameTags123Api.php | 2 +- .../php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../OpenAPIClient-php/lib/ApiException.php | 2 +- .../OpenAPIClient-php/lib/Configuration.php | 2 +- .../OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../lib/Model/AnimalFarm.php | 2 +- .../lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../lib/Model/ArrayOfNumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../lib/Model/Capitalization.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../OpenAPIClient-php/lib/Model/Category.php | 2 +- .../lib/Model/ClassModel.php | 2 +- .../OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../lib/Model/EnumArrays.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/FormatTest.php | 2 +- .../lib/Model/HasOnlyReadOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/MapTest.php | 8 +- ...PropertiesAndAdditionalPropertiesClass.php | 2 +- .../lib/Model/Model200Response.php | 2 +- .../lib/Model/ModelInterface.php | 2 +- .../OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../lib/Model/ModelReturn.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../lib/Model/NumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../lib/Model/OuterComposite.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../lib/Model/ReadOnlyFirst.php | 2 +- .../lib/Model/SpecialModelName.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../lib/ObjectSerializer.php | 2 +- .../test/Api/AnotherFakeApiTest.php | 2 +- .../test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../test/Api/StoreApiTest.php | 2 +- .../test/Api/UserApiTest.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AnimalFarmTest.php | 2 +- .../test/Model/AnimalTest.php | 2 +- .../test/Model/ApiResponseTest.php | 2 +- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayTestTest.php | 2 +- .../test/Model/CapitalizationTest.php | 2 +- .../OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../test/Model/CategoryTest.php | 2 +- .../test/Model/ClassModelTest.php | 2 +- .../test/Model/ClientTest.php | 2 +- .../OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../test/Model/EnumArraysTest.php | 2 +- .../test/Model/EnumClassTest.php | 2 +- .../test/Model/EnumTestTest.php | 2 +- .../test/Model/FormatTestTest.php | 2 +- .../test/Model/HasOnlyReadOnlyTest.php | 2 +- .../test/Model/MapTestTest.php | 2 +- ...ertiesAndAdditionalPropertiesClassTest.php | 2 +- .../test/Model/Model200ResponseTest.php | 2 +- .../test/Model/ModelListTest.php | 2 +- .../test/Model/ModelReturnTest.php | 2 +- .../OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../test/Model/NumberOnlyTest.php | 2 +- .../test/Model/OrderTest.php | 2 +- .../test/Model/OuterCompositeTest.php | 2 +- .../test/Model/OuterEnumTest.php | 2 +- .../OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../test/Model/ReadOnlyFirstTest.php | 2 +- .../test/Model/SpecialModelNameTest.php | 2 +- .../test/Model/StringBooleanMapTest.php | 78 ++++++++++++++++ .../OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/README.md | 1 + samples/client/petstore/ruby/docs/MapTest.md | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 3 +- .../ruby/lib/petstore/api/another_fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../api/fake_classname_tags123_api.rb | 2 +- .../petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- .../ruby/lib/petstore/api/store_api.rb | 2 +- .../ruby/lib/petstore/api/user_api.rb | 2 +- .../petstore/ruby/lib/petstore/api_client.rb | 2 +- .../petstore/ruby/lib/petstore/api_error.rb | 2 +- .../ruby/lib/petstore/configuration.rb | 2 +- .../models/additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/animal.rb | 2 +- .../ruby/lib/petstore/models/animal_farm.rb | 2 +- .../ruby/lib/petstore/models/api_response.rb | 2 +- .../models/array_of_array_of_number_only.rb | 2 +- .../petstore/models/array_of_number_only.rb | 2 +- .../ruby/lib/petstore/models/array_test.rb | 2 +- .../lib/petstore/models/capitalization.rb | 2 +- .../petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../ruby/lib/petstore/models/category.rb | 2 +- .../ruby/lib/petstore/models/class_model.rb | 2 +- .../ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../ruby/lib/petstore/models/enum_class.rb | 2 +- .../ruby/lib/petstore/models/enum_test.rb | 2 +- .../ruby/lib/petstore/models/format_test.rb | 2 +- .../lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/list.rb | 2 +- .../ruby/lib/petstore/models/map_test.rb | 4 +- ...perties_and_additional_properties_class.rb | 2 +- .../lib/petstore/models/model200_response.rb | 2 +- .../ruby/lib/petstore/models/model_return.rb | 2 +- .../petstore/ruby/lib/petstore/models/name.rb | 2 +- .../ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/order.rb | 2 +- .../lib/petstore/models/outer_composite.rb | 2 +- .../ruby/lib/petstore/models/outer_enum.rb | 2 +- .../petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../lib/petstore/models/read_only_first.rb | 2 +- .../lib/petstore/models/special_model_name.rb | 2 +- .../petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../petstore/ruby/lib/petstore/models/user.rb | 2 +- .../petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- .../spring-cloud/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../spring-stubs/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../petstore/php/.openapi-generator/VERSION | 2 +- .../lib/Api/AnotherFakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../lib/Api/FakeClassnameTags123Api.php | 2 +- .../php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../OpenAPIClient-php/lib/ApiException.php | 2 +- .../OpenAPIClient-php/lib/Configuration.php | 2 +- .../OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../lib/Model/AnimalFarm.php | 2 +- .../lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../lib/Model/ArrayOfNumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../lib/Model/Capitalization.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../OpenAPIClient-php/lib/Model/Category.php | 2 +- .../lib/Model/ClassModel.php | 2 +- .../OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../lib/Model/EnumArrays.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/FormatTest.php | 2 +- .../lib/Model/HasOnlyReadOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/MapTest.php | 2 +- ...PropertiesAndAdditionalPropertiesClass.php | 2 +- .../lib/Model/Model200Response.php | 2 +- .../lib/Model/ModelInterface.php | 2 +- .../OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../lib/Model/ModelReturn.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../lib/Model/NumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../lib/Model/OuterComposite.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../lib/Model/ReadOnlyFirst.php | 2 +- .../lib/Model/SpecialModelName.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../lib/ObjectSerializer.php | 2 +- .../test/Api/AnotherFakeApiTest.php | 2 +- .../test/Api/FakeApiTest.php | 2 +- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../OpenAPIClient-php/test/Api/PetApiTest.php | 2 +- .../test/Api/StoreApiTest.php | 2 +- .../test/Api/UserApiTest.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 2 +- .../test/Model/AnimalFarmTest.php | 2 +- .../test/Model/AnimalTest.php | 2 +- .../test/Model/ApiResponseTest.php | 2 +- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayOfNumberOnlyTest.php | 2 +- .../test/Model/ArrayTestTest.php | 2 +- .../test/Model/CapitalizationTest.php | 2 +- .../OpenAPIClient-php/test/Model/CatTest.php | 2 +- .../test/Model/CategoryTest.php | 2 +- .../test/Model/ClassModelTest.php | 2 +- .../test/Model/ClientTest.php | 2 +- .../OpenAPIClient-php/test/Model/DogTest.php | 2 +- .../test/Model/EnumArraysTest.php | 2 +- .../test/Model/EnumClassTest.php | 2 +- .../test/Model/EnumTestTest.php | 2 +- .../test/Model/FormatTestTest.php | 2 +- .../test/Model/HasOnlyReadOnlyTest.php | 2 +- .../test/Model/MapTestTest.php | 2 +- ...ertiesAndAdditionalPropertiesClassTest.php | 2 +- .../test/Model/Model200ResponseTest.php | 2 +- .../test/Model/ModelListTest.php | 2 +- .../test/Model/ModelReturnTest.php | 2 +- .../OpenAPIClient-php/test/Model/NameTest.php | 2 +- .../test/Model/NumberOnlyTest.php | 2 +- .../test/Model/OrderTest.php | 2 +- .../test/Model/OuterCompositeTest.php | 2 +- .../test/Model/OuterEnumTest.php | 2 +- .../OpenAPIClient-php/test/Model/PetTest.php | 2 +- .../test/Model/ReadOnlyFirstTest.php | 2 +- .../test/Model/SpecialModelNameTest.php | 2 +- .../OpenAPIClient-php/test/Model/TagTest.php | 2 +- .../OpenAPIClient-php/test/Model/UserTest.php | 2 +- .../.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../default/.openapi-generator/VERSION | 2 +- .../eap-java8/.openapi-generator/VERSION | 2 +- .../eap-joda/.openapi-generator/VERSION | 2 +- .../eap/.openapi-generator/VERSION | 2 +- .../joda/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../src/main/openapi/openapi.yaml | 12 ++- .../jaxrs-spec/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 12 ++- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../php-lumen/.openapi-generator/VERSION | 2 +- .../php-slim/.openapi-generator/VERSION | 2 +- .../petstore/php-slim/lib/Models/MapTest.php | 2 +- .../php-slim/lib/Models/OuterComposite.php | 4 +- .../php-symfony/.openapi-generator/VERSION | 2 +- .../php-ze-ph/.openapi-generator/VERSION | 2 +- .../php-ze-ph/src/App/DTO/MapTest.php | 6 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../spring-mvc/.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/api/FakeApiController.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/api/FakeApiController.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../src/main/resources/openapi.yaml | 12 ++- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ .../springboot/.openapi-generator/VERSION | 2 +- .../org/openapitools/api/AnotherFakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTestApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../java/org/openapitools/model/MapTest.java | 9 +- .../openapitools/model/OuterComposite.java | 2 +- .../openapitools/model/StringBooleanMap.java | 51 +++++++++++ 465 files changed, 2326 insertions(+), 570 deletions(-) create mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java create mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php create mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java create mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/docs/MapTest.md b/samples/client/petstore/java/google-api-client/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/google-api-client/docs/MapTest.md +++ b/samples/client/petstore/java/google-api-client/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/docs/MapTest.md b/samples/client/petstore/java/jersey1/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/jersey1/docs/MapTest.md +++ b/samples/client/petstore/java/jersey1/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/docs/MapTest.md b/samples/client/petstore/java/jersey2-java6/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java6/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java index b7964b574e28..a42b294efdf8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -73,7 +74,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -153,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -163,11 +164,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java index bb6ac11fad36..0307a6368dd3 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -81,7 +81,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..5b20288f8f62 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,64 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.apache.commons.lang3.ObjectUtils; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2-java8/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java index 25acc48ebec2..be0640778833 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/jersey2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/docs/MapTest.md b/samples/client/petstore/java/jersey2/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/jersey2/docs/MapTest.md +++ b/samples/client/petstore/java/jersey2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index a779e2d31b46..7d3065804308 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; import android.os.Parcelable; import android.os.Parcel; @@ -95,7 +96,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest() { } @@ -177,7 +178,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -187,11 +188,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } @@ -253,7 +254,7 @@ public void writeToParcel(Parcel out, int flags) { mapMapOfString = (Map>)in.readValue(Map.class.getClassLoader()); mapOfEnumString = (Map)in.readValue(null); directMap = (Map)in.readValue(null); - indirectMap = (Map)in.readValue(Map.class.getClassLoader()); + indirectMap = (StringBooleanMap)in.readValue(StringBooleanMap.class.getClassLoader()); } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index eca5cc502141..815af56c993d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -92,7 +92,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..fa40c1e911a7 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,91 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import android.os.Parcelable; +import android.os.Parcel; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap implements Parcelable { + public StringBooleanMap() { + super(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public void writeToParcel(Parcel out, int flags) { + super.writeToParcel(out, flags); + } + + StringBooleanMap(Parcel in) { + super(in); + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public StringBooleanMap createFromParcel(Parcel in) { + return new StringBooleanMap(in); + } + public StringBooleanMap[] newArray(int size) { + return new StringBooleanMap[size]; + } + }; +} + diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/MapTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/docs/MapTest.md b/samples/client/petstore/java/rest-assured/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/rest-assured/docs/MapTest.md +++ b/samples/client/petstore/java/rest-assured/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/docs/MapTest.md b/samples/client/petstore/java/resteasy/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/resteasy/docs/MapTest.md +++ b/samples/client/petstore/java/resteasy/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java index f72497ad1bfd..d142e7ea62eb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; import com.fasterxml.jackson.dataformat.xml.annotation.*; import javax.xml.bind.annotation.*; @@ -93,7 +94,7 @@ public static InnerEnum fromValue(String text) { @JsonProperty("indirect_map") @JacksonXmlProperty(localName = "indirect_map") @XmlElement(name = "indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java index a595be8f33a2..dab2f1bb6fbf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -93,7 +93,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..83beddee9201 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; + +/** + * StringBooleanMap + */ + +@XmlRootElement(name = "StringBooleanMap") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "StringBooleanMap") +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/docs/MapTest.md b/samples/client/petstore/java/resttemplate/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/resttemplate/docs/MapTest.md +++ b/samples/client/petstore/java/resttemplate/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index 110bfcdf54d6..4dedd32ad76a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md b/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java index afd200c2a853..a0facaa95d51 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -76,7 +77,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -157,7 +158,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -168,11 +169,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @Valid @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java index f0bf1fbaab2b..c60256d92273 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..c651556f7d0a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import javax.validation.constraints.*; +import javax.validation.Valid; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md b/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java index afd200c2a853..a0facaa95d51 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -76,7 +77,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -157,7 +158,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -168,11 +169,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @Valid @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java index f0bf1fbaab2b..c60256d92273 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..c651556f7d0a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,67 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import javax.validation.constraints.*; +import javax.validation.Valid; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/docs/MapTest.md b/samples/client/petstore/java/retrofit2/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/retrofit2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java index 2b3afbf04ed4..8de793aede1d 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -93,7 +94,7 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -173,7 +174,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -183,11 +184,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java index 63b156072872..57c787596530 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -88,7 +88,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/docs/MapTest.md b/samples/client/petstore/java/vertx/docs/MapTest.md index 53c9921be299..f3b592d43fed 100644 --- a/samples/client/petstore/java/vertx/docs/MapTest.md +++ b/samples/client/petstore/java/vertx/docs/MapTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] **mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] **directMap** | **Map<String, Boolean>** | | [optional] -**indirectMap** | [**Map**](Map.md) | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java index 25acc48ebec2..be0640778833 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/MapTest.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.client.model.StringBooleanMap; /** * MapTest @@ -74,7 +75,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { * @return indirectMap **/ @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java index e1372035e869..0abe10bcfc21 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -82,7 +82,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java new file mode 100644 index 000000000000..8b18b0c9b513 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/StringBooleanMap.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/.openapi-generator/VERSION b/samples/client/petstore/php/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index e4d699fe972a..41d7335deb1f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -147,6 +147,7 @@ Class | Method | HTTP request | Description - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SpecialModelName](docs/Model/SpecialModelName.md) + - [StringBooleanMap](docs/Model/StringBooleanMap.md) - [Tag](docs/Model/Tag.md) - [User](docs/Model/User.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md index abf1115ad246..a6b378ac1fe8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/MapTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **map_map_of_string** | [**map[string,map[string,string]]**](map.md) | | [optional] **map_of_enum_string** | **map[string,string]** | | [optional] **direct_map** | **map[string,bool]** | | [optional] -**indirect_map** | [**\OpenAPI\Client\Model\map**](map.md) | | [optional] +**indirect_map** | [**\OpenAPI\Client\Model\StringBooleanMap**](StringBooleanMap.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 5892fe3245c9..62e71d99fa67 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 2c40a01b4f9a..aa02caf338b2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 69df7f8229e1..bf5243410750 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 3d3ed046e9d5..a2b2b7aed021 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index e49133d4642a..01636e3356c8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 7e7254b0dcb4..54849c59c9db 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 068489bf3f4a..a20c344de96c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index f6f11acaecca..b26b84668d9c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 956e562e07d3..4af0b3af00a4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 24d099ae9f10..1456c315d079 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 8cfaeb0339fc..ca0142fa51ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 6ab8fb874bc0..aadb757a9180 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 530b447626fe..092712c11b98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 140a4f65936a..77aed6545d75 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 4220ab9f4068..d9dc8aa03733 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index b2b0c4e2d7ee..6a8a60756d5e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 1afa94edbe40..c9205e6baed2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 3a67d13acdb8..52d5b8996349 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 6055eacb00af..6dffead2b8e6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index be2145fd847a..a6bef51d463d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 138823eb93d2..af02a8a0c090 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index a53c8c10e22e..ad281540e6a4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 4af4453992ed..d49b2effeec8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 997deb17631c..62e1dd4011b2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index f676cf2e7fde..aee7d38da54a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index e8237af335da..18451ace8c6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 5950e75f499c..0aec1a15b1d8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 6cb3c7cb2dcf..558bd7472d81 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** @@ -60,7 +60,7 @@ class MapTest implements ModelInterface, ArrayAccess 'map_map_of_string' => 'map[string,map[string,string]]', 'map_of_enum_string' => 'map[string,string]', 'direct_map' => 'map[string,bool]', - 'indirect_map' => '\OpenAPI\Client\Model\map' + 'indirect_map' => '\OpenAPI\Client\Model\StringBooleanMap' ]; /** @@ -321,7 +321,7 @@ public function setDirectMap($direct_map) /** * Gets indirect_map * - * @return \OpenAPI\Client\Model\map|null + * @return \OpenAPI\Client\Model\StringBooleanMap|null */ public function getIndirectMap() { @@ -331,7 +331,7 @@ public function getIndirectMap() /** * Sets indirect_map * - * @param \OpenAPI\Client\Model\map|null $indirect_map indirect_map + * @param \OpenAPI\Client\Model\StringBooleanMap|null $indirect_map indirect_map * * @return $this */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 2483418c5cd6..2402bee97b0c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 78dd064c91b9..e035873780c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index f77147b51d0d..bc7317866e7c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8f98802b36dc..cd21b4dcaa8d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 7bed78ef1176..15abe91dec0a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index eb4042a1bde0..8df9358a58cf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 3999135c65e0..a5b9cd582bc4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index ca3bb50cc9b3..00d662c1b8f4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 007d98995d4a..3ed0c2cdb879 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 656697e8c3d3..83b8f9d58366 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index ff148524cd8b..e6ca4db495e9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 41a2cd355e75..3175f6927089 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index b34310013a42..d2ee354ef30a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 0511bd8584af..563a4ec39e53 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index e2e89e4dfd77..1229ac6132be 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index a7760c6c3bce..4cf8e1d85ac6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 86dda5841001..41d9f30416b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 32b60cb7858b..4d8c1678b2a8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index b22c8952fce7..6ecc551b1c7a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 38768c8cc22d..c24b9f47f573 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 60d3ba37641a..8d30197565c4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 6d46e33d3f7d..06bb44034a58 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 53fb98b6f8fe..f8dfaa9accf1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index bad9a4ff7a21..469b13ca1beb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 77cf8d8c377c..d26f228146ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 3d7897cb6f77..1848f33902eb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 86f6e08d5922..920ae27cc6f4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 9af38b98cd6d..bc0ea6df1f25 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index ad347c5a3955..13f17090571f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index bf4a244db51d..2ae1a9a24a07 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 3d602e2afdb5..a320d0dcb1f1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 74744243a388..58c5c370eb22 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 367a01281dbe..91cfc3cfa0a4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 97b2fe4b3137..86ef2ed1d19c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 95caf5749fd1..c95a1235a982 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 97a411bf54ce..dbfd8932b002 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index c361a07c2abe..ef9a8c554ad8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 2d221b46b692..42ed8c2faef0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 23c6cda8037b..52913fd2936f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 97d9ff1d26ca..531bcc0b212f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 19399c6d2509..a250c789a348 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 63a65ea552f7..c17116feec80 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index d305c67d1074..cc7f970749c8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 239ac38847a2..4e43e436d2ba 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index ac28f1b19099..38204304a157 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 8569ae423f22..9f504e4283ea 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 28f3046abad7..2a5f75a5bfd4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 5626620b2117..7c38060c315a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 451224e892d4..5d51f229c6b1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index 6474554c55ec..14a6641e03d0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index a136d3003ec4..0e86554ae8ee 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index c974fb9c8f68..ca4fd58d31cb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 9081228bc6b5..ba802f914142 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php new file mode 100644 index 000000000000..aff312636b3a --- /dev/null +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php @@ -0,0 +1,78 @@ + :'Hash>', :'map_of_enum_string' => :'Hash', :'direct_map' => :'Hash', - :'indirect_map' => :'Hash' + :'indirect_map' => :'StringBooleanMap' } end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 6272eb532f26..1811bff24d42 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index b2e578955878..97a8503d1dc6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 24a4effe95c5..77539c9ecbf4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 16623c9172af..abab5334aa1c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 9cc706162f27..467cad995966 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 894d5657698e..4917d633c5f4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 312f149ab96f..423bb7a68b4b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index b640af3dd514..ce1a328cc001 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 441e29665ed7..be2cb627346d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 3422f98e985f..d2f95283a36d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index cac6fc0d6974..a206160e6e92 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index 1622c832086d..3ef0d05b2f64 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index 1a0b96fcb20f..bb6df843d8b8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index ff566ba51c3c..e541ca081c6a 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 2f6a64862156..d81947c273fe 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.0.3 +OpenAPI Generator version: 3.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 546a211d4295..965412c8ca0c 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 520cf12f33dd..afbb772a0476 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 168658b65700..fa3948179066 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index c1ca6d4eed1c..e95245e06197 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index b4eef869ca33..3c8570ad4817 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 9d14f976e9ea..dab64131eda9 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/openapi3/client/petstore/php/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/php/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 5892fe3245c9..62e71d99fa67 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 45e354ed6432..d8e2182d8685 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 69df7f8229e1..bf5243410750 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index be184f05d706..07652826b2f3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 8a1dc94b0fb8..f534e9e9243d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index df814eeaef21..abff4105f787 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 068489bf3f4a..a20c344de96c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index f6f11acaecca..b26b84668d9c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 956e562e07d3..4af0b3af00a4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 24d099ae9f10..1456c315d079 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 8cfaeb0339fc..ca0142fa51ec 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php index 6ab8fb874bc0..aadb757a9180 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/AnimalFarm.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index 530b447626fe..092712c11b98 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 140a4f65936a..77aed6545d75 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 4220ab9f4068..d9dc8aa03733 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index b2b0c4e2d7ee..6a8a60756d5e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 1afa94edbe40..c9205e6baed2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 3a67d13acdb8..52d5b8996349 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 6055eacb00af..6dffead2b8e6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index be2145fd847a..a6bef51d463d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 138823eb93d2..af02a8a0c090 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index a53c8c10e22e..ad281540e6a4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 4af4453992ed..d49b2effeec8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 997deb17631c..62e1dd4011b2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index f676cf2e7fde..aee7d38da54a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 30e31911c96b..16be0e59f2b2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 5950e75f499c..0aec1a15b1d8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 2785e00ef118..58763fc47709 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 2483418c5cd6..2402bee97b0c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 78dd064c91b9..e035873780c2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index f77147b51d0d..bc7317866e7c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8f98802b36dc..cd21b4dcaa8d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 7bed78ef1176..15abe91dec0a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index f0f632339690..e0aee2c4a55d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 3999135c65e0..a5b9cd582bc4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index ca3bb50cc9b3..00d662c1b8f4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 007d98995d4a..3ed0c2cdb879 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 656697e8c3d3..83b8f9d58366 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index ff148524cd8b..e6ca4db495e9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 41a2cd355e75..3175f6927089 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 58e20910a618..f29188b0ccfa 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 0511bd8584af..563a4ec39e53 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index e2e89e4dfd77..1229ac6132be 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index a7760c6c3bce..4cf8e1d85ac6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 86dda5841001..41d9f30416b4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 32b60cb7858b..4d8c1678b2a8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index b22c8952fce7..6ecc551b1c7a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 38768c8cc22d..c24b9f47f573 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 60d3ba37641a..8d30197565c4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 6d46e33d3f7d..06bb44034a58 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 53fb98b6f8fe..f8dfaa9accf1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index bad9a4ff7a21..469b13ca1beb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 77cf8d8c377c..d26f228146ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 3d7897cb6f77..1848f33902eb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index 86f6e08d5922..920ae27cc6f4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 9af38b98cd6d..bc0ea6df1f25 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index ad347c5a3955..13f17090571f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index bf4a244db51d..2ae1a9a24a07 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 3d602e2afdb5..a320d0dcb1f1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 74744243a388..58c5c370eb22 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 367a01281dbe..91cfc3cfa0a4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index 97b2fe4b3137..86ef2ed1d19c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 95caf5749fd1..c95a1235a982 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 97a411bf54ce..dbfd8932b002 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index c361a07c2abe..ef9a8c554ad8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 2d221b46b692..42ed8c2faef0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 23c6cda8037b..52913fd2936f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 97d9ff1d26ca..531bcc0b212f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index 59b0439fd2b7..ecd4b1d36b05 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 63a65ea552f7..c17116feec80 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index d305c67d1074..cc7f970749c8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 239ac38847a2..4e43e436d2ba 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index ac28f1b19099..38204304a157 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 8569ae423f22..9f504e4283ea 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 28f3046abad7..2a5f75a5bfd4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 5626620b2117..7c38060c315a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 451224e892d4..5d51f229c6b1 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index 6474554c55ec..14a6641e03d0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index a136d3003ec4..0e86554ae8ee 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index c974fb9c8f68..ca4fd58d31cb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 9081228bc6b5..ba802f914142 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 1a49a5d3971a..dd775f839bb8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 70f353f41f02..65d4833fe492 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.0.3 + * OpenAPI Generator version: 3.1.0-SNAPSHOT */ /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java index c31f8ee8fef0..50e018a50356 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/MapTest.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -62,7 +63,7 @@ public static InnerEnum fromValue(String v) { @ApiModelProperty(value = "") @Valid - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; /** * Get mapMapOfString * @return mapMapOfString @@ -137,15 +138,15 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * @return indirectMap **/ @JsonProperty("indirect_map") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java index 3feb13756655..dd8626ae8c73 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterComposite.java @@ -66,7 +66,7 @@ public OuterComposite myString(String myString) { * @return myBoolean **/ @JsonProperty("my_boolean") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java index f2996e981ef3..1863dcb233fc 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; @@ -71,7 +72,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -154,7 +155,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -165,11 +166,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java index 5da708d5e196..a768b55de38b 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java @@ -85,7 +85,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index 417428e2dc91..77bc760d8057 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -51,7 +52,7 @@ public static InnerEnum fromValue(String v) { private @Valid Map mapOfEnumString = new HashMap(); private @Valid Map directMap = new HashMap(); - private @Valid Map indirectMap = null; + private @Valid StringBooleanMap indirectMap = null; /** **/ @@ -106,7 +107,7 @@ public void setDirectMap(Map directMap) { /** **/ - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -114,10 +115,10 @@ public MapTest indirectMap(Map indirectMap) { @ApiModelProperty(value = "") @JsonProperty("indirect_map") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index f16bef370a77..192b50388b0a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -61,7 +61,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") @JsonProperty("my_boolean") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } public void setMyBoolean(Boolean myBoolean) { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 03eb5d29a437..fa165f2bff1b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1384,14 +1384,18 @@ components: type: array type: object OuterComposite: - example: {} + example: + my_string: my_string + my_number: 0.80082819046101150206595775671303272247314453125 + my_boolean: true properties: my_number: - $ref: '#/components/schemas/OuterNumber' + type: number my_string: - $ref: '#/components/schemas/OuterString' + type: string my_boolean: - $ref: '#/components/schemas/OuterBoolean' + type: boolean + x-codegen-body-parameter-name: boolean_post_body type: object format_test: properties: diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index 417428e2dc91..77bc760d8057 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -51,7 +52,7 @@ public static InnerEnum fromValue(String v) { private @Valid Map mapOfEnumString = new HashMap(); private @Valid Map directMap = new HashMap(); - private @Valid Map indirectMap = null; + private @Valid StringBooleanMap indirectMap = null; /** **/ @@ -106,7 +107,7 @@ public void setDirectMap(Map directMap) { /** **/ - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -114,10 +115,10 @@ public MapTest indirectMap(Map indirectMap) { @ApiModelProperty(value = "") @JsonProperty("indirect_map") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index f16bef370a77..192b50388b0a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -61,7 +61,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") @JsonProperty("my_boolean") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } public void setMyBoolean(Boolean myBoolean) { diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 03eb5d29a437..fa165f2bff1b 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1384,14 +1384,18 @@ components: type: array type: object OuterComposite: - example: {} + example: + my_string: my_string + my_number: 0.80082819046101150206595775671303272247314453125 + my_boolean: true properties: my_number: - $ref: '#/components/schemas/OuterNumber' + type: number my_string: - $ref: '#/components/schemas/OuterString' + type: string my_boolean: - $ref: '#/components/schemas/OuterBoolean' + type: boolean + x-codegen-body-parameter-name: boolean_post_body type: object format_test: properties: diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java index efbbd70e2bb3..b39cf01198a3 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -70,7 +71,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -153,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java index 7df1ce746e1e..dd4a7e47be60 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java index efbbd70e2bb3..b39cf01198a3 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -70,7 +71,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -153,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java index 7df1ce746e1e..dd4a7e47be60 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java index efbbd70e2bb3..b39cf01198a3 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -70,7 +71,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -153,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java index 7df1ce746e1e..dd4a7e47be60 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java index efbbd70e2bb3..b39cf01198a3 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/MapTest.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; /** @@ -70,7 +71,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -153,7 +154,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -164,11 +165,11 @@ public MapTest indirectMap(Map indirectMap) { **/ @JsonProperty("indirect_map") @ApiModelProperty(value = "") - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java index 7df1ce746e1e..dd4a7e47be60 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterComposite.java @@ -84,7 +84,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { **/ @JsonProperty("my_boolean") @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim/.openapi-generator/VERSION b/samples/server/petstore/php-slim/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/php-slim/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim/lib/Models/MapTest.php b/samples/server/petstore/php-slim/lib/Models/MapTest.php index c3c70327dfe8..e5c815279b26 100644 --- a/samples/server/petstore/php-slim/lib/Models/MapTest.php +++ b/samples/server/petstore/php-slim/lib/Models/MapTest.php @@ -14,6 +14,6 @@ class MapTest { private $mapOfEnumString; /* @var map[string,Bool] $directMap */ private $directMap; -/* @var \\Models\map $indirectMap */ +/* @var \\Models\StringBooleanMap $indirectMap */ private $indirectMap; } diff --git a/samples/server/petstore/php-slim/lib/Models/OuterComposite.php b/samples/server/petstore/php-slim/lib/Models/OuterComposite.php index 7cdfb8483371..b4364bf655fc 100644 --- a/samples/server/petstore/php-slim/lib/Models/OuterComposite.php +++ b/samples/server/petstore/php-slim/lib/Models/OuterComposite.php @@ -8,10 +8,10 @@ * OuterComposite */ class OuterComposite { - /* @var \\Models\Number $myNumber */ + /* @var Number $myNumber */ private $myNumber; /* @var string $myString */ private $myString; -/* @var \\Models\Bool $myBoolean */ +/* @var Bool $myBoolean */ private $myBoolean; } diff --git a/samples/server/petstore/php-symfony/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/php-symfony/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-ze-ph/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php b/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php index 172f8b9e91ba..0f933f96c122 100644 --- a/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php +++ b/samples/server/petstore/php-ze-ph/src/App/DTO/MapTest.php @@ -38,9 +38,9 @@ class MapTest public $direct_map; /** * @DTA\Data(field="indirect_map", nullable=true) - * @DTA\Strategy(name="Object", options={"type":\App\DTO\map::class}) - * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\map::class}) - * @var \App\DTO\map + * @DTA\Strategy(name="Object", options={"type":\App\DTO\StringBooleanMap::class}) + * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\StringBooleanMap::class}) + * @var \App\DTO\StringBooleanMap */ public $indirect_map; } diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8d44bcf2846a..a66575389270 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index bba644174ee9..9db37f55d8e0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -76,7 +76,7 @@ default CompletableFuture> fakeOuterCompositeSeri getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 2e907cc8bf5a..92be84c1e85b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 3ea94df7e7d1..f818bfaecfb5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 182c324db240..79b0560d9dd4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 5ad00b0a39fa..317aae8dce43 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 852959ae715d..ff03569ef1fb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index d3ab34cc3630..78c6d7f3e729 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -72,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6ec203e9150e..e3889bf24373 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 624d94b7e43c..155da0b9f179 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 7abe1703b576..61e3d9db9d08 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index b94918273090..194b379d55e0 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 26bcbf2a4992..5e70999adb96 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 10001f1bc616..21ba95b5edd6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 624be6d6926a..fef8e0576992 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -52,7 +52,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite outerComposite) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 237fdee71909..38caf33dfd33 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index f57676904153..b207d39f84cd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 1e06ac54251b..aa1c261e40b5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index da06dff545cf..30e950dbca36 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index f5c224b73775..8bd49e484086 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 26bcbf2a4992..5e70999adb96 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 10001f1bc616..21ba95b5edd6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index 26af39e6eb1b..000b811e058e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -52,7 +52,7 @@ public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Inpu public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite outerComposite) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 237fdee71909..38caf33dfd33 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index f57676904153..b207d39f84cd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 1e06ac54251b..aa1c261e40b5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index da06dff545cf..30e950dbca36 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index f5c224b73775..8bd49e484086 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 21fc02c5169a..937954c6a708 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 33ad8fb5dfc5..c2eed78d6a2b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index bbc6dcd9176a..aea629f7edaa 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -53,7 +53,7 @@ default ResponseEntity fakeOuterCompositeSerialize( OuterComposi getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0d582b334273..47109efcd089 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 1fdcb95ddd03..a9cd158432a0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 73d75a8b1ce9..7bb54de2078a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index c1fc26fd8b4c..147f9fc45444 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 26bcbf2a4992..5e70999adb96 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 10001f1bc616..21ba95b5edd6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 237fdee71909..38caf33dfd33 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index f57676904153..b207d39f84cd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 1e06ac54251b..aa1c261e40b5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index da06dff545cf..30e950dbca36 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index f5c224b73775..8bd49e484086 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 62dfcfa2fe3d..b2dce71247d2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index ac59568e1bf4..555ae7e22b16 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -76,7 +76,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d9f4c692cf91..319134813c56 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 6a1985bdf8e4..11e98f37aead 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 757fcfc2830a..007ccb0d3924 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 5199064cb7e0..45e3fd336c38 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 25c9c8c43c78..69b81f219fbc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 1ca1d5289745..65eeb503d6f6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -70,7 +70,7 @@ default ResponseEntity> fakeOuterCompositeSerialize(@ApiPar Mono result = Mono.empty(); for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - result = ApiUtil.getExampleResponse(exchange, "{ }") + result = ApiUtil.getExampleResponse(exchange, "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}") .then(Mono.empty()); break; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6f2367b13191..9916f9d8a64c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 13c2117e558b..a483be41ccdf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 208168a8e73f..a8e8b12ab503 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 33f906af290a..5333c47ad78e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index a7239a6d9136..b09398ca5e11 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1439,14 +1439,18 @@ components: type: array type: object OuterComposite: - example: {} + example: + my_string: my_string + my_number: 0.80082819046101150206595775671303272247314453125 + my_boolean: true properties: my_number: - $ref: '#/components/schemas/OuterNumber' + type: number my_string: - $ref: '#/components/schemas/OuterString' + type: string my_boolean: - $ref: '#/components/schemas/OuterBoolean' + type: boolean + x-codegen-body-parameter-name: boolean_post_body type: object format_test: properties: diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 852959ae715d..ff03569ef1fb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index f452c18377ec..9c3a58b5fc66 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -72,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6ec203e9150e..e3889bf24373 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index d30446f411ac..65ffc288c478 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 7abe1703b576..61e3d9db9d08 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index b94918273090..194b379d55e0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 282895a8f8f1..0628777500bd 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.3 \ No newline at end of file +3.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 852959ae715d..ff03569ef1fb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 8620fbf7fe55..bf690fc6dc6c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -72,7 +72,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(val getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { - ApiUtil.setExampleResponse(request, "*/*", "{ }"); + ApiUtil.setExampleResponse(request, "*/*", "{ \"my_string\" : \"my_string\", \"my_number\" : 0.80082819046101150206595775671303272247314453125, \"my_boolean\" : true}"); break; } } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6ec203e9150e..e3889bf24373 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 624d94b7e43c..155da0b9f179 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 7abe1703b576..61e3d9db9d08 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index b94918273090..194b379d55e0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.3). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index fed9bce1c999..818a51978c47 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.openapitools.model.StringBooleanMap; import javax.validation.Valid; import javax.validation.constraints.*; @@ -61,7 +62,7 @@ public static InnerEnum fromValue(String text) { private Map directMap = null; @JsonProperty("indirect_map") - private Map indirectMap = null; + private StringBooleanMap indirectMap = null; public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; @@ -148,7 +149,7 @@ public void setDirectMap(Map directMap) { this.directMap = directMap; } - public MapTest indirectMap(Map indirectMap) { + public MapTest indirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; return this; } @@ -161,11 +162,11 @@ public MapTest indirectMap(Map indirectMap) { @Valid - public Map getIndirectMap() { + public StringBooleanMap getIndirectMap() { return indirectMap; } - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(StringBooleanMap indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index c343b0b39edd..d8de39544160 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -76,7 +76,7 @@ public OuterComposite myBoolean(Boolean myBoolean) { @ApiModelProperty(value = "") - public Boolean getMyBoolean() { + public Boolean isMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java new file mode 100644 index 000000000000..42b689e5e223 --- /dev/null +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/StringBooleanMap.java @@ -0,0 +1,51 @@ +package org.openapitools.model; + +import java.util.Objects; +import java.util.HashMap; +import java.util.Map; +import javax.validation.Valid; +import javax.validation.constraints.*; + +/** + * StringBooleanMap + */ + +public class StringBooleanMap extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StringBooleanMap {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + From f5cc3973accb2cadcab232987932b85451de774f Mon Sep 17 00:00:00 2001 From: grokify Date: Thu, 28 Jun 2018 00:00:26 -0700 Subject: [PATCH 16/18] Trigger CI due to previous timeout From 027091e124ea2962b83a624699da8c58ad670dd4 Mon Sep 17 00:00:00 2001 From: grokify Date: Thu, 28 Jun 2018 06:50:43 -0700 Subject: [PATCH 17/18] Trigger CI due to previous Shippable timeout From e72745db75f68632311263e1c4775c3cd02455d9 Mon Sep 17 00:00:00 2001 From: grokify Date: Thu, 28 Jun 2018 07:24:13 -0700 Subject: [PATCH 18/18] Trigger CI due to previous Shippable race condition