from django.conf.urls import url
from recipes_sample import views
from rest_framework_swagger.views import get_swagger_view

schema_view = get_swagger_view(title='Recipe API')

urlpatterns = [
    url(r'^assets/$',
        views.AssetsView.as_view(),
        name=views.AssetsView.name),
    url(r'^assets/(?P<pk>[0-9]+)$',
        views.AssetsDetailView.as_view(),
        name=views.AssetsDetailView.name),
    url(r'^categories/$',
        views.CategoryView.as_view(),
        name=views.CategoryView.name),
    url(r'^categories/(?P<pk>[0-9]+)$',
        views.CategoryDetailView.as_view(),
        name=views.CategoryDetailView.name),
    url(r'^dishes/$',
        views.DishView.as_view(),
        name=views.DishView.name),
    url(r'^dishes/(?P<pk>[0-9]+)$',
        views.DishDetailView.as_view(),
        name=views.DishDetailView.name),
    url(r'^ingredients/$',
        views.IngredientView.as_view(),
        name=views.IngredientView.name),
    url(r'^ingredients/(?P<pk>[0-9]+)$',
        views.IngredientDetailView.as_view(),
        name=views.IngredientDetailView.name),
    url(r'^riseingredients/$',
        views.RiseIngredientView.as_view(),
        name=views.RiseIngredientView.name),
    url(r'^riseingredients/(?P<pk>[0-9]+)$',
        views.RiseIngredientDetailView.as_view(),
        name=views.RiseIngredientDetailView.name),
    url(r'^taxonomy/$',
        views.TaxonomyView.as_view(),
        name=views.TaxonomyView.name),
    url(r'^taxonomy/(?P<pk>[0-9]+)$',
        views.TaxonomyDetailView.as_view(),
        name=views.TaxonomyDetailView.name),
    url(r'^mealplanrecipes/$',
        views.RecipeMealPlanView.as_view(),
        name=views.RecipeMealPlanView.name),
    url(r'^mealplanrecipes/(?P<pk>[0-9]+)$',
        views.RecipeMealPlanDetailView.as_view(),
        name=views.RecipeMealPlanDetailView.name),
    url(r'^mealplans/$',
        views.MealplanView.as_view(),
        name=views.MealplanView.name),
    url(r'^mealplan/(?P<pk>[0-9]+)$',
        views.MealplanDetailView.as_view(),
        name=views.MealplanDetailView.name),
    url(r'^recipes/$',
        views.RecipesView.as_view(),
        name=views.RecipesView.name),
    url(r'^recipes/(?P<pk>[0-9]+)$',
        views.RecipesDetailView.as_view(),
        name=views.RecipesDetailView.name),
    url(r'^swagger/$', schema_view,
        name="swagger-details"),
]
