cdevents / spec

A common specification for Continuous Delivery events
Apache License 2.0
133 stars 23 forks source link

Inconsistent use of 'enum' in mark down docs #157

Closed obowersa closed 8 months ago

obowersa commented 1 year ago

The markdown documents have a couple of different ways of describing an enum type.

Within the core.md document, it has the type 'Enum': Pipeline Run

Within the testing-events.md doc, it is either defined as a String enum: Testing Case Or, just as a string Trigger

It would be great to bring these all into alignment.

I'm happy to put a PR together for this. I feel like these should all be straight Enums based on the Design Decisions document, but also wanted to reach out to see it should be standardized to just Enum in the testing events document, or, if we should be using string enum everywhere?

e-backmark-ericsson commented 1 year ago

Thanks @obowersa for finding this inconsistency!

I believe that the field type should be noted as String for all enums. The fact that it is limited by an enum should more be considered a format/range restriction of that field. The most explicit way to show that in the docs would probably be to add another column to the tables, called "value format" or "value range" for example. We could later also use that column to limit the range of numerical values for example, if needed.

But such a change would also make the tables larger and maybe harder to read, so I propose for now that we make a smaller change so that the type field show whether it is an enum or not in parenthesis, like this:

| String (enum) |