Commit Graph

44 Commits

Author SHA1 Message Date
Lim H
32a0b62508 Fix introspection of list field in schema 2017-08-12 18:59:03 +01:00
Matt Davis
99569190ab If pagination class, include the schema generation
https://github.com/encode/django-rest-framework/issues/5144
2017-05-22 19:10:54 -04:00
Tom Christie
97312699f5 Merge pull request #5085 from hurturk/schema-method-limited
Generate schema with respect to http_method_names provided by CBV
2017-05-03 09:16:01 +01:00
hurturk
518bb44a9e Remove excessive class instance while getting http_method_names 2017-05-03 03:49:04 -04:00
hurturk
6075f8051a Refactor CBV schema method limitation for set operations 2017-05-02 17:34:53 -04:00
Tom Christie
aafd0a644f Merge pull request #4979 from linovia/feature/improve_schema_shortcut
Restrict doc & schema shortcuts to a subset of urls
2017-04-27 16:58:01 +01:00
Tom Christie
5e5fd67899 Merge pull request #5086 from valohai/limit-offset-pagination-schema
SchemaGenerator: Avoid crashing with pagesizeless paginators
2017-04-27 16:57:28 +01:00
Aarni Koskela
72da73310d SchemaGenerator: Avoid crashing with pagesizeless paginators 2017-04-19 09:43:28 +03:00
Xavier Ordoquy
778aee1bb3 Merge master. 2017-04-19 07:56:39 +02:00
hurturk
2196cd2bbb Generate schema with respect to http_method_names provided by CBV 2017-04-18 23:44:18 -04:00
Aarni Koskela
51a6c076e2 Allow customizing the SchemaGenerator class for docs 2017-04-18 14:14:04 +03:00
Xavier Ordoquy
6ad0be44d3 Merge remote-tracking branch 'reference/master' into feature/improve_schema_shortcut
* reference/master:
  use django 1.11rc1 in tox
  Leave parameters with regex pattern as String
  restored original formatting
  Do not hint BigAutoField as integer (outside of range)
  Mention where the mixins live
  Try to improve browser support
  Cleanup and refactor docs api.js script
  Move bootstrap modal data attrs to anchor
  Remove unused base.js script
  Correctly set scheme in coreapi TokenAuthentication
  reverted to fix the issue without changing setting
  DEFAULT_PAGINATION_CLASS is changed to 'None'
  add content block and breadcrumbs_empty block to allow base.html to be reused
  Update 7-schemas-and-client-libraries.md
  Updated testimonial name on funding site
  ID must start from 1 again
2017-03-24 15:21:43 +01:00
Tom Christie
8e9cb1e614 Merge pull request #5014 from dczech/feature/decouple-bigautofield
Include URL path regexs in API schemas where valid.
2017-03-22 09:37:07 +00:00
Dariusz Czech
54d0901f38 Leave parameters with regex pattern as String 2017-03-21 15:15:20 +01:00
Dariusz Czech
9074e3e478 restored original formatting 2017-03-21 08:40:59 +01:00
Dariusz Czech
c7e2d1d976 Do not hint BigAutoField as integer (outside of range) 2017-03-20 22:21:07 +01:00
sol HYUN
16aad89459 reverted to fix the issue without changing setting 2017-03-18 06:17:35 +09:00
Xavier Ordoquy
b558c9ecc4 Allow the documentation and schema shortcut functions to get a list of urls to introspect. 2017-03-15 08:07:12 +01:00
Tom Christie
f51bb5ac8b Drop unneeded comment 2017-03-10 09:10:29 +00:00
Chris Carty
bc2c76a000 fixed issue on schemas.py where if model._meta.get_field(variable) failed model_field was not set to None and would reult in an error 2017-03-09 21:11:52 -05:00
Xavier Ordoquy
537df7a6ad Extract APISchemaView and APIRootView out of the DefaultRouter. (#4707) 2017-03-07 13:39:08 +00:00
Tom Christie
68d2020112 Live API documentation (#4755) 2017-03-03 15:24:37 +00:00
Roman Vasilyev
64e801e479 get view for django 'virtual hosts' (#4776)
Brill, thanks! 👍
2017-01-06 22:46:36 +00:00
Christian Hess
f38734ef98 Add new line correctly in docstring sections (#4759)
The order of the line break was wrong
2016-12-20 16:26:18 +00:00
Rex Salisbury
06df61e38c handle error when no links are found (#4649)
This is to address https://github.com/tomchristie/django-rest-raml/issues/5

The problem is that if you try to generate RAML docs when you haven't set up any views, you get the above error (min called on an empty list).  

unfortunately, this PR is not very helpful since it doesn't actually surface a readable error to the user.  Not sure what the best way to address this would be...
2016-11-07 11:41:10 +00:00
Andrzej Pragacz
45e058d7ba Fix unhandled Http404, PermissionDenied in schema generation (#4645) (#4646) 2016-11-02 09:04:01 +00:00
Tom Christie
0fe0e1e703 Fix schema base paths (#4611) 2016-10-21 16:59:34 +01:00
SerenityCode
02fcf6a334 Use field name instead of source when generating docs (#4559) 2016-10-12 09:46:59 +01:00
Tom Christie
0dec36eb41 Version 3.5 (#4525)
* Start test case

* Added 'requests' test client

* Address typos

* Graceful fallback if requests is not installed.

* Add cookie support

* Tests for auth and CSRF

* Py3 compat

* py3 compat

* py3 compat

* Add get_requests_client

* Added SchemaGenerator.should_include_link

* add settings for html cutoff on related fields

* Router doesn't work if prefix is blank, though project urls.py handles prefix

* Fix Django 1.10 to-many deprecation

* Add django.core.urlresolvers compatibility

* Update django-filter & django-guardian

* Check for empty router prefix; adjust URL accordingly

It's easiest to fix this issue after we have made the regex.  To try
to fix it before would require doing something different for List vs
Detail, which means we'd have to know which type of url we're
constructing before acting accordingly.

* Fix misc django deprecations

* Use TOC extension instead of header

* Fix deprecations for py3k

* Add py3k compatibility to is_simple_callable

* Add is_simple_callable tests

* Drop python 3.2 support (EOL, Dropped by Django)

* schema_renderers= should *set* the renderers, not append to them.

* API client (#4424)

* Fix release notes

* Add note about 'User account is disabled.' vs 'Unable to log in'

* Clean up schema generation (#4527)

* Handle multiple methods on custom action (#4529)

* RequestsClient, CoreAPIClient

* exclude_from_schema

* Added 'get_schema_view()' shortcut

* Added schema descriptions

* Better descriptions for schemas

* Add type annotation to schema generation

* Coerce schema 'pk' in path to actual field name

* Deprecations move into assertion errors

* Use get_schema_view in tests

* Updte CoreJSON media type

* Handle schema structure correctly when path prefixs exist. Closes #4401

* Add PendingDeprecation to Router schema generation.

* Added SCHEMA_COERCE_PATH_PK and SCHEMA_COERCE_METHOD_NAMES

* Renamed and documented 'get_schema_fields' interface.
2016-10-10 13:03:46 +01:00
José Padilla
d0ed482d70 Skip HiddenField from Schema fields (#4429) 2016-08-22 16:53:53 +01:00
Tom Christie
e3f8d06baf Include .action attribute on viewsets when generating schemas (#4408) 2016-08-15 17:10:55 +01:00
Tom Christie
ae720d9bde Fix issue with generating categories for schema endpoints (#4394) 2016-08-12 10:58:47 +01:00
Tom Christie
116917dbed Add form field descriptions to schemas (#4387) 2016-08-11 16:18:33 +01:00
Tom Christie
01b498ec51 Fix schema categories for custom list actions (#4386) 2016-08-11 14:07:40 +01:00
Tom Christie
b50d8950ee Pass request to schema generation (#4383)
Pass request to schema generation
2016-08-11 11:27:28 +01:00
Tom Christie
d5178c9246 Include kwargs passed to 'as_view' when generating schemas (#4359) 2016-08-05 11:19:39 +01:00
Tom Christie
aff146ae83 Filter HEAD out from schemas (#4357) 2016-08-05 10:23:40 +01:00
jsurloppe
e997713313 urljoin with leading slash remove part of path (#4332) 2016-08-01 14:14:55 +01:00
Tom Christie
061e0ed084 Added url and schema_url arguments (#4321) 2016-07-28 12:08:34 +01:00
Tom Christie
1acbc29d58 Minor style tweak. [ci skip] 2016-07-27 15:39:46 +01:00
Alexander Gaevsky
46a870c002 Fix schema generation for APIView, since it does not have get_serializer_class method. (#4285) 2016-07-27 15:36:36 +01:00
Tom Christie
3586c8a61a Set view.format_kwarg in schema generator (#4315) 2016-07-27 14:43:45 +01:00
Tom Christie
8ebf81b150 Schema support should function when 'pagination_class = None' (#4314) 2016-07-27 13:02:48 +01:00
Tom Christie
6ff9840bde Schemas & client libraries. (#4179)
* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
2016-07-04 16:38:17 +01:00