Cristi Vîjdea
51ec07261d
Improve OAuth2 behaviour and documentation ( #90 )
...
* Set OAUTH2_REDIRECT_URL to oauth2-redirect.html by default
* Add example SWAGGER_SETTINGS for OAuth
* Add note about redirect URL
2018-03-24 13:05:37 +02:00
Cristi Vîjdea
a9cdf6d561
Fix type of properties in Schema docstring
...
Fixes #87 .
2018-03-21 13:39:14 +02:00
Cristi Vîjdea
a64ce95e3c
Reset testproj migrations
...
Heroku deployment issues...
2018-03-18 20:35:02 +02:00
Cristi Vîjdea
c9147a5746
Fix testproj people app
2018-03-18 20:20:04 +02:00
Cristi Vîjdea
ccdf646c0e
Run isort
2018-03-18 20:01:21 +02:00
Cristi Vîjdea
04252ebec3
Remove reodc-alpha artifacts
2018-03-18 19:52:16 +02:00
Cristi Vîjdea
848fb69009
Update swagger-ui to 3.13.0
2018-03-18 19:32:21 +02:00
Cristi Vîjdea
a7fbba4967
Update changelog for 1.5.0
2018-03-12 19:26:12 +02:00
Cristi Vîjdea
66785b1ee8
Update swagger-ui to 3.12.1
2018-03-12 19:06:20 +02:00
Cristi Vîjdea
9ad55bac99
Guard against attempted deletion of inexistent attributes
...
Fixes #76
2018-03-05 19:59:03 +02:00
Cristi Vîjdea
3d3b7899e5
Update swagger-ui to 3.12.0 and ReDoc to 1.21.2
2018-03-05 17:07:45 +02:00
Cristi Vîjdea
6ea8711a1f
Fix in-place modification of swagger_auto_schema arguments ( #75 )
...
Fixes #74
2018-03-05 11:51:51 +02:00
Cristi Vîjdea
ee46f59fb1
Infer ChoiceField type from model field when in ModelSerializer
...
Fixes part of issue #69
2018-02-26 20:32:57 +02:00
Cristi Vîjdea
b38d3e6805
Do not set pattern on non-string values
...
Fixes #68
2018-02-23 18:51:55 +02:00
Cristi Vîjdea
058fd7096d
Change README link from pypi.python.org to pypi.org
...
Description rendering is prettier on the new version.
2018-02-22 20:46:26 +02:00
Cristi Vîjdea
a32321d43a
Add release dates to changelog
2018-02-22 20:46:22 +02:00
Cristi Vîjdea
f15e70b7db
Fix missing assignment for default in openapi.Parameter
2018-02-22 20:33:47 +02:00
Cristi Vîjdea
64c280e222
Allow Response objects with no schema
...
Fixes #66 .
2018-02-22 03:46:44 +02:00
Cristi Vîjdea
d5073081d9
Fix ModelViewSet Nested bug ( #65 )
...
* Add todo repro app
* Add explicit test against model named "Nested"
* Force serializers named NestedSerializer to be output as inline models
* Allow ref_name to rescue a NestedSerializer
* Add tests and documentation
2018-02-22 03:46:16 +02:00
Cristi Vîjdea
10c7e22940
Merge pull request #64 from axnsan12/release/1.4.1
...
Release version 1.4.1
2018-02-21 05:17:57 +02:00
Cristi Vîjdea
6c497b32b4
Use TemplateHTMLRenderer for error responses in UIRenderer
...
Closes #58 .
2018-02-21 04:59:03 +02:00
Cristi Vîjdea
73c60a8fda
Add assertion against mistaken swagger_auto_schema methods usage
2018-02-21 04:42:56 +02:00
Cristi Vîjdea
97082e8898
Update swagger-ui to 3.10.0 and ReDoc to 1.21.0
2018-02-21 04:42:54 +02:00
Cristi Vîjdea
743396617e
Upgrade sphinx to 1.7.0
2018-02-21 04:42:53 +02:00
Cristi Vîjdea
97cd1b63d9
Take coerce_to_string into account when handling DecimalField
...
Closes #62 .
2018-02-21 04:42:34 +02:00
Cristi Vîjdea
71dee6eb45
Add OAuth2 client configuration for swagger-ui ( #57 )
2018-02-04 14:36:54 +02:00
Cristi Vîjdea
7fa0cc0639
Make DRF master test run with stable Django
2018-02-04 14:36:16 +02:00
Cristi Vîjdea
e8c688f981
Update swagger-ui to 3.9.3
2018-02-04 14:23:00 +02:00
Cristi Vîjdea
c01a6ead26
Bring project into 2018
2018-01-29 00:18:53 +02:00
Cristi Vîjdea
05901e99aa
Add 1.3.1 changelog
2018-01-24 17:43:38 +02:00
Cristi Vîjdea
a211184478
Add documentation about excluding endpoints
...
Closes #50 .
2018-01-24 17:38:10 +02:00
Cristi Vîjdea
a3e81ef7f6
Improve handling of consumes and produces attributes ( #55 )
...
* Fix get_consumes
* Generate produces for Operation
* Set global consumes and produces from rest framework DEFAULT_ settings
2018-01-24 14:44:00 +02:00
Cristi Vîjdea
a46b684fea
Add 1.3.0 changelog
2018-01-23 12:44:16 +02:00
Cristi Vîjdea
fc35d9043e
Add security requirements handling ( #54 )
...
* Add security requirements handling
* Update swagger-ui to 3.9.2, ReDoc to 1.20.0
Closes #39 .
2018-01-23 12:43:25 +02:00
Cristi Vîjdea
f18ff60ae7
Update swagger-ui to 3.9.1
2018-01-19 18:37:44 +01:00
Cristi Vîjdea
7a3fe8ec0c
Improve host, schemes and basePath handling ( #42 )
...
* added handling of basePath by taking into account SCRIPT_NAME and the longest common prefix
* improved handling of NamespaceVersioning by excluding URLs of differing versions
* added documentation and error messages for the problem reported in #37
2018-01-12 03:37:04 +01:00
Cristi Vîjdea
757d47e1c0
Add py3-django111 testing combination
...
Tests are also now run in parallel using detox and pytest-xdist.
2018-01-12 03:35:36 +01:00
Cristi Vîjdea
8dbf3fe984
Remove some inline scripts and styles
2018-01-10 22:54:56 +01:00
Cristi Vîjdea
1c3fba6e54
Add python_requires for pypi
...
Stolen from encode/django-rest-framework#5739
2018-01-10 21:59:16 +01:00
Cristi Vîjdea
c4379dc6a7
Run testproj in a Heroku demo app ( #38 )
...
* Add Heroku configuration
* Add links in API description
* Read database connection string from DATABASE_URL environment variable
* Restructure settings files for production
* Run server using gunicorn and servce static files with whitenoise
* Install drf-yasg from source instead of pypi in testproj
* Add readme links to demo app
2018-01-10 10:18:22 +01:00
Cristi Vîjdea
6b38a3b6c1
Update swagger-ui to 3.9.0
2018-01-09 14:43:15 +01:00
Cristi Vîjdea
464a518ae5
Add bdist_wheel distribution
2018-01-09 13:43:22 +01:00
Cristi Vîjdea
15c67891c6
Optimize requirements ( #35 )
2018-01-03 23:11:27 +01:00
Cristi Vîjdea
917ccd1f56
Restructure travis & tox configuration ( #34 )
...
Also removed useless python 3.7-dev build
2018-01-03 20:30:17 +01:00
Cristi Vîjdea
fd099998ea
Add explicit dependency on uritemplate and six
2018-01-03 16:39:14 +01:00
Cristi Vîjdea
a6e24e20c3
Improve README
2018-01-03 16:39:01 +01:00
Cristi Vîjdea
6608e0050c
Improve swagger_auto_schema usage error reports
2018-01-03 05:44:53 +01:00
Cristi Vîjdea
68b0dda0b9
Clean up and release 1.1.3
2018-01-02 22:27:09 +01:00
Cristi Vîjdea
f81795d745
Always vary cached schema on Cookie and Authorization
...
This is needed to play nice with session auth on the schema view and with CurrentUserDefault.
2018-01-02 16:14:00 +01:00
Cristi Vîjdea
faf81e7b6d
Simplify should_filter and should_page
2018-01-01 19:17:37 +01:00
Cristi Vîjdea
74fcd47047
Refactor setup requirements
2018-01-01 19:16:28 +01:00
Cristi Vîjdea
02b72c466e
Do not generate readOnly outside Schema properties
2018-01-01 19:16:20 +01:00
Cristi Vîjdea
10deea826d
Update swagger-ui to 3.8.1
2017-12-30 14:21:01 +01:00
Cristi Vîjdea
bbdc37a45e
Remove unneeded files from swagger-ui dist
2017-12-28 16:14:47 +01:00
Cristi Vîjdea
eba228a114
Prepare release 1.1.1
2017-12-27 21:05:07 +01:00
Cristi Vîjdea
ee4789776a
Fix isort inconsistency
2017-12-27 20:47:32 +01:00
Cristi Vîjdea
22853b87c7
Fix test_noop_inspectors
2017-12-27 20:23:21 +01:00
Cristi Vîjdea
d39764d383
Add isort
2017-12-27 20:23:05 +01:00
Cristi Vîjdea
60e266fe99
Make sphinx document CamelCaseJSONFilter
2017-12-27 20:14:12 +01:00
Cristi Vîjdea
9f14114520
Disable travis publish stage for untagged commits
2017-12-27 16:44:15 +01:00
Cristi Vîjdea
c85acee405
Convert regex '\Z' to '$'
...
See https://github.com/swagger-api/swagger-editor/issues/1601 .
2017-12-27 03:00:47 +01:00
Cristi Vîjdea
1aaec6b3e5
Set up automatic PyPI release on travis
...
Nine tries later...
Of note:
- `matrix` and `jobs` seem to be synonyms
- `branch: only` also excludes tags
- `fast_finish` does not seem to work with stages
2017-12-27 00:24:11 +01:00
Cristi Vîjdea
c89f96fcb0
Prepare for 1.1.0 ( #30 )
...
* refactor the view inspection process to be more modular and allow recursive customization
* add operation_id argument to @swagger_auto_
* add inspections for min/max validators
* add support for URLPathVersioning and NamespaceVersioning
* integrate with djangorestframework-camel-case
* fix bugs, improve tests and documentation
2017-12-26 22:50:59 +01:00
Cristi Vîjdea
73adc49b2c
Prepare release 1.0.6
2017-12-23 12:29:34 +01:00
Cristi Vîjdea
313d122004
Update swagger-ui to 3.8.0
2017-12-23 12:29:19 +01:00
Cristi Vîjdea
443d74b636
Merge pull request #27 from axnsan12/fix/callable-default
...
Fix callable default handling
2017-12-23 12:22:35 +01:00
Cristi Vîjdea
43034ddc4b
Fixed assumption of dict ordering
2017-12-23 12:04:02 +01:00
Cristi Vîjdea
9f6ee4da87
Improve RelatedField and callable default handling
...
- callable default values will now be properly called
- PrimaryKeyRelatedField and SlugRelatedField will now return an appropriate type based on the relation model's Field
- mock views now have a request object bound even when public is True
2017-12-23 11:52:57 +01:00
Cristi Vîjdea
8a8a9faeeb
Fix swagger Try it out and make endpoints work
2017-12-21 17:20:46 +01:00
Cristi Vîjdea
7683a28816
Merge pull request #20 from axnsan12/release/1.0.5
...
Version 1.0.5
2017-12-18 16:15:55 +01:00
Cristi Vîjdea
260a994baf
Disable Codecov build failures
2017-12-18 15:33:09 +01:00
Cristi Vîjdea
6060192a89
Update changelog and clean up code
2017-12-18 14:23:57 +01:00
Cristi Vîjdea
06a461ec09
Merge pull request #21 from h-hirokawa/file-field-response
...
Add support for FileField response.
2017-12-18 13:16:21 +01:00
Cristi Vîjdea
521172c195
Clean up Django 2 path backslashes
...
In Django 2, routes defines via urls.path are aggresively escaped when converted into regex.
This is a naive fix which unescapes all characters outside capture groups, but in the context of OpenAPI is okay because regular expressions inside paths are not supported anyway.
This issue affects django-rest-framework as well, as outlined in encode/django-rest-framework#5672 , encode/django-rest-framework#5675 .
2017-12-18 01:06:14 +01:00
Cristi Vîjdea
f6c30181fe
Use Django 2.0 for building docs
2017-12-17 11:18:49 +01:00
Cristi Vîjdea
da4b7d4e74
Fix test to account for changed description
...
See 8a5be407e2 .
2017-12-17 02:36:48 +01:00
Cristi Vîjdea
6346d855cf
Update swagger-ui to 3.7.0 and add UI update script
2017-12-17 02:34:53 +01:00
Cristi Vîjdea
53593af36f
Update documentation and changelog
2017-12-17 01:44:49 +01:00
Cristi Vîjdea
738326ac43
Fix crash caused by read-only nested Serializers
2017-12-17 01:43:57 +01:00
Cristi Vîjdea
8a5be407e2
Document exotic usages of swagger_auto_schema
...
method_decorator works out of the box so might as well document an example
2017-12-16 20:38:40 +01:00
Cristi Vîjdea
a2c21539f7
Prepare release 1.0.4
2017-12-16 18:18:21 +01:00
Cristi Vîjdea
73bd7a136d
Add query_serializer argument to swagger_auto_schema ( #17 )
...
Closes #16 .
2017-12-16 15:37:42 +01:00
Cristi Vîjdea
bdf7e8a4ae
Prepare release 1.0.3
2017-12-15 19:25:25 +01:00
Cristi Vîjdea
174f1153b4
Fix broken SwaggerDict pickling ( #15 )
...
Closes #14 .
2017-12-15 18:47:10 +01:00
Cristi Vîjdea
af2a44e1e9
Update documentation about Responses and form data
2017-12-15 12:13:09 +01:00
Cristi Vîjdea
f6a535eb45
Do not attempt to generate a response schema for form-only requests
...
It would probably fail because Schema objects cannot represent files
2017-12-15 11:14:47 +01:00
Cristi Vîjdea
e14c102b59
Repack into version 1.0.2
2017-12-13 11:16:09 +01:00
Cristi Vîjdea
83e539ab2e
Rename to drf-yasg, part 2
2017-12-13 10:45:43 +01:00
Cristi Vîjdea
c66f7e8e01
Rename to drf-yasg
...
drf-swagger was already taken
2017-12-13 10:22:03 +01:00
Cristi Vîjdea
71b3fd2895
Clean up for publish to pypi
2017-12-12 23:42:54 +01:00
Cristi Vîjdea
8883894775
Add more tests and cleanup coverage reports ( #13 )
...
Closes #11
2017-12-12 17:30:58 +01:00
Cristi Vîjdea
53ac55a24b
Add dcumentation ( #12 )
...
* added sphinx documentation
* filled in most missing docstrings
* updated README and setup.py, added CONTRIBUTING
* added docs build target
2017-12-12 11:14:33 +01:00
Cristi Vîjdea
bfced82ae4
Add suport for Response schemas ( #10 )
...
Schemas generated from Serializers will now be added to the `definitions` section by default, and used as `$ref` objects where needed.
The Schema definition name is based on the serializer class name, and can be overriden by specifying a `__ref_name__` property on the Serializer. If this property is set to None, the schema will not be added to `definitions` and will be forced inline.
Closes #6 , #7 .
2017-12-10 03:06:49 +01:00
Cristi Vîjdea
53b2560063
Add codecov configuration
2017-12-08 18:26:39 +01:00
Cristi Vîjdea
e5f598cdf3
Merge pull request #9 from axnsan12/schema-customization
...
Preliminary work on manual schema customization hooks
2017-12-08 17:59:02 +01:00
Cristi Vîjdea
652795f5db
Add swagger_auto_schema method decorator for Operation customization
...
See #5 .
2017-12-08 17:45:00 +01:00
Cristi Vîjdea
82cac4ef0d
Sort paths in output
2017-12-06 10:46:27 +01:00
Cristi Vîjdea
3f428d0cd1
Add 127.0.0.1 and localhost to ALLOWED_HOSTS
2017-12-06 09:46:33 +01:00
Cristi Vîjdea
dce00156d5
Rewrite schema generation ( #1 )
...
* Completeley rewritten schema generation
* Added support for python 2.7 and 3.4
* Restructured testing and build configuration
* Added nested request schemas
This rewrite completely replaces the public interface of the django rest schema generation library, so
further changes will be needed to re-enable and further extend the customization points one might want.
2017-12-05 19:46:02 +01:00
Cristi Vîjdea
5658910711
Merge branch 'fix-travis'
2017-12-03 00:02:36 +01:00