Javier Velilla c0c2f2b804
[Eiffel] various enhancements (#8076)
* Updated Eiffel code generator.
	Added missing language reserved words.

Updated mustache templates to use the latest Eiffel rules to avoid obsolte
feature calls and Cat-Calls.
Updated Eiffel configuration files (ecf's)
Updated comments styles.
Updated Travis CI file to use the latest Eiffel compiler.
Updated EIffel sample to use https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Added missing mapping decimal to REAL_64
Added Eiffel Kernel classes to importMapping to avoid generate models for
them.
Fixed issue with Eiffel feature name generation, updated toOperationId(String) method.
Simplified toInstantiationType method implementaetion.
Improved model.mustache to generate Eiffel models.

* Updated Eiffel sample.

* Removed unneeded tabs.

* Added AnyType mapping to ANY
Removed unneeded tab
Updated model name, remane models that starts with _.

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-07 10:07:03 +08:00

127 lines
3.5 KiB
Plaintext

note
description:"[
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: \" \\
The version of the OpenAPI document: 1.0.0
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
]"
date: "$Date$"
revision: "$Revision$"
EIS:"Eiffel openapi generator", "src=https://openapi-generator.tech", "protocol=uri"
class CAPITALIZATION
feature --Access
small_camel: detachable STRING_32
capital_camel: detachable STRING_32
small__snake: detachable STRING_32
capital__snake: detachable STRING_32
s_ca__et_h__flow__points: detachable STRING_32
ATT_NAME: detachable STRING_32
-- Name of the pet
feature -- Change Element
set_small_camel (a_name: like small_camel)
-- Set 'small_camel' with 'a_name'.
do
small_camel := a_name
ensure
small_camel_set: small_camel = a_name
end
set_capital_camel (a_name: like capital_camel)
-- Set 'capital_camel' with 'a_name'.
do
capital_camel := a_name
ensure
capital_camel_set: capital_camel = a_name
end
set_small__snake (a_name: like small__snake)
-- Set 'small__snake' with 'a_name'.
do
small__snake := a_name
ensure
small__snake_set: small__snake = a_name
end
set_capital__snake (a_name: like capital__snake)
-- Set 'capital__snake' with 'a_name'.
do
capital__snake := a_name
ensure
capital__snake_set: capital__snake = a_name
end
set_s_ca__et_h__flow__points (a_name: like s_ca__et_h__flow__points)
-- Set 's_ca__et_h__flow__points' with 'a_name'.
do
s_ca__et_h__flow__points := a_name
ensure
s_ca__et_h__flow__points_set: s_ca__et_h__flow__points = a_name
end
set_ATT_NAME (a_name: like ATT_NAME)
-- Set 'ATT_NAME' with 'a_name'.
do
ATT_NAME := a_name
ensure
ATT_NAME_set: ATT_NAME = a_name
end
feature -- Status Report
output: STRING
-- <Precursor>
do
create Result.make_empty
Result.append("%Nclass CAPITALIZATION%N")
if attached small_camel as l_small_camel then
Result.append ("%Nsmall_camel:")
Result.append (l_small_camel.out)
Result.append ("%N")
end
if attached capital_camel as l_capital_camel then
Result.append ("%Ncapital_camel:")
Result.append (l_capital_camel.out)
Result.append ("%N")
end
if attached small__snake as l_small__snake then
Result.append ("%Nsmall__snake:")
Result.append (l_small__snake.out)
Result.append ("%N")
end
if attached capital__snake as l_capital__snake then
Result.append ("%Ncapital__snake:")
Result.append (l_capital__snake.out)
Result.append ("%N")
end
if attached s_ca__et_h__flow__points as l_s_ca__et_h__flow__points then
Result.append ("%Ns_ca__et_h__flow__points:")
Result.append (l_s_ca__et_h__flow__points.out)
Result.append ("%N")
end
if attached ATT_NAME as l_ATT_NAME then
Result.append ("%NATT_NAME:")
Result.append (l_ATT_NAME.out)
Result.append ("%N")
end
end
end