Closed patrice-conil closed 9 months ago
Hi @patrice-conil,
We recently had the same discussion around mapping for eventType discriminator in CloudEvents. mapping
in OAS 3 was introduced precisely to allow having independence between enum values and schema names. If both are the same, the mapping is redundant, OAS3 does not mandate to use it.
The key for mapping is the enum value, and we historically use UPPER_SNAKE_CASE for them, or kebab-case in the case of CloudEvents, while for schema names we use UpperCamelCase. So there is an inconsistency in the guidelines if we ask on one hand to be the same value, and on the other, to have same different formats.
Here we could adopt UpperCamelCase for "Circle" and it would work, But in geofencing we hace CloudEvents and we have the same situation.
Hi @patrice-conil,
We recently had the same discussion around mapping for eventType discriminator in CloudEvents.
mapping
in OAS 3 was introduced precisely to allow having independence between enum values and schema names. If both are the same, the mapping is redundant, OAS3 does not mandate to use it.The key for mapping is the enum value, and we historically use UPPER_SNAKE_CASE for them, or kebab-case in the case of CloudEvents, while for schema names we use UpperCamelCase. So there is an inconsistency in the guidelines if we ask on one hand to be the same value, and on the other, to have same different formats.
Here we could adopt UpperCamelCase for "Circle" and it would work, But in geofencing we hace CloudEvents and we have the same situation.
@jlurien, you're right, I close this one.
Problem description In Area, the mapping uses CIRCLE to reference the Circle object... but CIRCLE should be Circle
Expected behavior The left side of the mapping should be the object name, as explained in the design guidelines, to simplify implementation and consumption.
Alternative solution