From 518a22a4e2edcc38520cb5ceb5a20f89a3145cfe Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 9 Mar 2017 15:59:15 +0000 Subject: [PATCH] Deployed 86931b01 with MkDocs version: 0.15.3 --- mkdocs/search_index.json | 2 +- topics/3.6-announcement/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json index b4ea87de4..8af9b6d0a 100644 --- a/mkdocs/search_index.json +++ b/mkdocs/search_index.json @@ -5302,7 +5302,7 @@ }, { "location": "/topics/3.6-announcement/", - "text": ".promo li a {\n float: left;\n width: 130px;\n height: 20px;\n text-align: center;\n margin: 10px 30px;\n padding: 150px 0 0 0;\n background-position: 0 50%;\n background-size: 130px auto;\n background-repeat: no-repeat;\n font-size: 120%;\n color: black;\n}\n.promo li {\n list-style: none;\n}\n\n\n\n\nDjango REST framework 3.6\n\n\nThe 3.6 release adds two major new features to REST framework.\n\n\n\n\nBuilt-in interactive API documentation support.\n\n\nA new JavaScript client\nlibrary.\n\n\n\n\n\n\nAbove: The interactive API documentation.\n\n\n\n\nFunding\n\n\nThe 3.6 release would not have been possible without our \nbacking from Mozilla\n to the project, and our \ncollaborative funding\nmodel\n.\n\n\nIf you use REST framework commercially and would like to see this work continue,\nwe strongly encourage you to invest in its continued development by\n\nsigning up for a paid\nplan\n.\n\n\n\n \nRover.com\n\n \nSentry\n\n \nStream\n\n \nMachinalis\n\n \nRollbar\n\n \nMicroPyramid\n\n\n\n\n\n\n\n\nMany thanks to all our \nsponsors\n, and in particular to our premium backers, \nRover\n, \nSentry\n, \nStream\n, \nMachinalis\n, \nRollbar\n, and \nMicroPyramid\n.\n\n\n\n\nInteractive API documentation\n\n\nREST framework's new API documentation supports a number of features:\n\n\n\n\nLive API interaction.\n\n\nSupport for various authentication schemes.\n\n\nCode snippets for the Python, JavaScript, and Command Line clients.\n\n\n\n\nThe \ncoreapi\n library is required as a dependancy for the API docs. Make sure\nto install the latest version (2.3.0 or above). The \npygments\n and \nmarkdown\n\nlibraries are optional but recommended.\n\n\nTo install the API documentation, you'll need to include it in your projects URLconf:\n\n\nfrom rest_framework.documentation import include_docs_urls\n\nAPI_TITLE = 'API title'\nAPI_DESCRIPTION = '...'\n\nurlpatterns = [\n ...\n url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION))\n]\n\n\n\nOnce installed you should see something a little like this:\n\n\n\n\nWe'll likely be making further refinements to the API documentation over the\ncoming weeks. Keep in mind that this is a new feature, and please do give\nus feedback if you run into any issues or limitations.\n\n\nFor more information on documenting your API endpoints see the \n\"Documenting your API\"\n section.\n\n\n\n\nJavaScript client library\n\n\nThe JavaScript client library allows you to load an API schema, and then interact\nwith that API at an application layer interface, rather than constructing fetch\nrequests explicitly.\n\n\nHere's a brief example that demonstrates:\n\n\n\n\nLoading the client library and schema.\n\n\nInstantiating an authenticated client.\n\n\nMaking an API request using the client.\n\n\n\n\nindex.html\n\n\nhtml\n\n \nhead\n\n \nscript src=\"/static/rest_framework/js/coreapi-0.1.0.js\"\n/script\n\n \nscript src=\"/docs/schema.js' %}\"\n/script\n\n \nscript\n\n const coreapi = window.coreapi\n const schema = window.schema\n\n // Instantiate a client...\n let auth = coreapi.auth.TokenAuthentication({scheme: 'JWT', token: 'xxx'})\n let client = coreapi.Client({auth: auth})\n\n // Make an API request...\n client.action(schema, ['projects', 'list']).then(function(result) {\n alert(result)\n })\n \n/script\n\n \n/head\n\n\n/html\n\n\n\n\nThe JavaScript client library supports various authentication schemes, and can be\nused by your project itself, or as an external client interacting with your API.\n\n\nThe client is not limited to usage with REST framework APIs, although it does\ncurrently only support loading CoreJSON API schemas. Support for Swagger and\nother API schemas is planned.\n\n\nFor more details see the \nJavaScript client library documentation\n.\n\n\nAuthentication classes for the Python client library\n\n\nPrevious authentication support in the Python client library was limited to\nallowing users to provide explicit header values.\n\n\nWe now have better support for handling the details of authentication, with\nthe introduction of the \nBasicAuthentication\n, \nTokenAuthentication\n, and\n\nSessionAuthentication\n schemes.\n\n\nYou can include the authentication scheme when instantiating a new client.\n\n\nauth = coreapi.auth.TokenAuthentication(scheme='JWT', token='xxx-xxx-xxx')\nclient = coreapi.Client(auth=auth)\n\n\n\nFor more information see the \nPython client library documentation\n.\n\n\n\n\nDeprecations\n\n\nUpdating \ncoreapi\n\n\nIf you're using REST framework's schema generation, or want to use the API docs,\nthen you'll need to update to the latest version of coreapi. (2.3.0)\n\n\nGenerating schemas from Router\n\n\nThe 3.5 \"pending deprecation\" of router arguments for generating a schema view, such as \nschema_title\n, \nschema_url\n and \nschema_renderers\n, have now been escalated to a\n\"deprecated\" warning.\n\n\nInstead of using \nDefaultRouter(schema_title='Example API')\n, you should use the \nget_schema_view()\n function, and include the view explicitly in your URL conf.\n\n\nDjangoFilterBackend\n\n\nThe 3.5 \"pending deprecation\" warning of the built-in \nDjangoFilterBackend\n has now\nbeen escalated to a \"deprecated\" warning.\n\n\nYou should change your imports and REST framework filter settings as follows:\n\n\n\n\nrest_framework.filters.DjangoFilterBackend\n becomes \ndjango_filters.rest_framework.DjangoFilterBackend\n.\n\n\nrest_framework.filters.FilterSet\n becomes \ndjango_filters.rest_framework.FilterSet\n.\n\n\n\n\n\n\nWhat's next\n\n\nThere are likely to be a number of refinements to the API documentation and\nJavaScript client library over the coming weeks, which could include some of the following:\n\n\n\n\nSupport for private API docs, requiring login.\n\n\nFile upload and download support in the JavaScript client \n API docs.\n\n\nComprehensive documentation for the JavaScript client library.\n\n\nAutomatically including authentication details in the API doc code snippets.\n\n\nAdding authentication support in the command line client.\n\n\nSupport for loading Swagger and other schemas in the JavaScript client.\n\n\nImproved support for documenting parameter schemas and response schemas.\n\n\nRefining the API documentation interaction modal.\n\n\n\n\nOnce work on those refinements is complete, we'll be starting feature work\non realtime support, for the 3.7 release.", + "text": ".promo li a {\n float: left;\n width: 130px;\n height: 20px;\n text-align: center;\n margin: 10px 30px;\n padding: 150px 0 0 0;\n background-position: 0 50%;\n background-size: 130px auto;\n background-repeat: no-repeat;\n font-size: 120%;\n color: black;\n}\n.promo li {\n list-style: none;\n}\n\n\n\n\nDjango REST framework 3.6\n\n\nThe 3.6 release adds two major new features to REST framework.\n\n\n\n\nBuilt-in interactive API documentation support.\n\n\nA new JavaScript client\nlibrary.\n\n\n\n\n\n\nAbove: The interactive API documentation.\n\n\n\n\nFunding\n\n\nThe 3.6 release would not have been possible without our \nbacking from Mozilla\n to the project, and our \ncollaborative funding\nmodel\n.\n\n\nIf you use REST framework commercially and would like to see this work continue,\nwe strongly encourage you to invest in its continued development by\n\nsigning up for a paid\nplan\n.\n\n\n\n \nRover.com\n\n \nSentry\n\n \nStream\n\n \nMachinalis\n\n \nRollbar\n\n \nMicroPyramid\n\n\n\n\n\n\n\n\nMany thanks to all our \nsponsors\n, and in particular to our premium backers, \nRover\n, \nSentry\n, \nStream\n, \nMachinalis\n, \nRollbar\n, and \nMicroPyramid\n.\n\n\n\n\nInteractive API documentation\n\n\nREST framework's new API documentation supports a number of features:\n\n\n\n\nLive API interaction.\n\n\nSupport for various authentication schemes.\n\n\nCode snippets for the Python, JavaScript, and Command Line clients.\n\n\n\n\nThe \ncoreapi\n library is required as a dependancy for the API docs. Make sure\nto install the latest version (2.3.0 or above). The \npygments\n and \nmarkdown\n\nlibraries are optional but recommended.\n\n\nTo install the API documentation, you'll need to include it in your projects URLconf:\n\n\nfrom rest_framework.documentation import include_docs_urls\n\nAPI_TITLE = 'API title'\nAPI_DESCRIPTION = '...'\n\nurlpatterns = [\n ...\n url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION))\n]\n\n\n\nOnce installed you should see something a little like this:\n\n\n\n\nWe'll likely be making further refinements to the API documentation over the\ncoming weeks. Keep in mind that this is a new feature, and please do give\nus feedback if you run into any issues or limitations.\n\n\nFor more information on documenting your API endpoints see the \n\"Documenting your API\"\n section.\n\n\n\n\nJavaScript client library\n\n\nThe JavaScript client library allows you to load an API schema, and then interact\nwith that API at an application layer interface, rather than constructing fetch\nrequests explicitly.\n\n\nHere's a brief example that demonstrates:\n\n\n\n\nLoading the client library and schema.\n\n\nInstantiating an authenticated client.\n\n\nMaking an API request using the client.\n\n\n\n\nindex.html\n\n\nhtml\n\n \nhead\n\n \nscript src=\"/static/rest_framework/js/coreapi-0.1.0.js\"\n/script\n\n \nscript src=\"/docs/schema.js' %}\"\n/script\n\n \nscript\n\n const coreapi = window.coreapi\n const schema = window.schema\n\n // Instantiate a client...\n let auth = coreapi.auth.TokenAuthentication({scheme: 'JWT', token: 'xxx'})\n let client = coreapi.Client({auth: auth})\n\n // Make an API request...\n client.action(schema, ['projects', 'list']).then(function(result) {\n alert(result)\n })\n \n/script\n\n \n/head\n\n\n/html\n\n\n\n\nThe JavaScript client library supports various authentication schemes, and can be\nused by your project itself, or as an external client interacting with your API.\n\n\nThe client is not limited to usage with REST framework APIs, although it does\ncurrently only support loading CoreJSON API schemas. Support for Swagger and\nother API schemas is planned.\n\n\nFor more details see the \nJavaScript client library documentation\n.\n\n\nAuthentication classes for the Python client library\n\n\nPrevious authentication support in the Python client library was limited to\nallowing users to provide explicit header values.\n\n\nWe now have better support for handling the details of authentication, with\nthe introduction of the \nBasicAuthentication\n, \nTokenAuthentication\n, and\n\nSessionAuthentication\n schemes.\n\n\nYou can include the authentication scheme when instantiating a new client.\n\n\nauth = coreapi.auth.TokenAuthentication(scheme='JWT', token='xxx-xxx-xxx')\nclient = coreapi.Client(auth=auth)\n\n\n\nFor more information see the \nPython client library documentation\n.\n\n\n\n\nDeprecations\n\n\nUpdating coreapi\n\n\nIf you're using REST framework's schema generation, or want to use the API docs,\nthen you'll need to update to the latest version of coreapi. (2.3.0)\n\n\nGenerating schemas from Router\n\n\nThe 3.5 \"pending deprecation\" of router arguments for generating a schema view, such as \nschema_title\n, \nschema_url\n and \nschema_renderers\n, have now been escalated to a\n\"deprecated\" warning.\n\n\nInstead of using \nDefaultRouter(schema_title='Example API')\n, you should use the \nget_schema_view()\n function, and include the view explicitly in your URL conf.\n\n\nDjangoFilterBackend\n\n\nThe 3.5 \"pending deprecation\" warning of the built-in \nDjangoFilterBackend\n has now\nbeen escalated to a \"deprecated\" warning.\n\n\nYou should change your imports and REST framework filter settings as follows:\n\n\n\n\nrest_framework.filters.DjangoFilterBackend\n becomes \ndjango_filters.rest_framework.DjangoFilterBackend\n.\n\n\nrest_framework.filters.FilterSet\n becomes \ndjango_filters.rest_framework.FilterSet\n.\n\n\n\n\n\n\nWhat's next\n\n\nThere are likely to be a number of refinements to the API documentation and\nJavaScript client library over the coming weeks, which could include some of the following:\n\n\n\n\nSupport for private API docs, requiring login.\n\n\nFile upload and download support in the JavaScript client \n API docs.\n\n\nComprehensive documentation for the JavaScript client library.\n\n\nAutomatically including authentication details in the API doc code snippets.\n\n\nAdding authentication support in the command line client.\n\n\nSupport for loading Swagger and other schemas in the JavaScript client.\n\n\nImproved support for documenting parameter schemas and response schemas.\n\n\nRefining the API documentation interaction modal.\n\n\n\n\nOnce work on those refinements is complete, we'll be starting feature work\non realtime support, for the 3.7 release.", "title": "3.6 Announcement" }, { diff --git a/topics/3.6-announcement/index.html b/topics/3.6-announcement/index.html index 88e2a7207..c70344f26 100644 --- a/topics/3.6-announcement/index.html +++ b/topics/3.6-announcement/index.html @@ -545,7 +545,7 @@ client = coreapi.Client(auth=auth)

For more information see the Python client library documentation.


Deprecations

-

Updating coreapi

+

Updating coreapi

If you're using REST framework's schema generation, or want to use the API docs, then you'll need to update to the latest version of coreapi. (2.3.0)

Generating schemas from Router