Consolidates enum parameter parsing into the corresponding enums
Generate enum parameter tooltips programmatically from enum options instead of hardcoding
Explicitly define int value per member in a non-order-dependent way
Add enum_values field to generated schema. Note that I didn't use OpenAPI enum spec (https://swagger.io/docs/specification/data-models/enums/) due to the need to tightly couple enum metadata values. If desired, standard enum field could be generated in addition (though would be more fragile/complicated for clients to parse)
Includes unit tests covering some subtle changes in parsing/comparison of enums.
Change is fully backwards compatible for inputs (note only change to example files is comment typo fix in Wanju example)
Output Total Avoided Carbon Emissions in tonnes instead of metric tonnes for brevity and consistency; also fixes result parsing of units as a side effect since tonnes doesn't have a space in it
enum_values
field to generated schema. Note that I didn't use OpenAPIenum
spec (https://swagger.io/docs/specification/data-models/enums/) due to the need to tightly couple enum metadata values. If desired, standardenum
field could be generated in addition (though would be more fragile/complicated for clients to parse)Total Avoided Carbon Emissions
intonnes
instead ofmetric tonnes
for brevity and consistency; also fixes result parsing of units as a side effect sincetonnes
doesn't have a space in itEnables UI to render enum params as dropdowns:
Initially self-reviewed in https://github.com/softwareengineerprogrammer/GEOPHIRES-X/pull/29