From 3067da2877b627af87ffec8201c58426ae598843 Mon Sep 17 00:00:00 2001 From: Javier Velilla Date: Mon, 16 Oct 2017 00:02:19 -0300 Subject: [PATCH] Swagger eiffel:fix (#6674) * Updated api client, Required parameters {{#required}} .. {{/required}}, are mapped to Eiffel Void Safety Rules, optional parameters are translated to detachable TYPE. Validation Rules are mapped to preconditions, at the moment maximun and minimun validation has been added. Improved API_CLIENT.parameter_to_tuple feature to accept a LIST [ANY] instead of LIST [STRING_32]. Improved model template to generate the model output. * Updated API_CLIENT.parameter_to_string feature, missing STRING representation. * Updating sample using the latest modifications. --- .../main/resources/Eiffel/api_client.mustache | 4 + samples/client/petstore/eiffel/README.md | 50 +---------- samples/client/petstore/eiffel/api_client.ecf | 2 +- .../client/petstore/eiffel/docs/PET_API.md | 2 +- .../client/petstore/eiffel/docs/STORE_API.md | 8 +- .../client/petstore/eiffel/docs/USER_API.md | 2 +- .../client/petstore/eiffel/src/api/pet_api.e | 24 +++++- .../petstore/eiffel/src/api/store_api.e | 20 +++-- .../client/petstore/eiffel/src/api/user_api.e | 18 +++- .../client/petstore/eiffel/src/api_client.e | 82 ++++++++++++++++--- .../petstore/eiffel/src/domain/api_response.e | 11 +-- .../petstore/eiffel/src/domain/category.e | 9 +- .../client/petstore/eiffel/src/domain/order.e | 17 ++-- .../client/petstore/eiffel/src/domain/pet.e | 17 ++-- .../client/petstore/eiffel/src/domain/tag.e | 9 +- .../client/petstore/eiffel/src/domain/user.e | 21 ++--- .../eiffel/src/framework/api_client_request.e | 2 +- .../src/framework/api_client_response.e | 2 +- .../petstore/eiffel/src/framework/api_error.e | 2 +- .../petstore/eiffel/src/framework/api_i.e | 2 +- .../eiffel/src/framework/auth/api_key_auth.e | 2 +- .../src/framework/auth/authentication.e | 2 +- .../src/framework/auth/http_basic_auth.e | 2 +- .../eiffel/src/framework/auth/oauth.e | 2 +- .../eiffel/src/framework/configuration.e | 2 +- .../serialization/api_deserializer.e | 2 +- .../serialization/api_json_deserializer.e | 2 +- .../serialization/api_json_serializer.e | 2 +- .../framework/serialization/api_serializer.e | 2 +- .../client/petstore/eiffel/test/api_test.ecf | 2 +- 30 files changed, 198 insertions(+), 126 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Eiffel/api_client.mustache b/modules/swagger-codegen/src/main/resources/Eiffel/api_client.mustache index 9958265883a..9f7ae9ccc10 100644 --- a/modules/swagger-codegen/src/main/resources/Eiffel/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/Eiffel/api_client.mustache @@ -232,6 +232,10 @@ feature -- Query Parameter Helpers -- TODO improve to support -- dateTime string date-time As defined by date-time - RFC3339 Result := date_time.date.debug_output + elseif attached {STRING_32} a_param as str_32 then + Result := str_32 + elseif attached {STRING_8} a_param as str_8 then + Result := str_8 else -- Unsupported Object type. Result := "" diff --git a/samples/client/petstore/eiffel/README.md b/samples/client/petstore/eiffel/README.md index c399baba8f6..0152d6bcd0e 100644 --- a/samples/client/petstore/eiffel/README.md +++ b/samples/client/petstore/eiffel/README.md @@ -1,6 +1,6 @@ # Eiffel API client for swagger -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ +This 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. ## Overview This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. @@ -17,19 +17,10 @@ Add the library into your Eiffel configuration file. ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FAKE_API* | [**fake_outer_boolean_serialize**](docs/FAKE_API.md#fake_outer_boolean_serialize) | **Post** /fake/outer/boolean | -*FAKE_API* | [**fake_outer_composite_serialize**](docs/FAKE_API.md#fake_outer_composite_serialize) | **Post** /fake/outer/composite | -*FAKE_API* | [**fake_outer_number_serialize**](docs/FAKE_API.md#fake_outer_number_serialize) | **Post** /fake/outer/number | -*FAKE_API* | [**fake_outer_string_serialize**](docs/FAKE_API.md#fake_outer_string_serialize) | **Post** /fake/outer/string | -*FAKE_API* | [**test_client_model**](docs/FAKE_API.md#test_client_model) | **Patch** /fake | To test \"client\" model -*FAKE_API* | [**test_endpoint_parameters**](docs/FAKE_API.md#test_endpoint_parameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FAKE_API* | [**test_enum_parameters**](docs/FAKE_API.md#test_enum_parameters) | **Get** /fake | To test enum parameters -*FAKE_API* | [**test_json_form_data**](docs/FAKE_API.md#test_json_form_data) | **Get** /fake/jsonFormData | test json serialization of form data -*FAKE_CLASSNAME_TAGS123_API* | [**test_classname**](docs/FAKE_CLASSNAME_TAGS123_API.md#test_classname) | **Patch** /fake_classname_test | To test class name in snake case *PET_API* | [**add_pet**](docs/PET_API.md#add_pet) | **Post** /pet | Add a new pet to the store *PET_API* | [**delete_pet**](docs/PET_API.md#delete_pet) | **Delete** /pet/{petId} | Deletes a pet *PET_API* | [**find_pets_by_status**](docs/PET_API.md#find_pets_by_status) | **Get** /pet/findByStatus | Finds Pets by status @@ -38,9 +29,9 @@ 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 -*STORE_API* | [**delete_order**](docs/STORE_API.md#delete_order) | **Delete** /store/order/{order_id} | Delete purchase order by ID +*STORE_API* | [**delete_order**](docs/STORE_API.md#delete_order) | **Delete** /store/order/{orderId} | 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 +*STORE_API* | [**order_by_id**](docs/STORE_API.md#order_by_id) | **Get** /store/order/{orderId} | Find purchase order by ID *STORE_API* | [**place_order**](docs/STORE_API.md#place_order) | **Post** /store/order | Place an order for a pet *USER_API* | [**create_user**](docs/USER_API.md#create_user) | **Post** /user | Create user *USER_API* | [**create_users_with_array_input**](docs/USER_API.md#create_users_with_array_input) | **Post** /user/createWithArray | Creates list of users with given input array @@ -54,41 +45,12 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ADDITIONAL_PROPERTIES_CLASS](docs/ADDITIONAL_PROPERTIES_CLASS.md) - - [ANIMAL](docs/ANIMAL.md) - - [ANIMAL_FARM](docs/ANIMAL_FARM.md) - [API_RESPONSE](docs/API_RESPONSE.md) - - [ARRAY_OF_ARRAY_OF_NUMBER_ONLY](docs/ARRAY_OF_ARRAY_OF_NUMBER_ONLY.md) - - [ARRAY_OF_NUMBER_ONLY](docs/ARRAY_OF_NUMBER_ONLY.md) - - [ARRAY_TEST](docs/ARRAY_TEST.md) - - [CAPITALIZATION](docs/CAPITALIZATION.md) - [CATEGORY](docs/CATEGORY.md) - - [CLASS_MODEL](docs/CLASS_MODEL.md) - - [CLIENT](docs/CLIENT.md) - - [ENUM_ARRAYS](docs/ENUM_ARRAYS.md) - - [ENUM_CLASS](docs/ENUM_CLASS.md) - - [ENUM_TEST](docs/ENUM_TEST.md) - - [FORMAT_TEST](docs/FORMAT_TEST.md) - - [HAS_ONLY_READ_ONLY](docs/HAS_ONLY_READ_ONLY.md) - - [MAP_TEST](docs/MAP_TEST.md) - - [MIXED_PROPERTIES_AND_ADDITIONAL_PROPERTIES_CLASS](docs/MIXED_PROPERTIES_AND_ADDITIONAL_PROPERTIES_CLASS.md) - - [MODEL_200_RESPONSE](docs/MODEL_200_RESPONSE.md) - - [NAME](docs/NAME.md) - - [NUMBER_ONLY](docs/NUMBER_ONLY.md) - [ORDER](docs/ORDER.md) - - [OUTER_BOOLEAN](docs/OUTER_BOOLEAN.md) - - [OUTER_COMPOSITE](docs/OUTER_COMPOSITE.md) - - [OUTER_ENUM](docs/OUTER_ENUM.md) - - [OUTER_NUMBER](docs/OUTER_NUMBER.md) - - [OUTER_STRING](docs/OUTER_STRING.md) - [PET](docs/PET.md) - - [READ_ONLY_FIRST](docs/READ_ONLY_FIRST.md) - - [RETURN](docs/RETURN.md) - - [SPECIAL_MODEL_NAME](docs/SPECIAL_MODEL_NAME.md) - [TAG](docs/TAG.md) - [USER](docs/USER.md) - - [CAT](docs/CAT.md) - - [DOG](docs/DOG.md) ## Documentation For Authorization @@ -100,10 +62,6 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header -## http_basic_test - -- **Type**: HTTP basic authentication - ## petstore_auth - **Type**: OAuth diff --git a/samples/client/petstore/eiffel/api_client.ecf b/samples/client/petstore/eiffel/api_client.ecf index dde6c493504..be81e54bd6e 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/PET_API.md b/samples/client/petstore/eiffel/docs/PET_API.md index c445581a329..cf5ce8fc53c 100644 --- a/samples/client/petstore/eiffel/docs/PET_API.md +++ b/samples/client/petstore/eiffel/docs/PET_API.md @@ -1,6 +1,6 @@ # PET_API -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Feature | HTTP request | Description ------------- | ------------- | ------------- diff --git a/samples/client/petstore/eiffel/docs/STORE_API.md b/samples/client/petstore/eiffel/docs/STORE_API.md index 69480c8072d..5b93ae40e4b 100644 --- a/samples/client/petstore/eiffel/docs/STORE_API.md +++ b/samples/client/petstore/eiffel/docs/STORE_API.md @@ -1,12 +1,12 @@ # STORE_API -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Feature | HTTP request | Description ------------- | ------------- | ------------- -[**delete_order**](STORE_API.md#delete_order) | **Delete** /store/order/{order_id} | Delete purchase order by ID +[**delete_order**](STORE_API.md#delete_order) | **Delete** /store/order/{orderId} | Delete purchase order by ID [**inventory**](STORE_API.md#inventory) | **Get** /store/inventory | Returns pet inventories by status -[**order_by_id**](STORE_API.md#order_by_id) | **Get** /store/order/{order_id} | Find purchase order by ID +[**order_by_id**](STORE_API.md#order_by_id) | **Get** /store/order/{orderId} | Find purchase order by ID [**place_order**](STORE_API.md#place_order) | **Post** /store/order | Place an order for a pet @@ -54,7 +54,7 @@ This endpoint does not need any parameter. ### Return type -[**STRING_TABLE[INTEGER_32]**](STRING_TABLE.md) +**STRING_TABLE[INTEGER_32]** ### Authorization diff --git a/samples/client/petstore/eiffel/docs/USER_API.md b/samples/client/petstore/eiffel/docs/USER_API.md index 2d325a6b2fd..ee8e26c6ad0 100644 --- a/samples/client/petstore/eiffel/docs/USER_API.md +++ b/samples/client/petstore/eiffel/docs/USER_API.md @@ -1,6 +1,6 @@ # USER_API -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *http://petstore.swagger.io/v2* Feature | HTTP request | Description ------------- | ------------- | ------------- diff --git a/samples/client/petstore/eiffel/src/api/pet_api.e b/samples/client/petstore/eiffel/src/api/pet_api.e index 00072bb6f32..d8a1648cc84 100644 --- a/samples/client/petstore/eiffel/src/api/pet_api.e +++ b/samples/client/petstore/eiffel/src/api/pet_api.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -31,6 +31,7 @@ feature -- API Access -- argument: body Pet object that needs to be added to the store (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -41,6 +42,7 @@ feature -- API Access l_request.set_body(body) l_path := "/pet" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -52,7 +54,7 @@ feature -- API Access end end - delete_pet (pet_id: INTEGER_64; api_key: detachable STRING_32) + delete_pet (pet_id: INTEGER_64; api_key: STRING_32) -- Deletes a pet -- -- @@ -61,6 +63,7 @@ feature -- API Access -- argument: api_key (optional) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -71,6 +74,7 @@ feature -- API Access l_path := "/pet/{petId}" l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) + if attached api_key as l_api_key then l_request.add_header(l_api_key.out,"api_key"); end @@ -94,6 +98,7 @@ feature -- API Access -- -- -- Result LIST [PET] + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -105,6 +110,7 @@ feature -- API Access l_path := "/pet/findByStatus" l_request.fill_query_params(api_client.parameter_to_tuple("csv", "status", status)); + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -128,6 +134,7 @@ feature -- API Access -- -- -- Result LIST [PET] + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -139,6 +146,7 @@ feature -- API Access l_path := "/pet/findByTags" l_request.fill_query_params(api_client.parameter_to_tuple("csv", "tags", tags)); + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -162,6 +170,7 @@ feature -- API Access -- -- -- Result PET + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -173,6 +182,7 @@ feature -- API Access l_path := "/pet/{petId}" l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -195,6 +205,7 @@ feature -- API Access -- argument: body Pet object that needs to be added to the store (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -205,6 +216,7 @@ feature -- API Access l_request.set_body(body) l_path := "/pet" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -216,7 +228,7 @@ feature -- API Access end end - update_pet_with_form (pet_id: INTEGER_64; name: detachable STRING_32; status: detachable STRING_32) + update_pet_with_form (pet_id: INTEGER_64; name: STRING_32; status: STRING_32) -- Updates a pet in the store with form data -- -- @@ -227,6 +239,7 @@ feature -- API Access -- argument: status Updated status of the pet (optional) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -237,6 +250,7 @@ feature -- API Access l_path := "/pet/{petId}" l_path.replace_substring_all ("{"+"petId"+"}", api_client.url_encode (pet_id.out)) + if attached name as l_name then l_request.add_form(l_name,"name"); end @@ -255,7 +269,7 @@ feature -- API Access end end - upload_file (pet_id: INTEGER_64; additional_metadata: detachable STRING_32; file: detachable FILE): detachable API_RESPONSE + upload_file (pet_id: INTEGER_64; additional_metadata: STRING_32; file: detachable FILE): detachable API_RESPONSE -- uploads an image -- -- @@ -267,6 +281,7 @@ feature -- API Access -- -- -- Result API_RESPONSE + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -277,6 +292,7 @@ feature -- API Access l_path := "/pet/{petId}/uploadImage" 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 diff --git a/samples/client/petstore/eiffel/src/api/store_api.e b/samples/client/petstore/eiffel/src/api/store_api.e index 5ecd833fabe..6cc61998d66 100644 --- a/samples/client/petstore/eiffel/src/api/store_api.e +++ b/samples/client/petstore/eiffel/src/api/store_api.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -31,6 +31,7 @@ feature -- API Access -- argument: order_id ID of the order that needs to be deleted (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -39,8 +40,9 @@ feature -- API Access reset_error create l_request - l_path := "/store/order/{order_id}" - l_path.replace_substring_all ("{"+"order_id"+"}", api_client.url_encode (order_id.out)) + l_path := "/store/order/{orderId}" + l_path.replace_substring_all ("{"+"orderId"+"}", api_client.url_encode (order_id.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); @@ -59,6 +61,7 @@ feature -- API Access -- -- -- Result STRING_TABLE[INTEGER_32] + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -69,6 +72,7 @@ feature -- API Access l_path := "/store/inventory" + if attached {STRING} api_client.select_header_accept (<<"application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -92,6 +96,9 @@ feature -- API Access -- -- -- Result ORDER + require + order_id_is_less_or_equal_than: order_id <= 5 + order_id_is_greater_or_equal_than: order_id >= 1 local l_path: STRING l_request: API_CLIENT_REQUEST @@ -100,8 +107,9 @@ feature -- API Access reset_error create l_request - l_path := "/store/order/{order_id}" - l_path.replace_substring_all ("{"+"order_id"+"}", api_client.url_encode (order_id.out)) + l_path := "/store/order/{orderId}" + l_path.replace_substring_all ("{"+"orderId"+"}", api_client.url_encode (order_id.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); @@ -126,6 +134,7 @@ feature -- API Access -- -- -- Result ORDER + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -136,6 +145,7 @@ feature -- API Access l_request.set_body(body) l_path := "/store/order" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end diff --git a/samples/client/petstore/eiffel/src/api/user_api.e b/samples/client/petstore/eiffel/src/api/user_api.e index 1acf95ecf8c..6c6ef3c686e 100644 --- a/samples/client/petstore/eiffel/src/api/user_api.e +++ b/samples/client/petstore/eiffel/src/api/user_api.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -31,6 +31,7 @@ feature -- API Access -- argument: body Created user object (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -41,6 +42,7 @@ feature -- API Access l_request.set_body(body) l_path := "/user" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -59,6 +61,7 @@ feature -- API Access -- argument: body List of user object (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -69,6 +72,7 @@ feature -- API Access l_request.set_body(body) l_path := "/user/createWithArray" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -87,6 +91,7 @@ feature -- API Access -- argument: body List of user object (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -97,6 +102,7 @@ feature -- API Access l_request.set_body(body) l_path := "/user/createWithList" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -115,6 +121,7 @@ feature -- API Access -- argument: username The name that needs to be deleted (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -126,6 +133,7 @@ feature -- API Access l_path := "/user/{username}" l_path.replace_substring_all ("{"+"username"+"}", api_client.url_encode (username.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -147,6 +155,7 @@ feature -- API Access -- -- -- Result STRING_32 + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -159,6 +168,7 @@ feature -- API Access l_request.fill_query_params(api_client.parameter_to_tuple("", "username", username)); l_request.fill_query_params(api_client.parameter_to_tuple("", "password", password)); + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -179,6 +189,7 @@ feature -- API Access -- -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -189,6 +200,7 @@ feature -- API Access l_path := "/user/logout" + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -209,6 +221,7 @@ feature -- API Access -- argument: body Updated user object (required) -- -- + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -220,6 +233,7 @@ feature -- API Access l_path := "/user/{username}" l_path.replace_substring_all ("{"+"username"+"}", api_client.url_encode (username.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end @@ -239,6 +253,7 @@ feature -- API Access -- -- -- Result USER + require local l_path: STRING l_request: API_CLIENT_REQUEST @@ -250,6 +265,7 @@ feature -- API Access l_path := "/user/{username}" l_path.replace_substring_all ("{"+"username"+"}", api_client.url_encode (username.out)) + if attached {STRING} api_client.select_header_accept (<<"application/xml", "application/json">>) as l_accept then l_request.add_header(l_accept,"Accept"); end diff --git a/samples/client/petstore/eiffel/src/api_client.e b/samples/client/petstore/eiffel/src/api_client.e index e3645183fd2..aa91d1734a9 100644 --- a/samples/client/petstore/eiffel/src/api_client.e +++ b/samples/client/petstore/eiffel/src/api_client.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -31,16 +31,14 @@ feature {NONE} -- Initialization create authentications.make (3) authentications.force (create {API_KEY_AUTH}.make ("header", "api_key"), "api_key") - is_api_key_configured := True - authentications.force (create {HTTP_BASIC_AUTH}, "http_basic_test") - is_basic_auth_configured := True + is_api_key_configured := True authentications.force (create {OAUTH},"petstore_auth") is_oauth_configured := True end feature -- Access - default_base_path: STRING = "http://petstore.swagger.io:80/v2" + default_base_path: STRING = "http://petstore.swagger.io/v2" -- default base path. base_path: STRING @@ -136,7 +134,7 @@ feature -- Helper: OAuth Authentication feature -- Query Parameter Helpers - parameter_to_tuple (a_collection_format, a_name: STRING; a_value: ANY): LIST [TUPLE [name: STRING; value: STRING]] + parameter_to_tuple (a_collection_format, a_name: STRING; a_value: detachable ANY): LIST [TUPLE [name: STRING; value: STRING]] -- A list of tuples with name and valule. -- collectionFormat collection format (e.g. csv, tsv) -- name Name @@ -148,7 +146,7 @@ feature -- Query Parameter Helpers l_delimiter: STRING l_value: STRING do - if attached {LIST [STRING_32]} a_value as a_list then + if attached {LIST [ANY]} a_value as a_list then -- Collection if a_list.is_empty then -- Return an empty list @@ -163,7 +161,7 @@ feature -- Query Parameter Helpers end if l_format.is_case_insensitive_equal ("multi") then across a_list as ic loop - Result.force ([a_name, ic.item.as_string_8]) + Result.force ([a_name, parameter_to_string (ic.item)]) end else if l_format.is_case_insensitive_equal ("csv") then @@ -179,7 +177,7 @@ feature -- Query Parameter Helpers end across a_list as ic from create l_value.make_empty loop - l_value.append (ic.item) + l_value.append (parameter_to_string (ic.item)) l_value.append (l_delimiter) end l_value.remove_tail (1) @@ -188,7 +186,71 @@ feature -- Query Parameter Helpers end else create {ARRAYED_LIST [TUPLE [name: STRING; value: STRING]]} Result.make (1) - Result.force ([a_name,a_value.out]) + if attached a_value then + Result.force ([a_name,a_value.out]) + else + Result.force ([a_name,""]) + end + + end + end + + + parameter_to_string (a_param: detachable ANY): STRING + -- return the string representation of the givien object `a_param'. + do + if a_param = Void then + Result := "" + else + if attached {BOOLEAN} a_param as bool then + Result := bool.out + elseif attached {NUMERIC} a_param as num then + if attached {INTEGER_64} num as i64 then + Result := i64.out + elseif attached {INTEGER_32} num as i32 then + Result := i32.out + elseif attached {INTEGER_16} num as i16 then + Result := i16.out + elseif attached {INTEGER_8} num as i8 then + Result := i8.out + elseif attached {NATURAL_64} num as n64 then + Result := n64.out + elseif attached {NATURAL_32} num as n32 then + Result := n32.out + elseif attached {NATURAL_16} num as n16 then + Result := n16.out + elseif attached {NATURAL_8} num as n8 then + Result := n8.out + elseif attached {REAL_64} num as r64 then + Result := r64.out + elseif attached {REAL_32} num as r32 then + Result := r32.out + else + check is_basic_numeric_type: False end + end + Result := num.out + elseif attached {CHARACTER_8} a_param as ch8 then + Result := ch8.out + elseif attached {CHARACTER_32} a_param as ch32 then + Result := ch32.out + elseif attached {POINTER} a_param as ptr then + Result := ptr.to_integer_32.out + elseif attached {DATE} a_param as date then + --TODO improve to support + -- date string As defined by full-date - RFC3339 + Result := date.debug_output + elseif attached {DATE_TIME} a_param as date_time then + -- TODO improve to support + -- dateTime string date-time As defined by date-time - RFC3339 + Result := date_time.date.debug_output + elseif attached {STRING_32} a_param as str_32 then + Result := str_32 + elseif attached {STRING_8} a_param as str_8 then + Result := str_8 + else + -- Unsupported Object type. + Result := "" + end end end diff --git a/samples/client/petstore/eiffel/src/domain/api_response.e b/samples/client/petstore/eiffel/src/domain/api_response.e index 1bbddce63e3..bf1c07248f3 100644 --- a/samples/client/petstore/eiffel/src/domain/api_response.e +++ b/samples/client/petstore/eiffel/src/domain/api_response.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class API_RESPONSE inherit @@ -67,19 +66,21 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass API_RESPONSE%N") if attached code as l_code then - Result.append ("%N") + Result.append ("%Ncode:") Result.append (l_code.out) Result.append ("%N") end if attached type as l_type then - Result.append ("%N") + Result.append ("%Ntype:") Result.append (l_type.out) Result.append ("%N") end if attached message as l_message then - Result.append ("%N") + Result.append ("%Nmessage:") Result.append (l_message.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/domain/category.e b/samples/client/petstore/eiffel/src/domain/category.e index d40a3dd1b99..eb8baca2916 100644 --- a/samples/client/petstore/eiffel/src/domain/category.e +++ b/samples/client/petstore/eiffel/src/domain/category.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class CATEGORY inherit @@ -57,14 +56,16 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass CATEGORY%N") if attached id as l_id then - Result.append ("%N") + Result.append ("%Nid:") Result.append (l_id.out) Result.append ("%N") end if attached name as l_name then - Result.append ("%N") + Result.append ("%Nname:") Result.append (l_name.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/domain/order.e b/samples/client/petstore/eiffel/src/domain/order.e index c216c6d6fcc..caa97313be0 100644 --- a/samples/client/petstore/eiffel/src/domain/order.e +++ b/samples/client/petstore/eiffel/src/domain/order.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class ORDER inherit @@ -97,34 +96,36 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass ORDER%N") if attached id as l_id then - Result.append ("%N") + Result.append ("%Nid:") Result.append (l_id.out) Result.append ("%N") end if attached pet_id as l_pet_id then - Result.append ("%N") + Result.append ("%Npet_id:") Result.append (l_pet_id.out) Result.append ("%N") end if attached quantity as l_quantity then - Result.append ("%N") + Result.append ("%Nquantity:") Result.append (l_quantity.out) Result.append ("%N") end if attached ship_date as l_ship_date then - Result.append ("%N") + Result.append ("%Nship_date:") Result.append (l_ship_date.out) Result.append ("%N") end if attached status as l_status then - Result.append ("%N") + Result.append ("%Nstatus:") Result.append (l_status.out) Result.append ("%N") end if attached complete as l_complete then - Result.append ("%N") + Result.append ("%Ncomplete:") Result.append (l_complete.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/domain/pet.e b/samples/client/petstore/eiffel/src/domain/pet.e index 4b0eca19003..6f4d93c5dfb 100644 --- a/samples/client/petstore/eiffel/src/domain/pet.e +++ b/samples/client/petstore/eiffel/src/domain/pet.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class PET inherit @@ -97,38 +96,40 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass PET%N") if attached id as l_id then - Result.append ("%N") + Result.append ("%Nid:") Result.append (l_id.out) Result.append ("%N") end if attached category as l_category then - Result.append ("%N") + Result.append ("%Ncategory:") Result.append (l_category.out) Result.append ("%N") end if attached name as l_name then - Result.append ("%N") + Result.append ("%Nname:") Result.append (l_name.out) Result.append ("%N") end if attached photo_urls as l_photo_urls then across l_photo_urls as ic loop - Result.append ("%N") + Result.append ("%N photo_urls:") Result.append (ic.item.out) Result.append ("%N") end end if attached tags as l_tags then across l_tags as ic loop - Result.append ("%N") + Result.append ("%N tags:") Result.append (ic.item.out) Result.append ("%N") end end if attached status as l_status then - Result.append ("%N") + Result.append ("%Nstatus:") Result.append (l_status.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/domain/tag.e b/samples/client/petstore/eiffel/src/domain/tag.e index 63149ebd5cf..4b579c27416 100644 --- a/samples/client/petstore/eiffel/src/domain/tag.e +++ b/samples/client/petstore/eiffel/src/domain/tag.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class TAG inherit @@ -57,14 +56,16 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass TAG%N") if attached id as l_id then - Result.append ("%N") + Result.append ("%Nid:") Result.append (l_id.out) Result.append ("%N") end if attached name as l_name then - Result.append ("%N") + Result.append ("%Nname:") Result.append (l_name.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/domain/user.e b/samples/client/petstore/eiffel/src/domain/user.e index 5b8cf7473cf..794e8f9363d 100644 --- a/samples/client/petstore/eiffel/src/domain/user.e +++ b/samples/client/petstore/eiffel/src/domain/user.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 @@ -12,7 +12,6 @@ note date: "$Date$" revision: "$Revision$" EIS:"Eiffel swagger codegen", "src=https://github.com/swagger-api/swagger-codegen.git", "protocol=uri" - class USER inherit @@ -117,44 +116,46 @@ feature -- Change Element create Result.make_empty Result.append("%Nclass USER%N") if attached id as l_id then - Result.append ("%N") + Result.append ("%Nid:") Result.append (l_id.out) Result.append ("%N") end if attached username as l_username then - Result.append ("%N") + Result.append ("%Nusername:") Result.append (l_username.out) Result.append ("%N") end if attached first_name as l_first_name then - Result.append ("%N") + Result.append ("%Nfirst_name:") Result.append (l_first_name.out) Result.append ("%N") end if attached last_name as l_last_name then - Result.append ("%N") + Result.append ("%Nlast_name:") Result.append (l_last_name.out) Result.append ("%N") end if attached email as l_email then - Result.append ("%N") + Result.append ("%Nemail:") Result.append (l_email.out) Result.append ("%N") end if attached password as l_password then - Result.append ("%N") + Result.append ("%Npassword:") Result.append (l_password.out) Result.append ("%N") end if attached phone as l_phone then - Result.append ("%N") + Result.append ("%Nphone:") Result.append (l_phone.out) Result.append ("%N") end if attached user_status as l_user_status then - Result.append ("%N") + Result.append ("%Nuser_status:") Result.append (l_user_status.out) Result.append ("%N") end end end + + diff --git a/samples/client/petstore/eiffel/src/framework/api_client_request.e b/samples/client/petstore/eiffel/src/framework/api_client_request.e index 62a882ea13a..51fd6841cfe 100644 --- a/samples/client/petstore/eiffel/src/framework/api_client_request.e +++ b/samples/client/petstore/eiffel/src/framework/api_client_request.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/api_client_response.e b/samples/client/petstore/eiffel/src/framework/api_client_response.e index 1d5c0230f4b..9787f9672ca 100644 --- a/samples/client/petstore/eiffel/src/framework/api_client_response.e +++ b/samples/client/petstore/eiffel/src/framework/api_client_response.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/api_error.e b/samples/client/petstore/eiffel/src/framework/api_error.e index 28ad33fa77d..e4cfc25666f 100644 --- a/samples/client/petstore/eiffel/src/framework/api_error.e +++ b/samples/client/petstore/eiffel/src/framework/api_error.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/api_i.e b/samples/client/petstore/eiffel/src/framework/api_i.e index da1688fcc16..37bc6f47b63 100644 --- a/samples/client/petstore/eiffel/src/framework/api_i.e +++ b/samples/client/petstore/eiffel/src/framework/api_i.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/auth/api_key_auth.e b/samples/client/petstore/eiffel/src/framework/auth/api_key_auth.e index 9cd03d4208b..4299d42e180 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/api_key_auth.e +++ b/samples/client/petstore/eiffel/src/framework/auth/api_key_auth.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/auth/authentication.e b/samples/client/petstore/eiffel/src/framework/auth/authentication.e index d4f70460eb6..12c3f77c265 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/authentication.e +++ b/samples/client/petstore/eiffel/src/framework/auth/authentication.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e b/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e index 24aa58826ff..e1528199e3d 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e +++ b/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/auth/oauth.e b/samples/client/petstore/eiffel/src/framework/auth/oauth.e index bdcad7515c4..e432801c5fc 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/oauth.e +++ b/samples/client/petstore/eiffel/src/framework/auth/oauth.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/configuration.e b/samples/client/petstore/eiffel/src/framework/configuration.e index 806373bda4f..5f0d7ee52c3 100644 --- a/samples/client/petstore/eiffel/src/framework/configuration.e +++ b/samples/client/petstore/eiffel/src/framework/configuration.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e index 8484d1ac6f6..53f54dd1f9e 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 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 060324421fc..56442620c79 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 @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_json_serializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_json_serializer.e index bc124a8d79f..8dab668cb92 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_json_serializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_json_serializer.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e index 35a4b32321f..e870c3da48d 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e @@ -1,7 +1,7 @@ note description:"[ 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: \" \\ + 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 diff --git a/samples/client/petstore/eiffel/test/api_test.ecf b/samples/client/petstore/eiffel/test/api_test.ecf index 81f8eb4f32f..7a6f8fc387b 100644 --- a/samples/client/petstore/eiffel/test/api_test.ecf +++ b/samples/client/petstore/eiffel/test/api_test.ecf @@ -1,5 +1,5 @@ - +