RouteLocale, # whitelisted attributes includes=schema_locale_attributes + attributes_locales, overrides={ 'version': { 'missing': None } }) schema_route = SQLAlchemySchemaNode( Route, # whitelisted attributes includes=schema_attributes + attributes, overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_route_locale] }, 'activities': { 'validator': colander.Length(min=1) }, 'geometry': geometry_schema_overrides }) schema_update_route = get_update_schema(schema_route)
schema_route_locale = SQLAlchemySchemaNode( RouteLocale, # whitelisted attributes includes=['version', 'culture', 'title', 'description', 'gear'], overrides={'version': { 'missing': None }}) schema_route = SQLAlchemySchemaNode( Route, # whitelisted attributes includes=[ 'document_id', 'version', 'activities', 'height', 'locales', 'geometry' ], overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_route_locale] }, 'geometry': geometry_schema_overrides }) schema_update_route = get_update_schema(schema_route)
WaypointLocale, # whitelisted attributes includes=[ 'version', 'culture', 'title', 'description', 'pedestrian_access' ], overrides={'version': { 'missing': None }}) schema_waypoint = SQLAlchemySchemaNode( Waypoint, # whitelisted attributes includes=[ 'document_id', 'version', 'waypoint_type', 'elevation', 'maps_info', 'locales', 'geometry' ], overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_waypoint_locale] }, 'geometry': geometry_schema_overrides }) schema_update_waypoint = get_update_schema(schema_waypoint)
schema_image_locale = SQLAlchemySchemaNode( ImageLocale, # whitelisted attributes includes=['version', 'culture', 'title', 'description'], overrides={ 'version': { 'missing': None } }) schema_image = SQLAlchemySchemaNode( Image, # whitelisted attributes includes=[ 'document_id', 'version', 'activities', 'height', 'locales', 'geometry'], overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_image_locale] }, 'geometry': geometry_schema_overrides }) schema_update_image = get_update_schema(schema_image)
schema_image_locale = SQLAlchemySchemaNode( ImageLocale, # whitelisted attributes includes=['version', 'culture', 'title', 'description'], overrides={'version': { 'missing': None }}) schema_image = SQLAlchemySchemaNode( Image, # whitelisted attributes includes=[ 'document_id', 'version', 'activities', 'height', 'locales', 'geometry' ], overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_image_locale] }, 'geometry': geometry_schema_overrides }) schema_update_image = get_update_schema(schema_image)
schema_waypoint_locale = SQLAlchemySchemaNode( WaypointLocale, # whitelisted attributes includes=schema_locale_attributes + attributes_locales, overrides={ 'version': { 'missing': None } }) schema_waypoint = SQLAlchemySchemaNode( Waypoint, # whitelisted attributes includes=schema_attributes + attributes, overrides={ 'document_id': { 'missing': None }, 'version': { 'missing': None }, 'locales': { 'children': [schema_waypoint_locale] }, 'geometry': geometry_schema_overrides }) schema_update_waypoint = get_update_schema(schema_waypoint)