-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca0f9df
commit 549c927
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,31 +5,27 @@ | |
from drf_yasg.views import get_schema_view | ||
from rest_framework.documentation import include_docs_urls | ||
|
||
API_TITLE = "The GrowEverything SoilCarbon API" | ||
API_TITLE = "The GrowEverything Project API" | ||
API_DESCRIPTION = ( | ||
"A project to collect and preview soil organic carbon performance in farms across Kenya" | ||
) | ||
|
||
schema_view = get_schema_view( | ||
openapi.Info( | ||
title="The GrowEverything SoilCarbon API", | ||
title="The GrowEverything Project API", | ||
default_version="v1", | ||
description="Soil carbon content across farms in Kenya", | ||
terms_of_service="", | ||
contact=openapi.Contact(email="[email protected] "), | ||
contact=openapi.Contact(email="[email protected] "), | ||
), | ||
public=True, | ||
) | ||
|
||
urlpatterns = [ | ||
path("soilcarbon/", include("soilcarbon.urls")), | ||
path("redoc/", schema_view.with_ui("redoc", | ||
path("docs/", schema_view.with_ui("redoc", | ||
cache_timeout=0), name="schema-redoc"), | ||
path("docs/", include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)), | ||
path("schema/", SpectacularAPIView.as_view(), name="schema"), | ||
# Optional UI: | ||
# path('new/schema/swagger-ui/', | ||
# SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), | ||
path( | ||
"schema/redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc" | ||
), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Farm Name,Geolocation Boundaries,SOC (tonnes/hectare) | ||
Pleasant meadows,"MULTIPOLYGON (((36.6828918621896 -1.32209309690797,36.6817693146741 -1.32150868054062,36.6820704404787 -1.32093144548994,36.6831869679401 -1.32151282288075,36.6828918621896 -1.32209309690797)))",200000 | ||
Green fields,"MULTIPOLYGON (((36.6850667258066 -1.32229655146208,36.6842792083558 -1.32189105361013,36.6848066586475 -1.32080704408268,36.6856292169269 -1.32121257411664,36.6850667258066 -1.32229655146208)))",135000 | ||
Bella Vista,"MULTIPOLYGON (((36.6834076867451 -1.3214422180075,36.6838969220348 -1.32047970045412,36.6840429681333 -1.32043076351651,36.6848066586475 -1.32080704408268,36.6842792083558 -1.32189105361013,36.6834076867451 -1.3214422180075)))",175000 | ||
Dominion farms,"MULTIPOLYGON (((36.6814440018922 -1.3190542543773,36.6826434266373 -1.31661103383083,36.6831275582099 -1.31687657956897,36.683108707304 -1.31693353539037,36.6825704684497 -1.31804795623787,36.6819543358792 -1.31930712134356,36.6814440018922 -1.3190542543773)))",12500 | ||
Yala swaps,"MULTIPOLYGON (((36.6794131501547 -1.31792603802093,36.6805857676736 -1.31551669110996,36.6809502979615 -1.31565701102695,36.6813291646532 -1.31584130195935,36.6813291646524 -1.31584130286333,36.6801836967707 -1.31830805870633,36.6796065273706 -1.31802195066048,36.6794131501547 -1.31792603802093)))",120000 | ||
Kano swaps,"MULTIPOLYGON (((36.6848670291739 -1.32065280130079,36.6840212111592 -1.32023595269827,36.6845031184618 -1.31925550131646,36.6853401809825 -1.31966793239002,36.6848670291739 -1.32065280130079)))",150000 | ||
Ahero plans,"MULTIPOLYGON (((36.6853401809825 -1.31966793239002,36.6845031184618 -1.31925550131646,36.6851375235976 -1.31796576582771,36.6860723164723 -1.31838159415916,36.6860481787779 -1.31843144357707,36.6849595188329 -1.32069835105683,36.6848670291739 -1.32065280130079,36.6853401809825 -1.31966793239002)))",155000 |