コード例 #1
0
ファイル: route.py プロジェクト: mfournier/v6_api
    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)
コード例 #2
0
ファイル: route.py プロジェクト: tsauerwein/c2corgv6_api

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)
コード例 #3
0
ファイル: waypoint.py プロジェクト: tsauerwein/c2corgv6_api
    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)
コード例 #4
0
ファイル: image.py プロジェクト: mfournier/v6_api
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)
コード例 #5
0
ファイル: image.py プロジェクト: tsauerwein/c2corgv6_api

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)
コード例 #6
0
ファイル: waypoint.py プロジェクト: mfournier/v6_api
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)