You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi 👋
using the following schema for a test event: { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "labels": { "section": "auth" }, "description": "Testing Events with accepted values", "properties": { "context": { "id": "/properties/context" }, "traits": { "type": "object", "id": "/properties/traits" }, "properties": { "type": "object", "properties": { "backpack_contents": { "description": "What are you taking on your trip", "id": "/properties/properties/properties/backpack_contents", "properties": { "item_name": { "description": "Item name", "enum": [ "food", "raincoat", "salami", "tootbrush" ], "id": "/properties/properties/properties/backpack_contents/properties/item_name", "type": "string" }, "weight": { "description": "How heavy is the backpack", "id": "/properties/properties/properties/backpack_contents/properties/weight", "type": "integer" } }, "required": [], "type": "object" }, "heading": { "description": "Heading direction", "enum": [ "east", "north", "south", "west" ], "id": "/properties/properties/properties/heading", "type": "string" }, "trip_name": { "description": "A descriptive name for the trip, example: \"Road trip to Vegas\"", "id": "/properties/properties/properties/trip_name", "pattern": "([A-Z])\\w+", "type": "string" } }, "id": "/properties/properties" } } }
the generated code for Java, TestEvent.Builder takes heading as a String. Ideally this should be an enum with 4 options so clients shouldn't have these values hard-coded, which would also prevent other values to be added.
The text was updated successfully, but these errors were encountered:
Hi 👋
using the following schema for a test event:
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "labels": { "section": "auth" }, "description": "Testing Events with accepted values", "properties": { "context": { "id": "/properties/context" }, "traits": { "type": "object", "id": "/properties/traits" }, "properties": { "type": "object", "properties": { "backpack_contents": { "description": "What are you taking on your trip", "id": "/properties/properties/properties/backpack_contents", "properties": { "item_name": { "description": "Item name", "enum": [ "food", "raincoat", "salami", "tootbrush" ], "id": "/properties/properties/properties/backpack_contents/properties/item_name", "type": "string" }, "weight": { "description": "How heavy is the backpack", "id": "/properties/properties/properties/backpack_contents/properties/weight", "type": "integer" } }, "required": [], "type": "object" }, "heading": { "description": "Heading direction", "enum": [ "east", "north", "south", "west" ], "id": "/properties/properties/properties/heading", "type": "string" }, "trip_name": { "description": "A descriptive name for the trip, example: \"Road trip to Vegas\"", "id": "/properties/properties/properties/trip_name", "pattern": "([A-Z])\\w+", "type": "string" } }, "id": "/properties/properties" } } }
the generated code for Java,
TestEvent.Builder
takesheading
as aString
. Ideally this should be an enum with 4 options so clients shouldn't have these values hard-coded, which would also prevent other values to be added.The text was updated successfully, but these errors were encountered: