diff --git a/.gitignore b/.gitignore
index b49d9f82..8174ece7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,47 +1,91 @@
-docs/swagger.png
-*.pyc
-*.ropeproject
-*env/
-swag/
+# Extended from https://github.com/github/gitignore/blob/master/Python.gitignore
*.py[cod]
-*.coverage
+*$py.class
# C extensions
*.so
-# Packages
-*.egg
-*.egg-info
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
.installed.cfg
-lib64
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
# Installer logs
pip-log.txt
+pip-delete-this-directory.txt
# Unit test / coverage reports
+htmlcov/
+.tox/
.coverage
-.tox
+.coverage.*
+.cache
nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
# Translations
*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# IPython Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# dotenv
+.env
+
+# virtualenv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+
+# Rope project settings
+.ropeproject
-# Mr Developer
-.idea
-.mr.developer.cfg
-.project
-.pydevproject
-
-tests/cigar_example/rest_framework_swagger
-db.sql
-tests/cigar_example/static
-supervisord.log
-tests/cigar_example/static_root/
-dist
+*.db
+site/
diff --git a/.travis.yml b/.travis.yml
index 25071bc1..09502429 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,45 +1,12 @@
language: python
-# This only controls the version of Python used to run tox, the
-# versions used for the tests are handled by tox itself. Python 3.5
-# is only installed if we explicitly request it, so we have to use
-# it as the base, so that it's available to tox. Python 2.7 and 3.4
-# are available in the Travis images by default. See:
-# https://github.com/travis-ci/travis-ci/issues/4794#issuecomment-143758799
python: "3.5"
-
sudo: false
-
env:
- - TOX_ENV=py27-flake8
- - TOX_ENV=py27-django1.8-drf2.3
- - TOX_ENV=py27-django1.8-drf2.4
- - TOX_ENV=py27-django1.8-drf3.0
- - TOX_ENV=py27-django1.8-drf3.1
- - TOX_ENV=py27-django1.8-drf3.2
- - TOX_ENV=py27-django1.8-drf3.3
- - TOX_ENV=py27-django1.9-drf3.3
- - TOX_ENV=py33-django1.8-drf3.1
- - TOX_ENV=py33-django1.8-drf3.2
- - TOX_ENV=py33-django1.8-drf3.3
- - TOX_ENV=py34-django1.8-drf2.3
- - TOX_ENV=py34-django1.8-drf2.4
- - TOX_ENV=py34-django1.8-drf3.0
- - TOX_ENV=py34-django1.8-drf3.1
- - TOX_ENV=py34-django1.8-drf3.2
- - TOX_ENV=py34-django1.8-drf3.3
- - TOX_ENV=py34-django1.9-drf3.3
- - TOX_ENV=py35-django1.8-drf3.3
- - TOX_ENV=py35-django1.9-drf3.3
-
+ - TOX_ENV=py27
+ - TOX_ENV=py35
matrix:
- allow_failures:
- - env: TOX_ENV=py27-django1.9-drf3.3
- - env: TOX_ENV=py34-django1.9-drf3.3
- - env: TOX_ENV=py35-django1.9-drf3.3
fast_finish: true
-
install:
- pip install tox
-
script:
- tox -e $TOX_ENV
diff --git a/LICENSE b/LICENSE
index 9300ef98..a418b262 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013, Marc Gibbons
+Copyright (c) 2013-2016, Marc Gibbons
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -19,4 +19,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
index f0923a41..cc2bfb70 100644
--- a/README.md
+++ b/README.md
@@ -2,23 +2,17 @@
[![build-status-badge]][build-status]
[![pypi-version]][pypi]
-[![license-badge]][license]
-[![docs-badge]][docs]
####An API documentation generator for Swagger UI and Django REST Framework
-This project is built on the [Django REST Framework Docs](https://github.com/marcgibbons/django-rest-framework-docs) and uses the lovely [Swagger from Wordnik](http://swagger.io) as an interface. This application introspectively generates documentation based on your Django REST Framework API code. Comments are generated in combination from code analysis and comment extraction. Here are some of the features that are documented:
+Full documentation: http://marcgibbons.github.io/django-rest-swagger/
-* API title - taken from the class name
-* Methods allowed
-* Serializers & fields in use by a certain method
-* Field default values, minimum, maximum, read-only and required attributes
-* URL parameters (ie. /product/{id})
-* Field `help_text` property is used to create the description from the serializer or model.
+**Note:** you are viewing documentation for version 2, using Django REST Framework 3.4+ and CoreAPI. Documentation for previous versions is available [here](http://django-rest-swagger.readthedocs.io/en/0.3.8/).
-## Quick start
-1. ```pip install django-rest-swagger```
+## Installation
+
+1. `pip install django-rest-swagger`
2. Add `rest_framework_swagger` to your `INSTALLED_APPS` setting:
@@ -29,22 +23,34 @@ This project is built on the [Django REST Framework Docs](https://github.com/mar
)
```
-3. Include the rest_framework_swagger URLs to a path of your choice
+## Rendering Swagger Specification and Documentation
+
+This package ships with two renderer classes:
+
+1. `OpenAPIRenderer` generates the OpenAPI (fka Swagger) JSON schema specification. This renderer will be presented if:
+ - `Content-Type: application/openapi+json` is specified in the headers.
+ - `?format=openapi` is passed as query param
+2. `SwaggerUIRenderer` generates the Swagger UI and requires the `OpenAPIRenderer`
- ```python
- patterns = ('',
- ...
- url(r'^docs/', include('rest_framework_swagger.urls')),
- )
- ```
-for more information, see the [documentation][docs].
+### Example: DRF Schema View
+```python
+from rest_framework_swagger.renderers import OpenAPIRenderer, SwaggerUIRenderer
+from rest_framework.decorators import api_view, renderer_classes
+from rest_framework import response, schemas
+
+@api_view()
+@renderer_classes([SwaggerUIRenderer, OpenAPIRenderer])
+def schema_view(request):
+ generator = schemas.SchemaGenerator(title='Pastebin API')
+ return response.Response(generator.get_schema(request=request))
+
+```
## Requirements
-* Python (2.7, 3.3, 3.4, 3.5)
-* Django (1.8)
-* Django REST framework (2.3.8+)
-* PyYAML (3.10+)
+* Django 1.8+
+* Django REST framework 3.4+
+* Python 2.7, 3.5
## Bugs & Contributions
Please report bugs by opening an issue
@@ -52,42 +58,13 @@ Please report bugs by opening an issue
Contributions are welcome and are encouraged!
## Special Thanks
-Thanks to [BNOTIONS](http://www.bnotions.com) for sponsoring initial development time.
-
Many thanks to Tom Christie & all the contributors who have developed [Django REST Framework](http://django-rest-framework.org/)
-## Contributors
-* Marc Gibbons (@marcgibbons)
-* Geraldo Andrade (@quein)
-* Vítek Pliska (@whit)
-* Falk Schuetzenmeister (@postfalk)
-* Lukas Hetzenecker (@lukas-hetzenecker)
-* David Wolever (@wolever)
-* Brian Moe (@bmoe)
-* Ian Martin (@aztechian)
-* @pzrq
-* @jfelectron
-* Warnar Boekkooi (@boekkooi)
-* Darren Thompson (@WhiteDawn)
-* Lukasz Balcerzak (@lukaszb)
-* David Newgas (@davidn)
-* Bozidar Benko (@bbenko)
-* @pySilver
-
-
-### Django REST Framework Docs contributors:
-
-* Scott Mountenay (@scottmx81)
-* @swistakm
-* Peter Baumgartner (@ipmb)
-* Marlon Bailey (@avinash240)
-
[build-status-badge]: https://travis-ci.org/marcgibbons/django-rest-swagger.svg?branch=master
[build-status]: https://travis-ci.org/marcgibbons/django-rest-swagger
[pypi-version]: https://img.shields.io/pypi/v/django-rest-swagger.svg
[pypi]: https://pypi.python.org/pypi/django-rest-swagger
-[license-badge]: https://img.shields.io/pypi/l/django-rest-swagger.svg
[license]: https://pypi.python.org/pypi/django-rest-swagger/
[docs-badge]: https://readthedocs.io/projects/django-rest-swagger/badge/
[docs]: http://django-rest-swagger.readthedocs.io/
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index f62aafa3..00000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,199 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-
-CIGAREXAMPLE = ../tests/cigar_example
-
-EXAMPLE_SOURCES = ../rest_framework_swagger/models.py \
- ../rest_framework_swagger/urlparser.py \
- ../rest_framework_swagger/docgenerator.py \
- ../rest_framework_swagger/decorators.py \
- ../rest_framework_swagger/urls.py \
- ../rest_framework_swagger/views.py \
- ../rest_framework_swagger/apidocview.py \
- ../rest_framework_swagger/introspectors.py \
- ../rest_framework_swagger/__init__.py \
- ../rest_framework_swagger/compat.py \
- ../tests/cigar_example/cigar_example/settings.py \
- ../tests/cigar_example/cigar_example/app/models.py \
- ../tests/cigar_example/cigar_example/app/urls.py \
- ../tests/cigar_example/cigar_example/app/__init__.py \
- ../tests/cigar_example/cigar_example/app/admin.py \
- ../tests/cigar_example/cigar_example/restapi/models.py \
- ../tests/cigar_example/cigar_example/restapi/serializers.py \
- ../tests/cigar_example/cigar_example/restapi/urls.py \
- ../tests/cigar_example/cigar_example/restapi/views.py \
- ../tests/cigar_example/cigar_example/restapi/__init__.py \
- ../tests/cigar_example/cigar_example/urls.py \
- ../tests/cigar_example/cigar_example/wsgi.py \
- ../tests/cigar_example/cigar_example/__init__.py \
- ../tests/cigar_example/cigar_example/test_example.py \
- ../tests/cigar_example/manage.py
-
-SCREENSHOTS = source/_static/cigar.png \
- source/_static/artisan_cigar.png \
- source/_static/jambalaya_find-POST.png \
- source/_static/manufacturerList-POST.png \
- source/_static/manufacturerList-GET.png
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
-help:
- @echo "Please use \`make ' where is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " texinfo to make Texinfo files"
- @echo " info to make Texinfo files and run them through makeinfo"
- @echo " gettext to make PO message catalogs"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
- -rm -f source/_static/*.png
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-source/_static:
- mkdir source/_static
-
-screenshots: $(SCREENSHOTS)
-
-$(SCREENSHOTS): $(EXAMPLE_SOURCES) tests.py source/_static
-
- $(CIGAREXAMPLE)/manage.py collectstatic --noinput
- PYTHONPATH=$(CIGAREXAMPLE)/cigar_example $(CIGAREXAMPLE)/manage.py test tests
-
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-rest-swagger.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-rest-swagger.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/django-rest-swagger"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-rest-swagger"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
- @echo "Run \`make' in that directory to run these through makeinfo" \
- "(use \`make info' here to do that automatically)."
-
-info:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/img/ui-screenshot.png b/docs/img/ui-screenshot.png
new file mode 100644
index 00000000..81bfa252
Binary files /dev/null and b/docs/img/ui-screenshot.png differ
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 00000000..1bd44e5d
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,111 @@
+# Django REST Swagger
+Swagger/OpenAPI Documentation Generator for Django REST Framework
+
+
+
+---
+
+**Note:** you are viewing documentation for version 2, using Django REST Framework 3.4+ and CoreAPI. Documentation for previous versions is available [here](http://django-rest-swagger.readthedocs.io/en/0.3.8/).
+
+---
+
+## Installation
+
+`$ pip install django-rest-swagger`
+
+
+Add `'rest_framework_swagger'` to `INSTALLED_APPS` in Django settings.
+
+**settings.py**
+```python
+INSTALLED_APPS = [
+ ...
+ 'rest_framework_swagger',
+ ...
+]
+```
+
+## Quick start
+
+To render the Swagger UI, set the Django REST Framework schema view rendere classes to include
+`OpenAPIRenderer` and the `SwaggerUIRenderer` classes from `rest_framework_swagger.renderers`.
+
+The `OpenAPIRenderer` is responsible for generating the JSON spec, while the `SwaggerUIRenderer` renders
+the UI.
+
+**Note:** to render the UI, both renderers must be included. The `OpenAPIRenderer` may be used on its own if you wish to host the UI independently.
+
+#### Example
+
+**views.py**
+```python
+from rest_framework.decorators import api_view, renderer_classes
+from rest_framework import schemas
+from rest_framework_swagger import OpenAPIRenderer, SwaggerUIRenderer
+
+generator = schemas.SchemaGenerator(title='Bookings API')
+
+@api_view()
+@renderer_classes([OpenAPIRenderer, SwaggerUIRenderer])
+def schema_view(request):
+ return generator.get_schema(request=request)
+
+
+```
+**urls.py**
+```python
+from django.conf.urls import url
+from views import schema_view
+
+urlpatterns = [
+ url('/', schema_view),
+ ...
+]
+```
+
+#### View in the browser
+![Screenshot](/img/ui-screenshot.png)
+
+
+## Changes in 2.0
+Version 2.0 is fundamentally different from previous versions and leverages the new schema generation features introduced in Django REST Framework 3.4. Introspection is performed by the framework and uses CoreAPI to store definitions. This is a breaking change from previous versions which were responsible for introspection as well as overrides.
+
+New:
+
+- SwaggerUI and the OpenAPI spec are renderer classes (simpler configuration)
+- SwaggerUI 2.1.4
+- Improved performance
+- Allow multiple instances of Swagger UI in a single Django project
+- Allow rendering the OpenAPI JSON spec independently
+- Improved control of authentication mechanisms
+
+Deprecated:
+
+- YAML docstrings
+
+
+## License
+```text
+Copyright (c) 2013-2016, Marc Gibbons
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+```
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index 0188feda..00000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-selenium==2.44.0
-Pillow==2.6.1
-Markdown==2.5.1
-Sphinx==1.2.3
diff --git a/docs/settings.md b/docs/settings.md
new file mode 100644
index 00000000..e402a94e
--- /dev/null
+++ b/docs/settings.md
@@ -0,0 +1,51 @@
+# Settings
+The configuration of Django REST Swagger is identical to Django REST Framework. Settings are configurable in `settings.py` by defining `SWAGGER_SETTINGS`.
+
+Example:
+
+**settings.py**
+```python
+SWAGGER_SETTINGS = {
+ 'SECURITY_DEFINITIONS': {
+ 'basic': {
+ 'type': 'basic'
+ }
+ }
+}
+```
+
+## Authentication
+#### USE_SESSION_AUTH
+Toggles the use of Django Auth as an authentication mechanism. Setting it to `True` will display
+a login/logout button on the Swagger UI and post csrf_tokens to the API.
+
+Default: `True`
+
+
+**Note:** The login/logout button relies on Django's `LOGIN_URL` and `LOGOUT_URL` settings which defaults to `/accounts/login`. Here's an example of how to configure using DRF's authentication endpoints.
+
+**urls.py**
+```python
+urlpatterns = [
+ url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
+]
+```
+**settings.py**
+```python
+LOGIN_URL = 'rest_framework:login'
+LOGOUT_URL = 'rest_framework:logout'
+```
+
+#### SECURITY_DEFINITIONS
+The security definitions configures which authentication methods can be used by Swagger. The schemes types currently supported by the OpenAPI 2.0 spec are `basic`, `apiKey` and `oauth2`.
+
+For more information on available options, please consult the OpenAPI [Security Object Definition](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-definitions-object)
+
+Default:
+```python
+{
+ 'basic': {
+ 'type': 'basic'
+ }
+}
+```
diff --git a/docs/source/_static/artisan_cigar.png b/docs/source/_static/artisan_cigar.png
deleted file mode 100644
index eab64f36..00000000
Binary files a/docs/source/_static/artisan_cigar.png and /dev/null differ
diff --git a/docs/source/_static/cigar.png b/docs/source/_static/cigar.png
deleted file mode 100644
index e3ba7927..00000000
Binary files a/docs/source/_static/cigar.png and /dev/null differ
diff --git a/docs/source/_static/jambalaya_find-POST.png b/docs/source/_static/jambalaya_find-POST.png
deleted file mode 100644
index 785d19f4..00000000
Binary files a/docs/source/_static/jambalaya_find-POST.png and /dev/null differ
diff --git a/docs/source/_static/manufacturerList-GET.png b/docs/source/_static/manufacturerList-GET.png
deleted file mode 100644
index d62cd818..00000000
Binary files a/docs/source/_static/manufacturerList-GET.png and /dev/null differ
diff --git a/docs/source/_static/manufacturerList-POST.png b/docs/source/_static/manufacturerList-POST.png
deleted file mode 100644
index dfa9d49a..00000000
Binary files a/docs/source/_static/manufacturerList-POST.png and /dev/null differ
diff --git a/docs/source/_static/raw_json.png b/docs/source/_static/raw_json.png
deleted file mode 100644
index 062e5340..00000000
Binary files a/docs/source/_static/raw_json.png and /dev/null differ
diff --git a/docs/source/conf.py b/docs/source/conf.py
deleted file mode 100644
index 94158a96..00000000
--- a/docs/source/conf.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-#
-# django-rest-swagger documentation build configuration file, created by
-# sphinx-quickstart on Sun Nov 9 17:02:55 2014.
-#
-# This file is execfile()d with the current directory set to
-# its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys
-try:
- from rest_framework_swagger import VERSION
-except:
- # eh?
- sys.path.append('../..')
- from rest_framework_swagger import VERSION
-
-extensions = []
-
-templates_path = ['_templates']
-
-source_suffix = '.rst'
-
-master_doc = 'index'
-
-project = 'django-rest-swagger'
-copyright = '2014, Marc Gibbons'
-
-sys.path.append("../../")
-version = VERSION
-release = VERSION
-
-exclude_patterns = []
-
-
-pygments_style = 'sphinx'
-html_theme = 'default'
-
-html_static_path = ['_static']
-
-htmlhelp_basename = 'django-rest-swaggerdoc'
-
-
-latex_elements = {
-}
-
-latex_documents = [
- ('index', 'django-rest-swagger.tex', 'django-rest-swagger Documentation',
- 'Marc Gibbons', 'manual'),
-]
-
-
-man_pages = [
- ('index', 'django-rest-swagger', 'django-rest-swagger Documentation',
- ['Marc Gibbons'], 1)
-]
-
-texinfo_documents = [
- ('index', 'django-rest-swagger', 'django-rest-swagger Documentation',
- 'Marc Gibbons', 'django-rest-swagger', 'One line description of project.',
- 'Miscellaneous'),
-]
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
deleted file mode 100644
index 2ae8b744..00000000
--- a/docs/source/examples.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-Examples
-========
-Basic Example with a ViewSet
-----------------------------
-
-Consider the following ViewSet:
-
-.. literalinclude:: ../../tests/cigar_example/cigar_example/restapi/views.py
- :pyobject: CigarViewSet
-
-with supporting model and serializer:
-
-.. literalinclude:: ../../tests/cigar_example/cigar_example/app/models.py
- :pyobject: Cigar
-
-.. literalinclude:: ../../tests/cigar_example/cigar_example/restapi/serializers.py
- :pyobject: CigarSerializer
-
-From this code, django-rest-swagger will produce the following swagger docs:
-
-.. image:: _static/cigar.png
-
-Function Based Views
---------------------
-django-rest-swagger also supports function based views. Since the
-serializers used by a function based view are not readily introspect-able,
-you can use the yaml parser to manually provide them.
-
-This example also illustrates support for markdown.
-
-.. literalinclude:: ../../tests/cigar_example/cigar_example/restapi/views.py
- :pyobject: find_jambalaya
-
-.. image:: _static/jambalaya_find-POST.png
-
-YAML in the class docstring
----------------------------
-You can put yaml in the class-level docstring of your view. It must be nested in
-the name of the method of interest:
-
-.. literalinclude:: ../../tests/cigar_example/cigar_example/restapi/views.py
- :pyobject: ArtisanCigarViewSet
-
-.. image:: _static/artisan_cigar.png
-
-
-Raw JSON objects
-----------------
-.. literalinclude:: ../../tests/cigar_example/cigar_example/restapi/views.py
- :pyobject: create_cigar2
-
-.. image:: _static/raw_json.png
-
-..
- Other things we need to show (and implement..):
- * how to provide response classes
- * how to make swagger accept raw json (#131)
- * how to generate header parameters
- * how to use exclude_namespace (#64)
- * how to customize grouping of apis
- * how to have multiple swagger api sets (#141)
- * how to override absolute url (#83)
- * how to suppress calling get_serializer_class (#86)
- - or how to mock request?
-
diff --git a/docs/source/index.rst b/docs/source/index.rst
deleted file mode 100644
index 2e46e811..00000000
--- a/docs/source/index.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-.. django-rest-swagger documentation master file, created by
- sphinx-quickstart on Sun Nov 9 17:02:55 2014.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Django REST Swagger
-===============================================
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- settings
- yaml
- misc
- examples
-
-Overview
-------------------
-
-Django REST Swagger is a library that generates
-`Swagger `_
-documentation from your `Django Rest Framework `_ API code.
-
-Supports `Swagger 1.2 `_.
-
-Quickstart
-------------------
-
-1. Add :code:`rest_framework_swagger` to :code:`INSTALLED_APPS`:
-
-.. code-block:: python
-
- INSTALLED_APPS = (
- ...
- 'rest_framework_swagger',
- )
-
-2. Include the rest_framework_swagger URLs to a path of your choice
-
-.. code-block:: python
-
- patterns = ('',
- ...
- url(r'^docs/', include('rest_framework_swagger.urls')),
- )
-
-Further configuration can be made via :doc:`SWAGGER_SETTINGS ` in your project's `settings.py`.
-
diff --git a/docs/source/misc.rst b/docs/source/misc.rst
deleted file mode 100644
index 477f7660..00000000
--- a/docs/source/misc.rst
+++ /dev/null
@@ -1,53 +0,0 @@
-Miscellaneous
-=============
-Markdown
---------
-
-django-rest-swagger will parse docstrings as markdown if `Markdown `_ is installed.
-
-reStructuredText
-----------------
-django-rest-swagger can be configured to parse docstrings as reStructuredText.
-
-Add to your settings:
-
-.. code-block:: python
-
- REST_FRAMEWORK = {
- 'VIEW_DESCRIPTION_FUNCTION': 'rest_framework_swagger.views.get_restructuredtext'
- }
-
-Swagger 'nickname' attribute
-----------------------------
-By default, django-rest-swagger uses django-rest-framework's get_view_name to resolve the `nickname` attribute
-of a Swagger operation. You can specify an alternative function for `nickname` resolution using the following setting:
-
-.. code-block:: python
-
- REST_FRAMEWORK = {
- 'VIEW_NAME_FUNCTION': 'module.path.to.custom.view.name.function'
- }
-
-This function should use the following signature:
-
-.. code-block:: python
-
- view_name(cls, suffix=None)
-
--:code:`cls` The view class providing the operation.
-
--:code:`suffix` The string name of the class method which is providing the operation.
-
-
-Swagger 'list' views
---------------------
-
-django-rest-swagger introspects your views and viewset methods in order to determine the serializer used.
-
-In the majority of cases, the object returned is a single type. However, there are times where multiple serialized
-objects can be returned, such as in the case of `list` methods.
-
-When you use ViewSets, django-rest-swagger will report that the `list` method on a viewset returns a list of objects.
-
-For other ViewSet methods or function based views, you can also hint to django-rest-swagger that the view response is
-also a list, rather than a single object. See :ref:`many`
diff --git a/docs/source/settings.rst b/docs/source/settings.rst
deleted file mode 100644
index e6b047b1..00000000
--- a/docs/source/settings.rst
+++ /dev/null
@@ -1,232 +0,0 @@
-SWAGGER_SETTINGS
-========================
-
-A dictionary containing all configuration of django-rest-swagger.
-
-Example:
-
-.. code-block:: python
-
- SWAGGER_SETTINGS = {
- 'exclude_url_names': [],
- 'exclude_namespaces': [],
- 'api_version': '0.1',
- 'api_path': '/',
- 'relative_paths': False,
- 'enabled_methods': [
- 'get',
- 'post',
- 'put',
- 'patch',
- 'delete'
- ],
- 'api_key': '',
- 'is_authenticated': False,
- 'is_superuser': False,
- 'unauthenticated_user': 'django.contrib.auth.models.AnonymousUser',
- 'permission_denied_handler': None,
- 'resource_access_handler': None,
- 'base_path':'helloreverb.com/docs',
- 'info': {
- 'contact': 'apiteam@wordnik.com',
- 'description': 'This is a sample server Petstore server. '
- 'You can find out more about Swagger at '
- ''
- 'http://swagger.wordnik.com '
- 'or on irc.freenode.net, #swagger. '
- 'For this sample, you can use the api key '
- '"special-key" to test '
- 'the authorization filters',
- 'license': 'Apache 2.0',
- 'licenseUrl': 'http://www.apache.org/licenses/LICENSE-2.0.html',
- 'termsOfServiceUrl': 'http://helloreverb.com/terms/',
- 'title': 'Swagger Sample App',
- },
- 'doc_expansion': 'none',
- }
-
-api_version
-------------------------
-
-version of your api.
-
-Defaults to :code:`''`
-
-api_path
-------------------------
-path to your api. url protocol and domain is taken from django settings, so do not include those in here.
-
-Defaults to :code:`'/'`
-
-api_key
-------------------------
-
-an api key
-
-Defaults to :code:`''`
-
-base_path
------------------------
-
-the url to where your main Swagger documentation page will live without the protocol. Optional.
-
-If not provided, it will generate the base_path from the :code:`request.get_host()` method.
-
-doc_expansion
------------------------
-
-The docExpansion parameter as defined in the Swagger UI spec. Potential values include "none", "list", or "full".
-
-Defaults to :code:`'none'`
-
-
-enabled_methods
------------------------
-
-The methods that can be interacted with in the UI
-
-Default: :code:`['get', 'post', 'put', 'patch', 'delete']`
-
-exclude_url_names
-------------------------
-
-list URL names to ignore
-
-Default: :code:`[]`
-
-exclude_namespaces
-------------------------
-
-list URL namespaces to ignore
-
-Default: :code:`[]`
-
-info
------------------------
-
-specify the info object per
- https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#513-info-object
-
-is_authenticated
-------------------------
-
-set to True to enforce user authentication
-
-Default: :code:`False`
-
-is_superuser
-------------------------
-
-set to True to enforce admin only access
-
-Default: :code:`False`
-
-unauthenticated_user
--------------------------
-
-Sets the class that is used for the user in unauthenticated requests.
-
-set to None to specify no user class
-
-Default: :code:`django.contrib.auth.models.AnonymousUser`
-
-permission_denied_handler
--------------------------
-
-custom handler for permission denied on attempting to access swagger.
-
-Takes a callable or a string that names a callable.
-
-Default: :code:`None`
-
-Example:
-
-.. code-block:: python
-
- SWAGGER_SETTINGS = {
- 'permission_denied_handler': 'app.views.permission_denied_handler'
- }
-
-Then in app/views.py:
-
-.. code-block:: python
-
- def permission_denied_handler(request):
- from django.http import HttpResponse
- return HttpResponse('you have no permissions!')
-
-relative_paths
---------------
-
-set to True to make API paths relative to specified :code:`api_path`.
-
-Default: :code:`False`
-
-resource_access_handler
--------------------------
-
-custom handler for delegating access rules to the project.
-
-Takes a callable or a string that names a callable with the following signature:
-
-.. code-block:: python
-
- def resource_access_handler(request, resource)
-
-The handler must accept the following arguments:
- `request` (django.http.HttpRequest): The request for documentation, providing the user and any
- other relevant details about the user who is making the HTTP request.
- `resource` (str): The path to the API endpoint for which to approve or reject authorization. Does not have
- leading/trailing slashes.
-
-The handler should return a truthy value when the resource is accessible in the context of the current request.
-
-Default: :code:`None`
-
-Example:
-
-.. code-block:: python
-
- SWAGGER_SETTINGS = {
- 'resource_access_handler': 'app.views.resource_access_handler'
- }
-
-Then in app/views.py:
-
-.. code-block:: python
-
- from django.core.urlresolvers import resolve
-
- from .flags import flag_is_active
-
-
- def resource_access_handler(request, resource):
- """ Callback for resource access. Determines who can see the documentation for which API. """
- # Superusers and staff can see whatever they want
- if request.user.is_superuser or request.user.is_staff:
- return True
- else:
- if isinstance(resource, basestring):
- try:
- resolver_match = resolve('/{}/'.format(resource))
- view = resolver_match.func
- except Exception:
- return False
- else:
- view = resource.callback
-
- view_attributes = view.func_dict
- feature_flag = view_attributes.get('feature_flag')
-
- # Hide documentation for disabled features
- if feature_flag and not flag_is_active(request, feature_flag):
- return False
- else:
- return True
-
-token_type
-----------
-
-Overrides authorization token type.
-
-Default: :code:`'Token'`
diff --git a/docs/source/yaml.rst b/docs/source/yaml.rst
deleted file mode 100644
index cb24ae2e..00000000
--- a/docs/source/yaml.rst
+++ /dev/null
@@ -1,260 +0,0 @@
-YAML Docstring
-====================
-Docstring parser powered by YAML syntax
-
-This parser allows you override some parts of automatic method inspection
-behaviours.
-
-Example:
-
-.. code-block:: python
-
- @api_view(["POST"])
- def foo_view(request):
- """
- Your docs
- ---
- # YAML (must be separated by `---`)
-
- type:
- name:
- required: true
- type: string
- url:
- required: false
- type: url
- created_at:
- required: true
- type: string
- format: date-time
-
- serializer: .serializers.FooSerializer
- omit_serializer: false
- many: true
-
- parameters_strategy: merge
- omit_parameters:
- - path
- parameters:
- - name: name
- description: Foobar long description goes here
- required: true
- type: string
- paramType: form
- - name: other_foo
- paramType: query
- - name: other_bar
- paramType: query
- - name: avatar
- type: file
-
- responseMessages:
- - code: 401
- message: Not authenticated
-
- consumes:
- - application/json
- - application/xml
- produces:
- - application/json
- - application/xml
- """
- ...
-
-parameters
---------------------------
-Define parameters and their properties in docstrings:
-
-.. code-block:: yaml
-
- parameters:
- - name: some_param
- description: Foobar long description goes here
- required: true
- type: integer
- paramType: form
- - name: other_foo
- paramType: query
- - name: avatar
- type: file
-
-For the fields allowed in each parameter, see the
-`Parameter Object `_
-fields and the
-`Data Type Fields `_.
-
-Exceptions: `$ref` is not currently supported.
-
-parameters meta-fields
-----------------------
-pytype
-~~~~~~
-
-If you have a Django Rest Framework serializer that you would like to use
-to populate :code:`type` you can specify it with :code:`pytype`:
-
-.. code-block:: yaml
-
- pytype: .serializers.FooSerializer
-
-Overriding parameters
----------------------
-
-parameters_strategy
-~~~~~~~~~~~~~~~~~~~
-It is possible to override parameters discovered by method inspector by
-defining:
-`parameters_strategy` option to either `merge` or `replace`
-
-To define different strategies for different `paramType`'s use the
-following syntax:
-
-.. code-block:: yaml
-
- parameters_strategy:
- form: replace
- query: merge
-
-By default strategy is set to `merge`
-
-omit_parameters
-~~~~~~~~~~~~~~~
-
-Sometimes the method inspector produces a list of parameters that
-you might not want to see in SWAGGER form. To handle this situation
-define `paramTypes` that should be omitted
-
-.. code-block:: yaml
-
- omit_parameters:
- - form
-
-Serializers
--------------------------
-
-You can explicitly specify the serializer:
-
-.. code-block:: yaml
-
- serializer: some.package.FooSerializer
-
-`serializer` can take a relative path, or no path. Lookup begins in the
-module of the view:
-
-.. code-block:: yaml
-
- serializer: .package.FooSerializer
-
- serializer: FooSerializer
-
-You can specify different serializers for request and response:
-
-.. code-block:: yaml
-
- request_serializer: some.package.FooSerializer
- response_serializer: some.package.BarSerializer
-
-You can prevent django-rest-swagger from using any serializer:
-
-.. code-block:: yaml
-
- omit_serializer: true
-
-
-type
------------------------
-If your view does not use a serializer at all but instead outputs a simple
-data type such as JSON you may define a custom response object in the method
-signature as follows:
-
-.. code-block:: yaml
-
- type:
- name:
- required: true
- type: string
- url:
- required: false
- type: url
-
-.. _many:
-
-many
-----
-
-In cases where an API response is a list of objects, it is possible to mark
-this to django-rest-swagger by overriding :code:`many` to `True`.
-
-.. code-block:: yaml
-
- many: true
-
-This overrides the :code:`type` returned to be an array of the resolved API
-type. ViewSet :code:`list` methods do not require this definition, and are
-marked as :code:`many` automatically.
-
-
-responseMessages
----------------------------------
-To document error codes that your APIView might throw
-you can define them in :code:`responseMessages`:
-
-.. code-block:: yaml
-
- responseMessages:
- - code: 401
- message: Not authenticated
- - code: 403
- message: Insufficient rights to call this procedure
-
-
-Media Types
----------------------------------
-To document supported media types as input or output you can
-define them as :code:`consumes` and/or :code:`produces`, respectively
-
-.. code-block:: yaml
-
- consumes:
- - application/json
- - application/xml
- produces:
- - application/json
- - application/xml
-
-Different models for reading and writing operations
----------------------------------------------------
-REST Framework does not output write_only fields in responses and also
-does not require read_only fields to be provided. It is worth to
-automatically register 2 separate models for reading and writing operations.
-
-The discovered serializer will be registered with `Write` or `Read` prefix.
-Response Class will be automatically adjusted if serializer class was
-detected by method inspector.
-
-You can also refer to these models in your parameters:
-
-.. code-block:: yaml
-
- parameters:
- - name: CigarSerializer
- type: WriteCigarSerializer
- paramType: body
-
-
-view_mocker
------------
-Specify a function to modify (or replace entirely) the view that
-django-rest-swagger uses to introspect serializer class.
-
-django-rest-swagger passes this function a view object, and expects a view
-object to be returned, or None, in which case this bit of introspection is
-skipped.
-
-.. literalinclude:: ../../rest_framework_swagger/tests.py
- :pyobject: ViewMockerNeedingAPI
-
-.. literalinclude:: ../../rest_framework_swagger/tests.py
- :pyobject: my_view_mocker
-
-
diff --git a/docs/tests.py b/docs/tests.py
deleted file mode 100644
index 9b815006..00000000
--- a/docs/tests.py
+++ /dev/null
@@ -1,197 +0,0 @@
-from django.test import LiveServerTestCase
-from selenium.webdriver.support.ui import WebDriverWait
-from selenium import webdriver
-from PIL import Image
-import time
-import os.path
-
-
-class ImageExtractionAndTests(LiveServerTestCase):
-
- def setUp(self):
- self.browser = webdriver.Firefox()
- self.browser.implicitly_wait(3)
- self.browser.get(self.live_server_url)
- # let swagger load itself
- # todo - figure out what swagger is doing and wait on that
- time.sleep(4)
-
- def tearDown(self):
- self.browser.quit()
-
- def by_css(self, css_str, many=False, src=None):
- src = src or self.browser
- if many:
- return src.find_elements_by_css_selector(css_str)
- else:
- return src.find_element_by_css_selector(css_str)
-
- def save_screenshot(self, element, file_name):
- nom = 'swagger.png'
- self.browser.save_screenshot(nom)
- location = element.location
- size = element.size
- im = Image.open(nom)
- left = location['x']
- top = location['y']
- right = location['x'] + size['width']
- bottom = location['y'] + size['height']
- im = im.crop((left, top, right, bottom))
- im.save(os.path.join('source', '_static', file_name))
-
- def get_toggle(self, endpoint):
- path = self.by_css(".path", src=endpoint)
- return self.by_css(".toggleOperation", src=path)
-
- def get_model_lines(self, endpoint):
- sgc = self.by_css(".signature-container", src=endpoint)
- desc = self.by_css(".description", src=sgc)
- span = self.by_css("span.strong", src=desc)
- divs = self.by_css("div", many=True, src=desc)
- return span, divs
-
- def test_cigars(self):
- cigars = self.by_css("#resource_cigars")
- a = self.by_css("a[href='#!/cigars']", src=cigars)
- a.click()
- time.sleep(1)
- cigars = self.by_css("#resource_cigars")
- endpoints = self.by_css("li.endpoint", many=True, src=cigars)
- self.assertEqual(len(endpoints), 8)
- a2 = self.by_css("a[href='#!/cigars/Cigar_0_1_2_3_4_5_6']")
- WebDriverWait(self.browser, 10).until(
- lambda b: a2.is_displayed()
- )
-
- endpoints = [e for e in endpoints
- if self.get_toggle(e).text == '/api/cigars/']
- toggle = self.get_toggle(endpoints[0])
- toggle.click()
- time.sleep(1)
- span, divs = self.get_model_lines(endpoints[0])
- self.assertEqual(span.text, "CigarSerializer {")
- self.assertEqual(len(divs), 10)
- durp = ["url (url),", "id (integer),"]
- self.assertIn(divs[0].text, durp)
- self.assertIn(divs[1].text, durp)
- self.assertEqual(divs[2].text, "name (string): Cigar Name,")
- self.assertEqual(divs[3].text, "colour (string),")
- self.assertEqual(divs[4].text, "form (multiple choice) = ['parejo' or 'torpedo' or 'pyramid' or 'perfecto' or 'presidente'],")
- self.save_screenshot(cigars, "cigar.png")
-
- def test_artisan_cigars(self):
- cigars = self.by_css("#resource_artisan_cigars")
- a = self.by_css("a[href='#!/artisan_cigars']", src=cigars)
- a.click()
- time.sleep(1)
- cigars = self.by_css("#resource_artisan_cigars")
- endpoints = self.by_css("li.endpoint", many=True, src=cigars)
- self.assertEqual(len(endpoints), 8)
- a2 = self.by_css("a[href='#!/artisan_cigars/Artisan_Cigar_0_1_2_3_4_5_6']")
- WebDriverWait(self.browser, 10).until(
- lambda b: a2.is_displayed()
- )
-
- endpoints = [e for e in endpoints
- if self.get_toggle(e).text == '/api/artisan_cigars/{pk}/set_price/']
- toggle = self.get_toggle(endpoints[0])
- toggle.click()
- time.sleep(1)
- e = endpoints[0]
- sgc = self.by_css(".signature-container", many=True, src=e)
- self.assertEqual(len(sgc), 0)
- http_method = self.by_css(".http_method", src=e)
- self.assertEqual(http_method.text, "POST")
- self.save_screenshot(cigars, "artisan_cigar.png")
-
- def test_manufacturer_list(self):
- manufacturers = self.by_css("#resource_manufacturers")
- a = self.by_css(
- "a[href='#!/manufacturers']",
- src=manufacturers
- )
- a.click()
- time.sleep(1)
- manufacturers = self.by_css("#resource_manufacturers")
-
- def is_from_list(endpoint):
- return self.get_toggle(endpoint).text == '/api/manufacturers/'
-
- def get_endpoints():
- return [e for e in
- self.by_css("li.endpoint", many=True, src=manufacturers)
- if is_from_list(e)]
-
- WebDriverWait(self.browser, 10).until(
- lambda b: len(get_endpoints()) == 2)
- for e in get_endpoints():
- toggle = self.get_toggle(e)
- toggle.click()
- self.by_css(".content", src=e)
- # wait for animation
- time.sleep(1)
- span, divs = self.get_model_lines(e)
- self.assertEqual(span.text, "ManufacturerSerializer {")
- self.assertEqual(len(divs), 3)
- self.assertEqual(divs[0].text, "id (integer),")
- self.assertEqual(divs[1].text, "name (string): name of company,")
- self.assertEqual(divs[2].text, "country (field)")
- http_method = self.by_css(".http_method", src=e)
- self.save_screenshot(e, "manufacturerList-%s.png" % http_method.text)
- toggle.click()
-
- def test_find_jambalaya(self):
- jambalaya = self.by_css("#resource_jambalaya_find")
- a = self.by_css(
- "a[href='#!/jambalaya_find']",
- src=jambalaya
- )
- a.click()
- time.sleep(1)
- jambalaya = self.by_css("#resource_jambalaya_find")
-
- def is_from_list(endpoint):
- return self.get_toggle(endpoint).text == '/api/jambalaya_find/'
-
- def get_endpoints():
- return [e for e in
- self.by_css("li.endpoint", many=True, src=jambalaya)
- if is_from_list(e)]
-
- WebDriverWait(self.browser, 10).until(lambda b: len(get_endpoints()) == 1)
- e = get_endpoints()[0]
- toggle = self.get_toggle(e)
- toggle.click()
- self.by_css(".content", src=e)
- # wait for animation
- time.sleep(1)
- span, divs = self.get_model_lines(e)
- self.assertEqual(span.text, "JambalayaSerializer {")
- self.assertEqual(len(divs), 2)
- self.assertEqual(divs[0].text, "id (integer),")
- self.assertEqual(divs[1].text, "recipe (string)")
- http_method = self.by_css(".http_method", src=e)
- self.save_screenshot(jambalaya, "jambalaya_find-%s.png" % http_method.text)
- toggle.click()
-
- def test_raw_json(self):
- top = self.by_css("#resource_custom_create")
- a = self.by_css("a[href='#!/custom_create']", src=top)
- a.click()
- time.sleep(1)
- a = self.by_css("a[href='#!/custom_create/Create_Cigar2']", src=top)
- a.click()
-
- def is_from_list(endpoint):
- return self.get_toggle(endpoint).text == '/api/custom_create/'
-
- def get_endpoints():
- return [e for e in self.by_css("li.endpoint", many=True, src=top)
- if is_from_list(e)]
-
- WebDriverWait(self.browser, 10).until(lambda b: len(get_endpoints()) == 1)
- b = self.by_css(".operation-params", src=top)
- a = self.by_css(".snippet-link", src=b)
- a.click()
- time.sleep(1)
- self.save_screenshot(top, "raw_json.png")
diff --git a/example_app/Procfile b/example_app/Procfile
new file mode 100644
index 00000000..c09a5521
--- /dev/null
+++ b/example_app/Procfile
@@ -0,0 +1 @@
+web: python manage.py runserver 0.0.0.0:$PORT --noreload
diff --git a/example_app/README.md b/example_app/README.md
new file mode 100644
index 00000000..cf393050
--- /dev/null
+++ b/example_app/README.md
@@ -0,0 +1,8 @@
+# Example app
+This module was copied from https://github.com/tomchristie/rest-framework-tutorial
+
+# REST framework tutorial
+
+Source code for the [Django REST framework tutorial][tut].
+
+[tut]: http://tomchristie.github.com/django-rest-framework/tutorial/1-serialization
diff --git a/tests/auth_example/manage.py b/example_app/manage.py
similarity index 54%
rename from tests/auth_example/manage.py
rename to example_app/manage.py
index b9321ad1..65b5acae 100755
--- a/tests/auth_example/manage.py
+++ b/example_app/manage.py
@@ -3,8 +3,8 @@
import sys
if __name__ == "__main__":
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "auth_example.settings")
- sys.path.append("../../")
+ sys.path.append(os.path.abspath(os.path.dirname('../%s' % __file__)))
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tutorial.settings")
from django.core.management import execute_from_command_line
diff --git a/tests/auth_example/auth_example/__init__.py b/example_app/snippets/__init__.py
similarity index 100%
rename from tests/auth_example/auth_example/__init__.py
rename to example_app/snippets/__init__.py
diff --git a/example_app/snippets/fixtures/users.json b/example_app/snippets/fixtures/users.json
new file mode 100644
index 00000000..04fe5049
--- /dev/null
+++ b/example_app/snippets/fixtures/users.json
@@ -0,0 +1,74 @@
+[
+ {
+ "pk": 2,
+ "model": "auth.user",
+ "fields": {
+ "username": "aziz",
+ "first_name": "",
+ "last_name": "",
+ "is_active": true,
+ "is_superuser": false,
+ "is_staff": false,
+ "last_login": "2012-10-28T21:36:57.799Z",
+ "groups": [],
+ "user_permissions": [],
+ "password": "pbkdf2_sha256$10000$2x3LOiFCb9sq$3jiN4zgb3wYHQ9fpn/elUrcn1S1Bq/q0djZFBjb8Y2w=",
+ "email": "",
+ "date_joined": "2012-10-28T21:36:57.799Z"
+ }
+ },
+ {
+ "pk": 3,
+ "model": "auth.user",
+ "fields": {
+ "username": "amy",
+ "first_name": "",
+ "last_name": "",
+ "is_active": true,
+ "is_superuser": false,
+ "is_staff": false,
+ "last_login": "2012-10-28T21:42:34.081Z",
+ "groups": [],
+ "user_permissions": [],
+ "password": "pbkdf2_sha256$10000$wjy2WvTgw1Ro$oR8pVFHIBqZUmD9XEHdRl5m4TxWOF+qnvZn/q+npTlc=",
+ "email": "",
+ "date_joined": "2012-10-28T21:42:34.081Z"
+ }
+ },
+ {
+ "pk": 4,
+ "model": "auth.user",
+ "fields": {
+ "username": "max",
+ "first_name": "",
+ "last_name": "",
+ "is_active": true,
+ "is_superuser": false,
+ "is_staff": false,
+ "last_login": "2012-10-28T21:42:45.711Z",
+ "groups": [],
+ "user_permissions": [],
+ "password": "pbkdf2_sha256$10000$NhDNt8GNYfjC$0FlcsJxt8Sac0dvGv+xcaUVSUfh1UYZfWEq3C1WoHjc=",
+ "email": "",
+ "date_joined": "2012-10-28T21:42:45.711Z"
+ }
+ },
+ {
+ "pk": 5,
+ "model": "auth.user",
+ "fields": {
+ "username": "jose",
+ "first_name": "",
+ "last_name": "",
+ "is_active": true,
+ "is_superuser": false,
+ "is_staff": false,
+ "last_login": "2012-10-28T21:43:03.591Z",
+ "groups": [],
+ "user_permissions": [],
+ "password": "pbkdf2_sha256$10000$ibnHXtPQKwBN$Kab9tTROT6bpxnAI1imgb0kdlAmBuAQ5Z0fAzHbkL68=",
+ "email": "",
+ "date_joined": "2012-10-28T21:43:03.591Z"
+ }
+ }
+]
diff --git a/example_app/snippets/migrations/0001_initial.py b/example_app/snippets/migrations/0001_initial.py
new file mode 100644
index 00000000..9259bd50
--- /dev/null
+++ b/example_app/snippets/migrations/0001_initial.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-07-09 18:40
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Snippet',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('created', models.DateTimeField(auto_now_add=True)),
+ ('title', models.CharField(blank=True, default='', max_length=100)),
+ ('code', models.TextField()),
+ ('linenos', models.BooleanField(default=False)),
+ ('language', models.CharField(choices=[('abap', 'ABAP'), ('ada', 'Ada'), ('agda', 'Agda'), ('ahk', 'autohotkey'), ('alloy', 'Alloy'), ('antlr', 'ANTLR'), ('antlr-as', 'ANTLR With ActionScript Target'), ('antlr-cpp', 'ANTLR With CPP Target'), ('antlr-csharp', 'ANTLR With C# Target'), ('antlr-java', 'ANTLR With Java Target'), ('antlr-objc', 'ANTLR With ObjectiveC Target'), ('antlr-perl', 'ANTLR With Perl Target'), ('antlr-python', 'ANTLR With Python Target'), ('antlr-ruby', 'ANTLR With Ruby Target'), ('apacheconf', 'ApacheConf'), ('apl', 'APL'), ('applescript', 'AppleScript'), ('as', 'ActionScript'), ('as3', 'ActionScript 3'), ('aspectj', 'AspectJ'), ('aspx-cs', 'aspx-cs'), ('aspx-vb', 'aspx-vb'), ('asy', 'Asymptote'), ('at', 'AmbientTalk'), ('autoit', 'AutoIt'), ('awk', 'Awk'), ('basemake', 'Base Makefile'), ('bash', 'Bash'), ('bat', 'Batchfile'), ('bbcode', 'BBCode'), ('befunge', 'Befunge'), ('blitzbasic', 'BlitzBasic'), ('blitzmax', 'BlitzMax'), ('boo', 'Boo'), ('brainfuck', 'Brainfuck'), ('bro', 'Bro'), ('bugs', 'BUGS'), ('c', 'C'), ('c-objdump', 'c-objdump'), ('ca65', 'ca65 assembler'), ('cbmbas', 'CBM BASIC V2'), ('ceylon', 'Ceylon'), ('cfc', 'Coldfusion CFC'), ('cfengine3', 'CFEngine3'), ('cfm', 'Coldfusion HTML'), ('cfs', 'cfstatement'), ('chai', 'ChaiScript'), ('chapel', 'Chapel'), ('cheetah', 'Cheetah'), ('cirru', 'Cirru'), ('clay', 'Clay'), ('clojure', 'Clojure'), ('clojurescript', 'ClojureScript'), ('cmake', 'CMake'), ('cobol', 'COBOL'), ('cobolfree', 'COBOLFree'), ('coffee-script', 'CoffeeScript'), ('common-lisp', 'Common Lisp'), ('console', 'Bash Session'), ('control', 'Debian Control file'), ('coq', 'Coq'), ('cpp', 'C++'), ('cpp-objdump', 'cpp-objdump'), ('croc', 'Croc'), ('cryptol', 'Cryptol'), ('csharp', 'C#'), ('css', 'CSS'), ('css+django', 'CSS+Django/Jinja'), ('css+erb', 'CSS+Ruby'), ('css+genshitext', 'CSS+Genshi Text'), ('css+lasso', 'CSS+Lasso'), ('css+mako', 'CSS+Mako'), ('css+mozpreproc', 'CSS+mozpreproc'), ('css+myghty', 'CSS+Myghty'), ('css+php', 'CSS+PHP'), ('css+smarty', 'CSS+Smarty'), ('cucumber', 'Gherkin'), ('cuda', 'CUDA'), ('cypher', 'Cypher'), ('cython', 'Cython'), ('d', 'D'), ('d-objdump', 'd-objdump'), ('dart', 'Dart'), ('delphi', 'Delphi'), ('dg', 'dg'), ('diff', 'Diff'), ('django', 'Django/Jinja'), ('docker', 'Docker'), ('dpatch', 'Darcs Patch'), ('dtd', 'DTD'), ('duel', 'Duel'), ('dylan', 'Dylan'), ('dylan-console', 'Dylan session'), ('dylan-lid', 'DylanLID'), ('ebnf', 'EBNF'), ('ec', 'eC'), ('ecl', 'ECL'), ('eiffel', 'Eiffel'), ('elixir', 'Elixir'), ('erb', 'ERB'), ('erl', 'Erlang erl session'), ('erlang', 'Erlang'), ('evoque', 'Evoque'), ('factor', 'Factor'), ('fan', 'Fantom'), ('fancy', 'Fancy'), ('felix', 'Felix'), ('fortran', 'Fortran'), ('foxpro', 'FoxPro'), ('fsharp', 'FSharp'), ('gap', 'GAP'), ('gas', 'GAS'), ('genshi', 'Genshi'), ('genshitext', 'Genshi Text'), ('glsl', 'GLSL'), ('gnuplot', 'Gnuplot'), ('go', 'Go'), ('golo', 'Golo'), ('gooddata-cl', 'GoodData-CL'), ('gosu', 'Gosu'), ('groff', 'Groff'), ('groovy', 'Groovy'), ('gst', 'Gosu Template'), ('haml', 'Haml'), ('handlebars', 'Handlebars'), ('haskell', 'Haskell'), ('haxeml', 'Hxml'), ('html', 'HTML'), ('html+cheetah', 'HTML+Cheetah'), ('html+django', 'HTML+Django/Jinja'), ('html+evoque', 'HTML+Evoque'), ('html+genshi', 'HTML+Genshi'), ('html+handlebars', 'HTML+Handlebars'), ('html+lasso', 'HTML+Lasso'), ('html+mako', 'HTML+Mako'), ('html+myghty', 'HTML+Myghty'), ('html+php', 'HTML+PHP'), ('html+smarty', 'HTML+Smarty'), ('html+twig', 'HTML+Twig'), ('html+velocity', 'HTML+Velocity'), ('http', 'HTTP'), ('hx', 'Haxe'), ('hybris', 'Hybris'), ('hylang', 'Hy'), ('i6t', 'Inform 6 template'), ('idl', 'IDL'), ('idris', 'Idris'), ('iex', 'Elixir iex session'), ('igor', 'Igor'), ('inform6', 'Inform 6'), ('inform7', 'Inform 7'), ('ini', 'INI'), ('io', 'Io'), ('ioke', 'Ioke'), ('irc', 'IRC logs'), ('isabelle', 'Isabelle'), ('jade', 'Jade'), ('jags', 'JAGS'), ('jasmin', 'Jasmin'), ('java', 'Java'), ('javascript+mozpreproc', 'Javascript+mozpreproc'), ('jlcon', 'Julia console'), ('js', 'JavaScript'), ('js+cheetah', 'JavaScript+Cheetah'), ('js+django', 'JavaScript+Django/Jinja'), ('js+erb', 'JavaScript+Ruby'), ('js+genshitext', 'JavaScript+Genshi Text'), ('js+lasso', 'JavaScript+Lasso'), ('js+mako', 'JavaScript+Mako'), ('js+myghty', 'JavaScript+Myghty'), ('js+php', 'JavaScript+PHP'), ('js+smarty', 'JavaScript+Smarty'), ('json', 'JSON'), ('jsonld', 'JSON-LD'), ('jsp', 'Java Server Page'), ('julia', 'Julia'), ('kal', 'Kal'), ('kconfig', 'Kconfig'), ('koka', 'Koka'), ('kotlin', 'Kotlin'), ('lagda', 'Literate Agda'), ('lasso', 'Lasso'), ('lcry', 'Literate Cryptol'), ('lean', 'Lean'), ('lhs', 'Literate Haskell'), ('lidr', 'Literate Idris'), ('lighty', 'Lighttpd configuration file'), ('limbo', 'Limbo'), ('liquid', 'liquid'), ('live-script', 'LiveScript'), ('llvm', 'LLVM'), ('logos', 'Logos'), ('logtalk', 'Logtalk'), ('lsl', 'LSL'), ('lua', 'Lua'), ('make', 'Makefile'), ('mako', 'Mako'), ('maql', 'MAQL'), ('mask', 'Mask'), ('mason', 'Mason'), ('mathematica', 'Mathematica'), ('matlab', 'Matlab'), ('matlabsession', 'Matlab session'), ('minid', 'MiniD'), ('modelica', 'Modelica'), ('modula2', 'Modula-2'), ('monkey', 'Monkey'), ('moocode', 'MOOCode'), ('moon', 'MoonScript'), ('mozhashpreproc', 'mozhashpreproc'), ('mozpercentpreproc', 'mozpercentpreproc'), ('mql', 'MQL'), ('mscgen', 'Mscgen'), ('mupad', 'MuPAD'), ('mxml', 'MXML'), ('myghty', 'Myghty'), ('mysql', 'MySQL'), ('nasm', 'NASM'), ('nemerle', 'Nemerle'), ('nesc', 'nesC'), ('newlisp', 'NewLisp'), ('newspeak', 'Newspeak'), ('nginx', 'Nginx configuration file'), ('nimrod', 'Nimrod'), ('nit', 'Nit'), ('nixos', 'Nix'), ('nsis', 'NSIS'), ('numpy', 'NumPy'), ('objdump', 'objdump'), ('objdump-nasm', 'objdump-nasm'), ('objective-c', 'Objective-C'), ('objective-c++', 'Objective-C++'), ('objective-j', 'Objective-J'), ('ocaml', 'OCaml'), ('octave', 'Octave'), ('ooc', 'Ooc'), ('opa', 'Opa'), ('openedge', 'OpenEdge ABL'), ('pan', 'Pan'), ('pawn', 'Pawn'), ('perl', 'Perl'), ('perl6', 'Perl6'), ('php', 'PHP'), ('pig', 'Pig'), ('pike', 'Pike'), ('plpgsql', 'PL/pgSQL'), ('postgresql', 'PostgreSQL SQL dialect'), ('postscript', 'PostScript'), ('pot', 'Gettext Catalog'), ('pov', 'POVRay'), ('powershell', 'PowerShell'), ('prolog', 'Prolog'), ('properties', 'Properties'), ('protobuf', 'Protocol Buffer'), ('psql', 'PostgreSQL console (psql)'), ('puppet', 'Puppet'), ('py3tb', 'Python 3.0 Traceback'), ('pycon', 'Python console session'), ('pypylog', 'PyPy Log'), ('pytb', 'Python Traceback'), ('python', 'Python'), ('python3', 'Python 3'), ('qbasic', 'QBasic'), ('qml', 'QML'), ('racket', 'Racket'), ('ragel', 'Ragel'), ('ragel-c', 'Ragel in C Host'), ('ragel-cpp', 'Ragel in CPP Host'), ('ragel-d', 'Ragel in D Host'), ('ragel-em', 'Embedded Ragel'), ('ragel-java', 'Ragel in Java Host'), ('ragel-objc', 'Ragel in Objective C Host'), ('ragel-ruby', 'Ragel in Ruby Host'), ('raw', 'Raw token data'), ('rb', 'Ruby'), ('rbcon', 'Ruby irb session'), ('rconsole', 'RConsole'), ('rd', 'Rd'), ('rebol', 'REBOL'), ('red', 'Red'), ('redcode', 'Redcode'), ('registry', 'reg'), ('resource', 'ResourceBundle'), ('rexx', 'Rexx'), ('rhtml', 'RHTML'), ('robotframework', 'RobotFramework'), ('rql', 'RQL'), ('rsl', 'RSL'), ('rst', 'reStructuredText'), ('rust', 'Rust'), ('sass', 'Sass'), ('scala', 'Scala'), ('scaml', 'Scaml'), ('scheme', 'Scheme'), ('scilab', 'Scilab'), ('scss', 'SCSS'), ('shell-session', 'Shell Session'), ('slim', 'Slim'), ('smali', 'Smali'), ('smalltalk', 'Smalltalk'), ('smarty', 'Smarty'), ('sml', 'Standard ML'), ('snobol', 'Snobol'), ('sourceslist', 'Debian Sourcelist'), ('sp', 'SourcePawn'), ('sparql', 'SPARQL'), ('spec', 'RPMSpec'), ('splus', 'S'), ('sql', 'SQL'), ('sqlite3', 'sqlite3con'), ('squidconf', 'SquidConf'), ('ssp', 'Scalate Server Page'), ('stan', 'Stan'), ('swift', 'Swift'), ('swig', 'SWIG'), ('systemverilog', 'systemverilog'), ('tads3', 'TADS 3'), ('tcl', 'Tcl'), ('tcsh', 'Tcsh'), ('tea', 'Tea'), ('tex', 'TeX'), ('text', 'Text only'), ('todotxt', 'Todotxt'), ('trac-wiki', 'MoinMoin/Trac Wiki markup'), ('treetop', 'Treetop'), ('ts', 'TypeScript'), ('twig', 'Twig'), ('urbiscript', 'UrbiScript'), ('vala', 'Vala'), ('vb.net', 'VB.net'), ('vctreestatus', 'VCTreeStatus'), ('velocity', 'Velocity'), ('verilog', 'verilog'), ('vgl', 'VGL'), ('vhdl', 'vhdl'), ('vim', 'VimL'), ('xml', 'XML'), ('xml+cheetah', 'XML+Cheetah'), ('xml+django', 'XML+Django/Jinja'), ('xml+erb', 'XML+Ruby'), ('xml+evoque', 'XML+Evoque'), ('xml+lasso', 'XML+Lasso'), ('xml+mako', 'XML+Mako'), ('xml+myghty', 'XML+Myghty'), ('xml+php', 'XML+PHP'), ('xml+smarty', 'XML+Smarty'), ('xml+velocity', 'XML+Velocity'), ('xquery', 'XQuery'), ('xslt', 'XSLT'), ('xtend', 'Xtend'), ('xul+mozpreproc', 'XUL+mozpreproc'), ('yaml', 'YAML'), ('yaml+jinja', 'YAML+Jinja'), ('zephir', 'Zephir')], default='python', max_length=100)),
+ ('style', models.CharField(choices=[('autumn', 'autumn'), ('borland', 'borland'), ('bw', 'bw'), ('colorful', 'colorful'), ('default', 'default'), ('emacs', 'emacs'), ('friendly', 'friendly'), ('fruity', 'fruity'), ('igor', 'igor'), ('manni', 'manni'), ('monokai', 'monokai'), ('murphy', 'murphy'), ('native', 'native'), ('paraiso-dark', 'paraiso-dark'), ('paraiso-light', 'paraiso-light'), ('pastie', 'pastie'), ('perldoc', 'perldoc'), ('rrt', 'rrt'), ('tango', 'tango'), ('trac', 'trac'), ('vim', 'vim'), ('vs', 'vs'), ('xcode', 'xcode')], default='friendly', max_length=100)),
+ ('highlighted', models.TextField()),
+ ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='snippets', to=settings.AUTH_USER_MODEL)),
+ ],
+ options={
+ 'ordering': ('created',),
+ },
+ ),
+ ]
diff --git a/tests/auth_example/auth_example/app/__init__.py b/example_app/snippets/migrations/__init__.py
similarity index 100%
rename from tests/auth_example/auth_example/app/__init__.py
rename to example_app/snippets/migrations/__init__.py
diff --git a/example_app/snippets/models.py b/example_app/snippets/models.py
new file mode 100644
index 00000000..0270c827
--- /dev/null
+++ b/example_app/snippets/models.py
@@ -0,0 +1,46 @@
+from django.db import models
+from pygments.lexers import get_all_lexers
+from pygments.styles import get_all_styles
+from pygments.lexers import get_lexer_by_name
+from pygments.formatters.html import HtmlFormatter
+from pygments import highlight
+
+LEXERS = [item for item in get_all_lexers() if item[1]]
+LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS])
+STYLE_CHOICES = sorted((item, item) for item in get_all_styles())
+
+
+class Snippet(models.Model):
+ created = models.DateTimeField(auto_now_add=True)
+ title = models.CharField(max_length=100, blank=True, default='')
+ code = models.TextField()
+ linenos = models.BooleanField(default=False)
+ language = models.CharField(choices=LANGUAGE_CHOICES,
+ default='python',
+ max_length=100)
+ style = models.CharField(choices=STYLE_CHOICES,
+ default='friendly',
+ max_length=100)
+ owner = models.ForeignKey('auth.User', related_name='snippets')
+ highlighted = models.TextField()
+
+ class Meta:
+ ordering = ('created',)
+
+ def save(self, *args, **kwargs):
+ """
+ Use the `pygments` library to create a highlighted HTML
+ representation of the code snippet.
+ """
+ lexer = get_lexer_by_name(self.language)
+ linenos = self.linenos and 'table' or False
+ options = self.title and {'title': self.title} or {}
+ formatter = HtmlFormatter(style=self.style, linenos=linenos,
+ full=True, **options)
+ self.highlighted = highlight(self.code, lexer, formatter)
+ super(Snippet, self).save(*args, **kwargs)
+
+ # limit the number of instances retained
+ snippets = Snippet.objects.all()
+ if len(snippets) > 100:
+ snippets[0].delete()
diff --git a/example_app/snippets/permissions.py b/example_app/snippets/permissions.py
new file mode 100644
index 00000000..e01b54c3
--- /dev/null
+++ b/example_app/snippets/permissions.py
@@ -0,0 +1,15 @@
+from rest_framework import permissions
+
+
+class IsOwnerOrReadOnly(permissions.BasePermission):
+ """
+ Custom permission to only allow owners of an object to edit it.
+ """
+
+ def has_object_permission(self, request, view, obj):
+ # Read permissions are allowed to any request
+ if request.method in permissions.SAFE_METHODS:
+ return True
+
+ # Write permissions are only allowed to the owner of the snippet
+ return obj.owner == request.user
diff --git a/example_app/snippets/serializers.py b/example_app/snippets/serializers.py
new file mode 100644
index 00000000..1072da2d
--- /dev/null
+++ b/example_app/snippets/serializers.py
@@ -0,0 +1,20 @@
+from rest_framework import serializers
+from snippets.models import Snippet
+from django.contrib.auth.models import User
+
+
+class SnippetSerializer(serializers.HyperlinkedModelSerializer):
+ owner = serializers.ReadOnlyField(source='owner.username')
+ highlight = serializers.HyperlinkedIdentityField(view_name='snippet-highlight', format='html')
+
+ class Meta:
+ model = Snippet
+ fields = ('url', 'highlight', 'owner',
+ 'title', 'code', 'linenos', 'language', 'style')
+
+class UserSerializer(serializers.HyperlinkedModelSerializer):
+ snippets = serializers.HyperlinkedRelatedField(queryset=Snippet.objects.all(), view_name='snippet-detail', many=True)
+
+ class Meta:
+ model = User
+ fields = ('url', 'username', 'snippets')
diff --git a/example_app/snippets/views.py b/example_app/snippets/views.py
new file mode 100644
index 00000000..32d55182
--- /dev/null
+++ b/example_app/snippets/views.py
@@ -0,0 +1,46 @@
+from django.contrib.auth.models import User
+from rest_framework import permissions
+from rest_framework import renderers
+from rest_framework import viewsets
+from rest_framework.decorators import detail_route
+from rest_framework.response import Response
+from snippets.models import Snippet
+from snippets.permissions import IsOwnerOrReadOnly
+from snippets.serializers import SnippetSerializer, UserSerializer
+
+
+class SnippetViewSet(viewsets.ModelViewSet):
+ """
+ This endpoint presents code snippets.
+
+ The `highlight` field presents a hyperlink to the highlighted HTML
+ representation of the code snippet.
+
+ The **owner** of the code snippet may update or delete instances
+ of the code snippet.
+
+ Try it yourself by logging in as one of these four users: **amy**, **max**,
+ **jose** or **aziz**. The passwords are the same as the usernames.
+ """
+ queryset = Snippet.objects.all()
+ serializer_class = SnippetSerializer
+ permission_classes = (permissions.IsAuthenticatedOrReadOnly,
+ IsOwnerOrReadOnly,)
+
+ @detail_route(renderer_classes=(renderers.StaticHTMLRenderer,))
+ def highlight(self, request, *args, **kwargs):
+ snippet = self.get_object()
+ return Response(snippet.highlighted)
+
+ def perform_create(self, serializer):
+ serializer.save(owner=self.request.user)
+
+class UserViewSet(viewsets.ReadOnlyModelViewSet):
+ """
+ This endpoint presents the users in the system.
+
+ As you can see, the collection of snippet instances owned by a user are
+ serialized using a hyperlinked representation.
+ """
+ queryset = User.objects.all()
+ serializer_class = UserSerializer
diff --git a/tests/auth_example/auth_example/restapi/__init__.py b/example_app/tutorial/__init__.py
similarity index 100%
rename from tests/auth_example/auth_example/restapi/__init__.py
rename to example_app/tutorial/__init__.py
diff --git a/tests/cigar_example/cigar_example/settings.py b/example_app/tutorial/settings.py
similarity index 67%
rename from tests/cigar_example/cigar_example/settings.py
rename to example_app/tutorial/settings.py
index 08fdc8a0..ce23836d 100644
--- a/tests/cigar_example/cigar_example/settings.py
+++ b/example_app/tutorial/settings.py
@@ -1,39 +1,30 @@
-# Django settings for cigar_example project.
-from os.path import dirname, abspath, join
+# Django settings for tutorial project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
+ # ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
-DJANGO_ROOT = dirname(dirname(abspath(__file__)))
-
-
-def root(*x):
- return abspath(join(abspath(DJANGO_ROOT), *x))
-
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': root('db.sql'), # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
- 'PASSWORD': '', # Not used with sqlite3.
- 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ 'ENGINE': 'django.db.backends.sqlite3', # Or use an alternate database backend.
+ 'NAME': 'tmp.db', # Path to sqlite3 database file.
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
-# On Unix systems, a value of None will cause Django to use the same
-# timezone as the operating system.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = 'America/Montreal'
+# In a Windows environment this must be set to your system time zone.
+TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
@@ -50,7 +41,7 @@ def root(*x):
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
-USE_TZ = False
+USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
@@ -65,7 +56,7 @@ def root(*x):
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = join(dirname(__file__), "..", "static_root")
+STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
@@ -83,17 +74,17 @@ def root(*x):
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
- # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
+# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
-SECRET_KEY = ')(gpv*_6l+$vcscsox7=xwyfexxw^do!n8998a054wa450-tnl'
+SECRET_KEY = '98s9du5ruv!j%shx0udb#uz1g@v^xl65zm1l-_5%8cs6%c*qm$'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
- 'django.template.loaders.eggs.Loader',
+# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
@@ -106,25 +97,16 @@ def root(*x):
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
-ROOT_URLCONF = 'cigar_example.urls'
+ROOT_URLCONF = 'tutorial.urls'
# Python dotted path to the WSGI application used by Django's runserver.
-WSGI_APPLICATION = 'cigar_example.wsgi.application'
+WSGI_APPLICATION = 'tutorial.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
-TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-SOUTH_TESTS_MIGRATE = False
-NOSE_ARGS = [
- '--nocapture',
- '--nologcapture',
- '--with-coverage',
- '--cover-package=rest_framework_swagger',
- 'cigar_example',
-]
INSTALLED_APPS = (
'django.contrib.auth',
@@ -133,12 +115,13 @@ def root(*x):
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
- 'django_nose',
- 'cigar_example.app',
- 'cigar_example.restapi',
+ # Uncomment the next line to enable the admin:
+ # 'django.contrib.admin',
+ # Uncomment the next line to enable admin documentation:
+ # 'django.contrib.admindocs',
'rest_framework',
'rest_framework_swagger',
- 'django.contrib.admin',
+ 'snippets',
)
# A sample logging configuration. The only tangible logging
@@ -170,18 +153,20 @@ def root(*x):
}
}
+REST_FRAMEWORK = {
+ 'PAGE_SIZE': 10,
+}
+
SWAGGER_SETTINGS = {
- "exclude_url_names": [], # List URL names to ignore
- "exclude_namespaces": [], # List URL namespaces to ignore
- "api_version": '0.1.10', # Specify your API's version (optional)
- "token_type": 'Bearer',
- "enabled_methods": [ # Methods to enable in UI
- 'get',
- 'post',
- 'put',
- 'patch',
- 'delete'
- ],
- "is_authenticated": False
+ 'USE_SESSION_AUTH': True,
}
-APPEND_SLASH = False
+
+LOGIN_URL = 'rest_framework:login'
+LOGOUT_URL = 'rest_framework:logout'
+
+import os
+if os.environ.get('HEROKU'): # heroku config:set HEROKU=1
+ import dj_database_url
+ DATABASES['default'] = dj_database_url.config()
+
+LOGIN_REDIRECT_URL = '/'
diff --git a/example_app/tutorial/urls.py b/example_app/tutorial/urls.py
new file mode 100644
index 00000000..dc46ccac
--- /dev/null
+++ b/example_app/tutorial/urls.py
@@ -0,0 +1,25 @@
+from django.conf.urls import url, include
+from rest_framework import renderers, response, schemas
+from rest_framework.decorators import api_view, renderer_classes
+from rest_framework.routers import DefaultRouter
+from rest_framework_swagger.renderers import OpenAPIRenderer, SwaggerUIRenderer
+
+from snippets import views
+
+
+@api_view()
+@renderer_classes([SwaggerUIRenderer, OpenAPIRenderer, renderers.CoreJSONRenderer])
+def schema_view(request):
+ generator = schemas.SchemaGenerator(title='Pastebin API')
+ return response.Response(generator.get_schema(request=request))
+
+
+router = DefaultRouter()
+router.register(r'snippets', views.SnippetViewSet)
+router.register(r'users', views.UserViewSet)
+
+urlpatterns = [
+ url('^$', schema_view),
+ url(r'^', include(router.urls)),
+ url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
+]
diff --git a/tests/cigar_example/cigar_example/wsgi.py b/example_app/tutorial/wsgi.py
similarity index 90%
rename from tests/cigar_example/cigar_example/wsgi.py
rename to example_app/tutorial/wsgi.py
index 7034411f..d12d1717 100644
--- a/tests/cigar_example/cigar_example/wsgi.py
+++ b/example_app/tutorial/wsgi.py
@@ -1,5 +1,5 @@
"""
-WSGI config for cigar_example project.
+WSGI config for tutorial project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
@@ -14,13 +14,13 @@
"""
import os
-from django.core.wsgi import get_wsgi_application
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cigar_example.settings")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tutorial.settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
+from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 00000000..8231284e
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,6 @@
+site_name: Django REST Swagger
+repo_url: https://github.com/marcgibbons/django-rest-swagger
+repo_name: GitHub
+site_description: Swagger UI / OpenAPI Documentation for Django REST Framework
+site_author: Marc Gibbons
+copyright: 2013-2016 Marc Gibbons
diff --git a/requirements.txt b/requirements.txt
index 44b2e020..f7fa3838 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,14 +1,10 @@
-Django==1.7.1
-Markdown==2.1.1
-PyYAML==3.11
-argh==0.23.2
-argparse==1.2.1
-coverage==3.6
-django-nose==1.2
-djangorestframework>=2.3.8
-django-filter==0.11.0
-jsonschema==2.5
-nose==1.3.0
-mock==1.0.1
-ordereddict==1.1
-docutils>=0.11
\ No newline at end of file
+Django==1.9.7
+djangorestframework==3.4.0
+coreapi==1.32.0
+openapi-codec==1.0.0
+tox==2.3.1
+Pygments==2.0.2
+Markdown==2.6.3
+simplejson==3.8.2
+
+mkdocs==0.15.3
diff --git a/rest_framework_swagger/__init__.py b/rest_framework_swagger/__init__.py
index 42692b62..05224655 100644
--- a/rest_framework_swagger/__init__.py
+++ b/rest_framework_swagger/__init__.py
@@ -1,44 +1 @@
-VERSION = '0.3.8'
-
-DEFAULT_SWAGGER_SETTINGS = {
- 'exclude_url_names': [],
- 'exclude_namespaces': [],
- 'api_version': '',
- 'api_path': '/',
- 'api_key': '',
- 'relative_paths': False,
- 'token_type': 'Token',
- 'enabled_methods': ['get', 'post', 'put', 'patch', 'delete'],
- 'is_authenticated': False,
- 'is_superuser': False,
- 'unauthenticated_user': 'django.contrib.auth.models.AnonymousUser',
- 'permission_denied_handler': None,
- 'resource_access_handler': None,
- 'template_path': 'rest_framework_swagger/index.html',
- 'doc_expansion': 'none',
-}
-
-try:
- from django.conf import settings
- from django.test.signals import setting_changed
-
- def load_settings(provided_settings):
- global SWAGGER_SETTINGS
- SWAGGER_SETTINGS = provided_settings
-
- for key, value in DEFAULT_SWAGGER_SETTINGS.items():
- if key not in SWAGGER_SETTINGS:
- SWAGGER_SETTINGS[key] = value
-
- def reload_settings(*args, **kwargs):
- setting, value = kwargs['setting'], kwargs['value']
- if setting == 'SWAGGER_SETTINGS':
- load_settings(value)
-
- load_settings(getattr(settings,
- 'SWAGGER_SETTINGS',
- DEFAULT_SWAGGER_SETTINGS))
- setting_changed.connect(reload_settings)
-
-except:
- SWAGGER_SETTINGS = DEFAULT_SWAGGER_SETTINGS
+__version__ = '2.0.0a0'
diff --git a/rest_framework_swagger/apidocview.py b/rest_framework_swagger/apidocview.py
deleted file mode 100644
index af7bab67..00000000
--- a/rest_framework_swagger/apidocview.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from django.utils import six
-from rest_framework.permissions import AllowAny, IsAdminUser, IsAuthenticated
-from rest_framework.views import APIView
-
-from .compat import import_string
-from rest_framework_swagger import SWAGGER_SETTINGS
-
-
-class APIDocView(APIView):
- def initial(self, request, *args, **kwargs):
- self.permission_classes = (self.get_permission_class(request),)
- self.host = request.build_absolute_uri()
- self.api_path = SWAGGER_SETTINGS['api_path']
- self.api_full_uri = request.build_absolute_uri(self.api_path)
- return super(APIDocView, self).initial(request, *args, **kwargs)
-
- def get_permission_class(self, request):
- if SWAGGER_SETTINGS['is_superuser'] and not request.user.is_superuser:
- return IsAdminUser
- if SWAGGER_SETTINGS['is_authenticated'] and not request.user.is_authenticated():
- return IsAuthenticated
- return AllowAny
-
- def handle_resource_access(self, request, resource):
- resource_access_handler = SWAGGER_SETTINGS.get('resource_access_handler')
- if isinstance(resource_access_handler, six.string_types):
- resource_access_handler = import_string(resource_access_handler)
- if resource_access_handler:
- return resource_access_handler(request, resource)
- return True
diff --git a/rest_framework_swagger/compat.py b/rest_framework_swagger/compat.py
deleted file mode 100644
index 89a16d4d..00000000
--- a/rest_framework_swagger/compat.py
+++ /dev/null
@@ -1,86 +0,0 @@
-from distutils.version import StrictVersion
-import rest_framework
-import platform
-if platform.python_version_tuple() < ('2', '7'):
- import ordereddict
- OrderedDict = ordereddict.OrderedDict
-else:
- import collections
- OrderedDict = collections.OrderedDict
-
-if platform.python_version_tuple() < ('3', '0'):
- from HTMLParser import HTMLParser
-
- class MLStripper(HTMLParser):
- def __init__(self):
- self.reset()
- self.fed = []
-
- def handle_data(self, d):
- self.fed.append(d)
-
- def get_data(self):
- return ''.join(self.fed)
-else:
- from html.parser import HTMLParser
-
- class MLStripper(HTMLParser):
- def __init__(self):
- self.reset()
- self.strict = False
- self.convert_charrefs = True
- self.fed = []
-
- def handle_data(self, d):
- self.fed.append(d)
-
- def get_data(self):
- return ''.join(self.fed) + self.rawdata
-
-
-def strip_tags(html):
- s = MLStripper()
- s.feed(html)
- return s.get_data()
-
-try:
- from django.utils.module_loading import import_string
-except ImportError:
- def import_string(dotted_path):
- from django.utils.importlib import import_module
- from django.core.exceptions import ImproperlyConfigured
- module, attr = dotted_path.rsplit('.', 1)
- try:
- mod = import_module(module)
- except ImportError as e:
- raise ImproperlyConfigured('Error importing module %s: "%s"' %
- (module, e))
- try:
- view = getattr(mod, attr)
- except AttributeError:
- raise ImproperlyConfigured('Module "%s" does not define a "%s".'
- % (module, attr))
- return view
-
-
-def get_pagination_attribures(view):
- if StrictVersion(rest_framework.VERSION) >= StrictVersion('3.1.0'):
- if not (hasattr(view, 'pagination_class') and view.pagination_class):
- return None, None, None
-
- page_size = hasattr(view.pagination_class, 'page_size') and \
- view.pagination_class.page_size
- page_query_param = hasattr(view.pagination_class, 'page_query_param') and \
- view.pagination_class.page_query_param
- page_size_query_param = hasattr(view.pagination_class, 'page_size_query_param') and \
- view.pagination_class.page_size_query_param
- else:
- if not hasattr(view, 'paginate_by'):
- return None, None, None
-
- page_size = view.paginate_by
- page_query_param = view.page_kwarg
- page_size_query_param = hasattr(view, 'paginate_by_param') and \
- view.paginate_by_param
-
- return page_size, page_query_param, page_size_query_param
diff --git a/rest_framework_swagger/decorators.py b/rest_framework_swagger/decorators.py
deleted file mode 100644
index 045d2e3e..00000000
--- a/rest_framework_swagger/decorators.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import types
-from django.utils import six
-from collections import namedtuple
-
-
-def serializer_class(clazz):
- def _get_serializer_class(self):
- return clazz
-
- def decorator(func):
- if not hasattr(func, 'cls'):
- raise Exception("""@serializer_class should be above @api_view, like so:
-
- @serializer_class(MySerializer)
- @api_view
- def my_view(request):
- ...
-""")
- apiview = func.cls
- apiview.get_serializer_class = types.MethodType(
- _get_serializer_class,
- apiview)
- return func
- return decorator
-
-
-unwrappage = namedtuple('unwrappage', ['closure', 'code'])
-
-
-def closure_n_code(func):
- return unwrappage(
- six.get_function_closure(func),
- six.get_function_code(func))
-
-
-def get_closure_var(func, name=None):
- unwrap = closure_n_code(func)
- if name:
- index = unwrap.code.co_freevars.index(name)
- return unwrap.closure[index].cell_contents
- else:
- for closure_var in unwrap.closure:
- if isinstance(closure_var.cell_contents, types.FunctionType):
- return closure_var.cell_contents
- else:
- return None
-
-
-def wrapper_to_func(wrapper):
- noms = wrapper.http_method_names
- handlers = [getattr(wrapper, m) for m in noms if m != 'options']
- return get_closure_var(handlers[0], name="func")
-
-
-def func_to_wrapper(func):
- return func.cls
diff --git a/rest_framework_swagger/docgenerator.py b/rest_framework_swagger/docgenerator.py
deleted file mode 100644
index f83174b0..00000000
--- a/rest_framework_swagger/docgenerator.py
+++ /dev/null
@@ -1,413 +0,0 @@
-"""Generates API documentation by introspection."""
-import importlib
-import rest_framework
-from rest_framework import viewsets
-from rest_framework.serializers import BaseSerializer
-from rest_framework_swagger import SWAGGER_SETTINGS
-
-from .introspectors import (
- APIViewIntrospector,
- BaseMethodIntrospector,
- IntrospectorHelper,
- ViewSetIntrospector,
- WrappedAPIViewIntrospector,
- get_data_type,
- get_default_value,
- get_primitive_type
-)
-from .compat import OrderedDict
-
-
-class DocumentationGenerator(object):
- # Serializers defined in docstrings
- explicit_serializers = set()
-
- # Serializers defined in fields
- fields_serializers = set()
-
- # Response classes defined in docstrings
- explicit_response_types = dict()
-
- def __init__(self, for_user=None):
-
- # unauthenticated user is expected to be in the form 'module.submodule.Class' if a value is present
- unauthenticated_user = SWAGGER_SETTINGS.get('unauthenticated_user')
-
- # attempt to load unathenticated_user class from settings if a user is not supplied
- if not for_user and unauthenticated_user:
- module_name, class_name = unauthenticated_user.rsplit(".", 1)
- unauthenticated_user_class = getattr(importlib.import_module(module_name), class_name)
- for_user = unauthenticated_user_class()
-
- self.user = for_user
-
- def generate(self, apis):
- """
- Returns documentation for a list of APIs
- """
- api_docs = []
- for api in apis:
- api_docs.append({
- 'description': IntrospectorHelper.get_summary(api['callback']),
- 'path': api['path'],
- 'operations': self.get_operations(api, apis),
- })
-
- return api_docs
-
- def get_introspector(self, api, apis):
- path = api['path']
- pattern = api['pattern']
- callback = api['callback']
- if callback.__module__ == 'rest_framework.decorators':
- return WrappedAPIViewIntrospector(callback, path, pattern, self.user)
- elif issubclass(callback, viewsets.ViewSetMixin):
- patterns = [a['pattern'] for a in apis
- if a['callback'] == callback]
- return ViewSetIntrospector(callback, path, pattern, self.user, patterns=patterns)
- else:
- return APIViewIntrospector(callback, path, pattern, self.user)
-
- def get_operations(self, api, apis=None):
- """
- Returns docs for the allowed methods of an API endpoint
- """
- if apis is None:
- apis = [api]
- operations = []
-
- introspector = self.get_introspector(api, apis)
-
- for method_introspector in introspector:
- if not isinstance(method_introspector, BaseMethodIntrospector) or \
- method_introspector.get_http_method() == "OPTIONS":
- continue # No one cares. I impose JSON.
-
- doc_parser = method_introspector.get_yaml_parser()
-
- serializer = self._get_method_serializer(method_introspector)
-
- response_type = self._get_method_response_type(
- doc_parser, serializer, introspector, method_introspector)
-
- operation = {
- 'method': method_introspector.get_http_method(),
- 'summary': method_introspector.get_summary(),
- 'nickname': method_introspector.get_nickname(),
- 'notes': method_introspector.get_notes(),
- 'type': response_type,
- }
-
- if doc_parser.yaml_error is not None:
- operation['notes'] += "YAMLError:\n {err}
".format(
- err=doc_parser.yaml_error)
-
- response_messages = doc_parser.get_response_messages()
- parameters = doc_parser.discover_parameters(
- inspector=method_introspector)
-
- operation['parameters'] = parameters or []
-
- if response_messages:
- operation['responseMessages'] = response_messages
- # operation.consumes
- consumes = doc_parser.get_consumes()
- if consumes:
- operation['consumes'] = consumes
- # operation.produces
- produces = doc_parser.get_produces()
- if produces:
- operation['produces'] = produces
-
- # Check if this method has been reported as returning an
- # array response
- if method_introspector.is_array_response:
- operation['items'] = {
- '$ref': operation['type']
- }
- operation['type'] = 'array'
-
- operations.append(operation)
-
- return operations
-
- def get_models(self, apis):
- """
- Builds a list of Swagger 'models'. These represent
- DRF serializers and their fields
- """
- serializers = self._get_serializer_set(apis)
- serializers.update(self.explicit_serializers)
- serializers.update(
- self._find_field_serializers(serializers)
- )
-
- models = {}
-
- for serializer in serializers:
- data = self._get_serializer_fields(serializer)
-
- # Register 2 models with different subset of properties suitable
- # for data reading and writing.
- # i.e. rest framework does not output write_only fields in response
- # or require read_only fields in complex input.
-
- serializer_name = IntrospectorHelper.get_serializer_name(serializer)
- # Writing
- # no readonly fields
- w_name = "Write{serializer}".format(serializer=serializer_name)
-
- w_properties = OrderedDict((k, v) for k, v in data['fields'].items()
- if k not in data['read_only'])
-
- models[w_name] = {
- 'id': w_name,
- 'required': [i for i in data['required'] if i in w_properties.keys()],
- 'properties': w_properties,
- }
-
- # Reading
- # no write_only fields
- r_name = serializer_name
-
- r_properties = OrderedDict((k, v) for k, v in data['fields'].items()
- if k not in data['write_only'])
-
- models[r_name] = {
- 'id': r_name,
- 'required': [i for i in r_properties.keys()],
- 'properties': r_properties,
- }
-
- # Enable original model for testing purposes
- # models[serializer_name] = {
- # 'id': serializer_name,
- # 'required': data['required'],
- # 'properties': data['fields'],
- # }
-
- models.update(self.explicit_response_types)
- models.update(self.fields_serializers)
- return models
-
- def _get_method_serializer(self, method_inspector):
- """
- Returns serializer used in method.
- Registers custom serializer from docstring in scope.
-
- Serializer might be ignored if explicitly told in docstring
- """
- doc_parser = method_inspector.get_yaml_parser()
-
- if doc_parser.get_response_type() is not None:
- # Custom response class detected
- return None
-
- if doc_parser.should_omit_serializer():
- return None
-
- serializer = method_inspector.get_response_serializer_class()
- return serializer
-
- def _get_method_response_type(self, doc_parser, serializer,
- view_inspector, method_inspector):
- """
- Returns response type for method.
- This might be custom `type` from docstring or discovered
- serializer class name.
-
- Once custom `type` found in docstring - it'd be
- registered in a scope
- """
- response_type = doc_parser.get_response_type()
- if response_type is not None:
- # Register class in scope
- view_name = view_inspector.callback.__name__
- view_name = view_name.replace('ViewSet', '')
- view_name = view_name.replace('APIView', '')
- view_name = view_name.replace('View', '')
- response_type_name = "{view}{method}Response".format(
- view=view_name,
- method=method_inspector.method.title().replace('_', '')
- )
- self.explicit_response_types.update({
- response_type_name: {
- "id": response_type_name,
- "properties": response_type
- }
- })
- return response_type_name
- else:
- serializer_name = IntrospectorHelper.get_serializer_name(serializer)
- if serializer_name is not None:
- return serializer_name
-
- return 'object'
-
- def _get_serializer_set(self, apis):
- """
- Returns a set of serializer classes for a provided list
- of APIs
- """
- serializers = set()
-
- for api in apis:
- introspector = self.get_introspector(api, apis)
- for method_introspector in introspector:
- serializer = self._get_method_serializer(method_introspector)
- if serializer is not None:
- serializers.add(serializer)
- extras = method_introspector.get_extra_serializer_classes()
- for extra in extras:
- if extra is not None:
- serializers.add(extra)
-
- return serializers
-
- def _find_field_serializers(self, serializers, found_serializers=set()):
- """
- Returns set of serializers discovered from fields
- """
- def get_thing(field, key):
- if rest_framework.VERSION >= '3.0.0':
- from rest_framework.serializers import ListSerializer
- if isinstance(field, ListSerializer) and isinstance(field.child, BaseSerializer):
- return key(field.child)
- return key(field)
-
- serializers_set = set()
- for serializer in serializers:
- if not hasattr(serializer, 'get_fields'):
- continue
- fields = serializer().get_fields()
- for name, field in fields.items():
- if isinstance(field, BaseSerializer):
- serializers_set.add(get_thing(field, lambda f: f))
- if field not in found_serializers:
- serializers_set.update(
- self._find_field_serializers(
- (get_thing(field, lambda f: f.__class__),),
- serializers_set))
-
- return serializers_set
-
- def _get_serializer_fields(self, serializer):
- """
- Returns serializer fields in the Swagger MODEL format
- """
- if serializer is None:
- return
-
- if not hasattr(serializer, 'get_fields'):
- fields = {}
- elif callable(serializer):
- fields = serializer().get_fields()
- else:
- fields = serializer.get_fields()
-
- data = OrderedDict({
- 'fields': OrderedDict(),
- 'required': [],
- 'write_only': [],
- 'read_only': [],
- })
- for name, field in fields.items():
- if getattr(field, 'write_only', False):
- data['write_only'].append(name)
-
- if getattr(field, 'read_only', False):
- data['read_only'].append(name)
-
- if getattr(field, 'required', False):
- data['required'].append(name)
-
- data_type, data_format = get_data_type(field) or ('string', 'string')
- if data_type == 'hidden':
- continue
-
- # guess format
- # data_format = 'string'
- # if data_type in BaseMethodIntrospector.PRIMITIVES:
- # data_format = BaseMethodIntrospector.PRIMITIVES.get(data_type)[0]
-
- choices = []
- if data_type in BaseMethodIntrospector.ENUMS:
- if isinstance(field.choices, list):
- choices = [k for k, v in field.choices]
- elif isinstance(field.choices, dict):
- choices = [k for k, v in field.choices.items()]
-
- if choices:
- # guest data type and format
- data_type, data_format = get_primitive_type(choices[0]) or ('string', 'string')
-
- description = getattr(field, 'help_text', '')
- if not description or description.strip() == '':
- description = None
- f = {
- 'description': description,
- 'type': data_type,
- 'format': data_format,
- 'required': getattr(field, 'required', False),
- 'defaultValue': get_default_value(field),
- 'readOnly': getattr(field, 'read_only', None),
- }
-
- # Swagger type is a primitive, format is more specific
- if f['type'] == f['format']:
- del f['format']
-
- # defaultValue of null is not allowed, it is specific to type
- if f['defaultValue'] is None:
- del f['defaultValue']
-
- # Min/Max values
- max_value = getattr(field, 'max_value', None)
- min_value = getattr(field, 'min_value', None)
- if max_value is not None and data_type == 'integer':
- f['minimum'] = min_value
-
- if max_value is not None and data_type == 'integer':
- f['maximum'] = max_value
-
- # ENUM options
- if choices:
- f['enum'] = choices
-
- # Support for complex types
- if rest_framework.VERSION < '3.0.0':
- has_many = hasattr(field, 'many') and field.many
- else:
- from rest_framework.serializers import ListSerializer, ManyRelatedField
- has_many = isinstance(field, (ListSerializer, ManyRelatedField))
-
- if isinstance(field, BaseSerializer) or has_many:
- if isinstance(field, BaseSerializer):
- if (rest_framework.VERSION >= '3.0.0' and
- isinstance(field, ListSerializer) and
- not isinstance(field.child, BaseSerializer)):
-
- data_type, data_format = get_data_type(field.child)
- field_serializer = None
- else:
- field_serializer = IntrospectorHelper.get_serializer_name(field)
-
- if getattr(field, 'write_only', False):
- field_serializer = "Write{}".format(field_serializer)
-
- f['type'] = field_serializer
- else:
- field_serializer = None
- data_type = 'string'
-
- if has_many:
- f['type'] = 'array'
- if field_serializer:
- f['items'] = {'$ref': field_serializer}
- elif data_type in BaseMethodIntrospector.PRIMITIVES:
- f['items'] = {'type': data_type}
-
- # memorize discovered field
- data['fields'][name] = f
-
- return data
diff --git a/rest_framework_swagger/introspectors.py b/rest_framework_swagger/introspectors.py
deleted file mode 100644
index fb84598a..00000000
--- a/rest_framework_swagger/introspectors.py
+++ /dev/null
@@ -1,1282 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""Handles the instrospection of REST Framework Views and ViewSets."""
-
-import inspect
-import itertools
-import re
-import yaml
-import importlib
-
-from .compat import OrderedDict, strip_tags, get_pagination_attribures
-from abc import ABCMeta, abstractmethod
-
-from django.http import HttpRequest
-from django.contrib.admindocs.utils import trim_docstring
-from django.utils.encoding import smart_text
-
-import rest_framework
-from rest_framework import viewsets
-from rest_framework.compat import apply_markdown
-try:
- from rest_framework.fields import CurrentUserDefault
-except ImportError:
- # FIXME once we drop support of DRF 2.x .
- CurrentUserDefault = None
-from rest_framework.utils import formatting
-from django.utils import six
-try:
- import django_filters
-except ImportError:
- django_filters = None
-
-
-def get_view_description(view_cls, html=False, docstring=None):
- if docstring is not None:
- view_cls = type(
- view_cls.__name__ + '_fake',
- (view_cls,),
- {'__doc__': docstring})
- return rest_framework.settings.api_settings \
- .VIEW_DESCRIPTION_FUNCTION(view_cls, html)
-
-
-def get_default_value(field):
- default_value = getattr(field, 'default', None)
- if rest_framework.VERSION >= '3.0.0':
- from rest_framework.fields import empty
- if default_value == empty:
- default_value = None
- if callable(default_value):
- if CurrentUserDefault is not None and isinstance(default_value,
- CurrentUserDefault):
- default_value.user = None
- default_value = default_value()
- return default_value
-
-
-class IntrospectorHelper(object):
- __metaclass__ = ABCMeta
-
- @staticmethod
- def strip_yaml_from_docstring(docstring):
- """
- Strips YAML from the docstring.
- """
- split_lines = trim_docstring(docstring).split('\n')
-
- cut_off = None
- for index in range(len(split_lines) - 1, -1, -1):
- line = split_lines[index]
- line = line.strip()
- if line == '---':
- cut_off = index
- break
- if cut_off is not None:
- split_lines = split_lines[0:cut_off]
-
- return "\n".join(split_lines)
-
- @staticmethod
- def strip_params_from_docstring(docstring):
- """
- Strips the params from the docstring (ie. myparam -- Some param) will
- not be removed from the text body
- """
- params_pattern = re.compile(r' -- ')
- split_lines = trim_docstring(docstring).split('\n')
-
- cut_off = None
- for index, line in enumerate(split_lines):
- line = line.strip()
- if params_pattern.search(line):
- cut_off = index
- break
- if cut_off is not None:
- split_lines = split_lines[0:cut_off]
-
- return "\n".join(split_lines)
-
- @staticmethod
- def get_serializer_name(serializer):
- if serializer is None:
- return None
- if rest_framework.VERSION >= '3.0.0':
- from rest_framework.serializers import ListSerializer
- assert serializer != ListSerializer, "uh oh, what now?"
- if isinstance(serializer, ListSerializer):
- serializer = serializer.child
-
- if inspect.isclass(serializer):
- return serializer.__name__
-
- return serializer.__class__.__name__
-
- @staticmethod
- def get_summary(callback, docstring=None):
- """
- Returns the first sentence of the first line of the class docstring
- """
- description = get_view_description(
- callback, html=False, docstring=docstring) \
- .split("\n")[0].split(".")[0]
- description = IntrospectorHelper.strip_yaml_from_docstring(
- description)
- description = IntrospectorHelper.strip_params_from_docstring(
- description)
- description = strip_tags(get_view_description(
- callback, html=True, docstring=description))
- return description
-
-
-class BaseViewIntrospector(object):
- __metaclass__ = ABCMeta
-
- def __init__(self, callback, path, pattern, user):
- self.callback = callback
- self.path = path
- self.pattern = pattern
- self.user = user
-
- def get_yaml_parser(self):
- parser = YAMLDocstringParser(self)
- return parser
-
- @abstractmethod
- def __iter__(self):
- pass
-
- def get_iterator(self):
- return self.__iter__()
-
- def get_description(self):
- """
- Returns the first sentence of the first line of the class docstring
- """
- return IntrospectorHelper.get_summary(self.callback)
-
- def get_docs(self):
- return get_view_description(self.callback)
-
-
-class BaseMethodIntrospector(object):
- __metaclass__ = ABCMeta
-
- ENUMS = [
- 'choice',
- 'multiple choice',
- ]
-
- PRIMITIVES = {
- 'integer': ['int32', 'int64'],
- 'number': ['float', 'double'],
- 'string': ['string', 'byte', 'date', 'date-time'],
- 'boolean': ['boolean'],
- }
-
- def __init__(self, view_introspector, method):
- self.method = method
- self.parent = view_introspector
- self.callback = view_introspector.callback
- self.path = view_introspector.path
- self.user = view_introspector.user
-
- @property
- def is_array_response(self):
- """ Support definition of array responses with the 'many' attr """
- return self.get_yaml_parser().object.get('many')
-
- def get_module(self):
- return self.callback.__module__
-
- def check_yaml_methods(self, yaml_methods):
- missing_set = set()
- for key in yaml_methods:
- if key not in self.parent.methods():
- missing_set.add(key)
- if missing_set:
- raise Exception(
- "methods %s in class docstring are not in view methods %s"
- % (list(missing_set), list(self.parent.methods())))
-
- def get_yaml_parser(self):
- parser = YAMLDocstringParser(self)
- parent_parser = YAMLDocstringParser(self.parent)
- self.check_yaml_methods(parent_parser.object.keys())
- new_object = {}
- new_object.update(parent_parser.object.get(self.method, {}))
- new_object.update(parser.object)
- parser.object = new_object
- return parser
-
- def get_extra_serializer_classes(self):
- return self.get_yaml_parser().get_extra_serializer_classes(
- self.callback)
-
- def ask_for_serializer_class(self):
- if hasattr(self.callback, 'get_serializer_class'):
- view = self.create_view()
- parser = self.get_yaml_parser()
- mock_view = parser.get_view_mocker(self.callback)
- view = mock_view(view)
- if view is not None:
- if parser.should_omit_serializer():
- return None
- try:
- serializer_class = view.get_serializer_class()
- except AssertionError as e:
- if "should either include a `serializer_class` attribute, or override the `get_serializer_class()` method." in str(e): # noqa
- serializer_class = None
- else:
- raise
- return serializer_class
-
- def create_view(self):
- view = self.callback()
- if not hasattr(view, 'kwargs'):
- view.kwargs = dict()
- if hasattr(self.parent.pattern, 'default_args'):
- view.kwargs.update(self.parent.pattern.default_args)
- view.request = HttpRequest()
- view.request.user = self.user
- view.request.method = self.method
- return view
-
- def get_serializer_class(self):
- parser = self.get_yaml_parser()
- serializer = parser.get_serializer_class(self.callback)
- if serializer is None:
- serializer = self.ask_for_serializer_class()
- return serializer
-
- def get_response_serializer_class(self):
- parser = self.get_yaml_parser()
- serializer = parser.get_response_serializer_class(self.callback)
- if serializer is None:
- serializer = self.get_serializer_class()
- return serializer
-
- def get_request_serializer_class(self):
- parser = self.get_yaml_parser()
- serializer = parser.get_request_serializer_class(self.callback)
- if serializer is None:
- serializer = self.get_serializer_class()
- return serializer
-
- def get_summary(self):
- # If there is no docstring on the method, get class docs
- return IntrospectorHelper.get_summary(
- self.callback,
- self.get_docs() or self.parent.get_description())
-
- def get_nickname(self):
- """ Returns the APIView's nickname """
- return rest_framework.settings.api_settings \
- .VIEW_NAME_FUNCTION(self.callback, self.method).replace(' ', '_')
-
- def get_notes(self):
- """
- Returns the body of the docstring trimmed before any parameters are
- listed. First, get the class docstring and then get the method's. The
- methods will always inherit the class comments.
- """
- docstring = ""
-
- class_docs = get_view_description(self.callback)
- class_docs = IntrospectorHelper.strip_yaml_from_docstring(class_docs)
- class_docs = IntrospectorHelper.strip_params_from_docstring(class_docs)
- method_docs = self.get_docs()
-
- if class_docs is not None:
- docstring += class_docs + " \n"
- if method_docs is not None:
- method_docs = formatting.dedent(smart_text(method_docs))
- method_docs = IntrospectorHelper.strip_yaml_from_docstring(
- method_docs
- )
- method_docs = IntrospectorHelper.strip_params_from_docstring(
- method_docs
- )
- docstring += '\n' + method_docs
- docstring = docstring.strip()
-
- return do_markdown(docstring)
-
- def get_parameters(self):
- """
- Returns parameters for an API. Parameters are a combination of HTTP
- query parameters as well as HTTP body parameters that are defined by
- the DRF serializer fields
- """
- params = []
- path_params = self.build_path_parameters()
- body_params = self.build_body_parameters()
- form_params = self.build_form_parameters()
- query_params = self.build_query_parameters()
- if django_filters is not None:
- query_params.extend(
- self.build_query_parameters_from_django_filters())
-
- if path_params:
- params += path_params
-
- if self.get_http_method() not in ["GET", "DELETE", "HEAD"]:
- params += form_params
-
- if not form_params and body_params is not None:
- params.append(body_params)
-
- if query_params:
- params += query_params
-
- return params
-
- def get_http_method(self):
- return self.method
-
- @abstractmethod
- def get_docs(self):
- return ''
-
- def retrieve_docstring(self):
- """
- Attempts to fetch the docs for a class method. Returns None
- if the method does not exist
- """
- method = str(self.method).lower()
- if not hasattr(self.callback, method):
- return None
-
- return get_view_description(getattr(self.callback, method))
-
- def build_body_parameters(self):
- serializer = self.get_request_serializer_class()
- serializer_name = IntrospectorHelper.get_serializer_name(serializer)
-
- if serializer_name is None:
- return
-
- return {
- 'name': serializer_name,
- 'type': serializer_name,
- 'paramType': 'body',
- }
-
- def build_path_parameters(self):
- """
- Gets the parameters from the URL
- """
- url_params = re.findall('/{([^}]*)}', self.path)
- params = []
-
- for param in url_params:
- params.append({
- 'name': param,
- 'type': 'string',
- 'paramType': 'path',
- 'required': True
- })
-
- return params
-
- def build_query_parameters(self):
- params = []
-
- docstring = self.retrieve_docstring() or ''
- docstring += "\n" + get_view_description(self.callback)
-
- if docstring is None:
- return params
-
- split_lines = docstring.split('\n')
-
- for line in split_lines:
- param = line.split(' -- ')
- if len(param) == 2:
- params.append({'paramType': 'query',
- 'name': param[0].strip(),
- 'description': param[1].strip(),
- 'type': 'string'})
-
- return params
-
- def build_query_parameters_from_django_filters(self):
- """
- introspect ``django_filters.FilterSet`` instances.
- """
- params = []
- filter_class = getattr(self.callback, 'filter_class', None)
- if (filter_class is not None and
- issubclass(filter_class, django_filters.FilterSet)):
- for name, filter_ in filter_class.base_filters.items():
- data_type = 'string'
- parameter = {
- 'paramType': 'query',
- 'name': name,
- 'description': filter_.label,
- }
- normalize_data_format(data_type, None, parameter)
- multiple_choices = filter_.extra.get('choices', {})
- if multiple_choices:
- parameter['enum'] = [choice[0] for choice
- in itertools.chain(multiple_choices)]
- parameter['type'] = 'enum'
- params.append(parameter)
-
- return params
-
- def build_form_parameters(self):
- """
- Builds form parameters from the serializer class
- """
- data = []
- serializer_class = self.get_request_serializer_class()
-
- if serializer_class is None:
- return data
-
- serializer = serializer_class()
- fields = serializer.get_fields()
- read_only_fields = getattr(getattr(serializer, 'Meta', None), 'read_only_fields', [])
-
- for name, field in fields.items():
-
- if getattr(field, 'read_only', False) or name in read_only_fields:
- continue
-
- data_type, data_format = get_data_type(field) or ('string', 'string')
- if data_type == 'hidden':
- continue
-
- # guess format
- # data_format = 'string'
- # if data_type in self.PRIMITIVES:
- # data_format = self.PRIMITIVES.get(data_type)[0]
-
- choices = []
- if data_type in BaseMethodIntrospector.ENUMS:
- if isinstance(field.choices, list):
- choices = [k for k, v in field.choices]
- elif isinstance(field.choices, dict):
- choices = [k for k, v in field.choices.items()]
-
- if choices:
- # guest data type and format
- data_type, data_format = get_primitive_type(choices[0]) or ('string', 'string')
-
- f = {
- 'paramType': 'form',
- 'name': name,
- 'description': getattr(field, 'help_text', '') or '',
- 'type': data_type,
- 'format': data_format,
- 'required': getattr(field, 'required', False),
- 'defaultValue': get_default_value(field),
- }
-
- # Swagger type is a primitive, format is more specific
- if f['type'] == f['format']:
- del f['format']
-
- # defaultValue of null is not allowed, it is specific to type
- if f['defaultValue'] is None:
- del f['defaultValue']
-
- # Min/Max values
- max_value = getattr(field, 'max_value', None)
- min_value = getattr(field, 'min_value', None)
- if max_value is not None and data_type == 'integer':
- f['minimum'] = min_value
-
- if max_value is not None and data_type == 'integer':
- f['maximum'] = max_value
-
- # ENUM options
- if choices:
- f['enum'] = choices
-
- data.append(f)
-
- return data
-
-
-def get_primitive_type(var):
- if isinstance(var, bool):
- return 'boolean', 'boolean'
- elif isinstance(var, int):
- return 'integer', 'int32'
- elif isinstance(var, float):
- return 'number', 'float'
- elif isinstance(var, six.string_types):
- return 'string', 'string'
- else:
- return 'string', 'string' # 'default'
-
-
-def get_data_type(field):
- # (in swagger 2.0 we might get to use the descriptive types..
- from rest_framework import fields
- if isinstance(field, fields.BooleanField):
- return 'boolean', 'boolean'
- elif hasattr(fields, 'NullBooleanField') and isinstance(field, fields.NullBooleanField):
- return 'boolean', 'boolean'
- # elif isinstance(field, fields.URLField):
- # return 'string', 'string' # 'url'
- # elif isinstance(field, fields.SlugField):
- # return 'string', 'string', # 'slug'
- elif isinstance(field, fields.ChoiceField):
- return 'choice', 'choice'
- # elif isinstance(field, fields.EmailField):
- # return 'string', 'string' # 'email'
- # elif isinstance(field, fields.RegexField):
- # return 'string', 'string' # 'regex'
- elif isinstance(field, fields.DateField):
- return 'string', 'date'
- elif isinstance(field, fields.DateTimeField):
- return 'string', 'date-time' # 'datetime'
- # elif isinstance(field, fields.TimeField):
- # return 'string', 'string' # 'time'
- elif isinstance(field, fields.IntegerField):
- return 'integer', 'int64' # 'integer'
- elif isinstance(field, fields.FloatField):
- return 'number', 'float' # 'float'
- # elif isinstance(field, fields.DecimalField):
- # return 'string', 'string' #'decimal'
- # elif isinstance(field, fields.ImageField):
- # return 'string', 'string' # 'image upload'
- # elif isinstance(field, fields.FileField):
- # return 'string', 'string' # 'file upload'
- # elif isinstance(field, fields.CharField):
- # return 'string', 'string'
- elif rest_framework.VERSION >= '3.0.0':
- if isinstance(field, fields.HiddenField):
- return 'hidden', 'hidden'
- elif isinstance(field, fields.ListField):
- return 'array', 'array'
- else:
- return 'string', 'string'
- else:
- return 'string', 'string'
-
-
-class APIViewIntrospector(BaseViewIntrospector):
- def __iter__(self):
- for method in self.methods():
- yield APIViewMethodIntrospector(self, method)
-
- def methods(self):
- return self.callback().allowed_methods
-
-
-class WrappedAPIViewIntrospector(BaseViewIntrospector):
- def __iter__(self):
- for method in self.methods():
- yield WrappedAPIViewMethodIntrospector(self, method)
-
- def methods(self):
- return self.callback().allowed_methods
-
- def get_notes(self):
- class_docs = get_view_description(self.callback)
- class_docs = IntrospectorHelper.strip_yaml_from_docstring(
- class_docs)
- class_docs = IntrospectorHelper.strip_params_from_docstring(
- class_docs)
- return get_view_description(
- self.callback, html=True, docstring=class_docs)
-
-
-def do_markdown(docstring):
- # Markdown is optional
- if apply_markdown:
- return apply_markdown(docstring)
- else:
- return docstring.replace("\n\n", "
")
-
-
-class APIViewMethodIntrospector(BaseMethodIntrospector):
- def get_docs(self):
- """
- Attempts to retrieve method specific docs for an
- endpoint. If none are available, the class docstring
- will be used
- """
- return self.retrieve_docstring()
-
-
-class WrappedAPIViewMethodIntrospector(BaseMethodIntrospector):
- def get_docs(self):
- """
- Attempts to retrieve method specific docs for an
- endpoint. If none are available, the class docstring
- will be used
- """
- return get_view_description(self.callback)
-
- def get_module(self):
- from rest_framework_swagger.decorators import wrapper_to_func
- func = wrapper_to_func(self.callback)
- return func.__module__
-
- def get_notes(self):
- return self.parent.get_notes()
-
- def get_yaml_parser(self):
- parser = YAMLDocstringParser(self)
- return parser
-
-
-class ViewSetIntrospector(BaseViewIntrospector):
- """Handle ViewSet introspection."""
-
- def __init__(self, callback, path, pattern, user, patterns=None):
- super(ViewSetIntrospector, self).__init__(callback, path, pattern, user)
- if not issubclass(callback, viewsets.ViewSetMixin):
- raise Exception("wrong callback passed to ViewSetIntrospector")
- self.patterns = patterns or [pattern]
-
- def __iter__(self):
- methods = self._resolve_methods()
- for method in methods:
- yield ViewSetMethodIntrospector(self, methods[method], method)
-
- def methods(self):
- stuff = []
- for pattern in self.patterns:
- if pattern.callback:
- stuff.extend(self._resolve_methods(pattern).values())
- return stuff
-
- def _resolve_methods(self, pattern=None):
- from .decorators import closure_n_code, get_closure_var
- if pattern is None:
- pattern = self.pattern
- callback = pattern.callback
-
- try:
- x = closure_n_code(callback)
-
- while getattr(x.code, 'co_name') != 'view':
- # lets unwrap!
- callback = get_closure_var(callback)
- x = closure_n_code(callback)
-
- freevars = x.code.co_freevars
- except (AttributeError, IndexError):
- raise RuntimeError(
- 'Unable to use callback invalid closure/function ' +
- 'specified.')
- else:
- return x.closure[freevars.index('actions')].cell_contents
-
-
-class ViewSetMethodIntrospector(BaseMethodIntrospector):
- def __init__(self, view_introspector, method, http_method):
- super(ViewSetMethodIntrospector, self) \
- .__init__(view_introspector, method)
- self.http_method = http_method.upper()
-
- @property
- def is_array_response(self):
- """ ViewSet.list methods always return array responses """
- return (self.method == 'list' or
- super(ViewSetMethodIntrospector, self).is_array_response)
-
- def get_http_method(self):
- return self.http_method
-
- def get_docs(self):
- """
- Attempts to retrieve method specific docs for an
- endpoint. If none are available, the class docstring
- will be used
- """
- return self.retrieve_docstring()
-
- def create_view(self):
- view = super(ViewSetMethodIntrospector, self).create_view()
- if not hasattr(view, 'action'):
- setattr(view, 'action', self.method)
- view.request.method = self.http_method
- return view
-
- def build_query_parameters(self):
- parameters = super(ViewSetMethodIntrospector, self) \
- .build_query_parameters()
- view = self.create_view()
- page_size, page_query_param, page_size_query_param = get_pagination_attribures(view)
- if self.method == 'list' and page_size:
- data_type = 'integer'
- if page_query_param:
- parameters.append({
- 'paramType': 'query',
- 'name': page_query_param,
- 'description': None,
- })
- normalize_data_format(data_type, None, parameters[-1])
- if page_size_query_param:
- parameters.append({
- 'paramType': 'query',
- 'name': page_size_query_param,
- 'description': None,
- })
- normalize_data_format(data_type, None, parameters[-1])
- return parameters
-
-
-def multi_getattr(obj, attr, default=None):
- """
- Get a named attribute from an object; multi_getattr(x, 'a.b.c.d') is
- equivalent to x.a.b.c.d. When a default argument is given, it is
- returned when any attribute in the chain doesn't exist; without
- it, an exception is raised when a missing attribute is encountered.
-
- """
- attributes = attr.split(".")
- for i in attributes:
- try:
- obj = getattr(obj, i)
- except AttributeError:
- if default:
- return default
- else:
- raise
- return obj
-
-
-def normalize_data_format(data_type, data_format, obj):
- """
- sets 'type' on obj
- sets a valid 'format' on obj if appropriate
- uses data_format only if valid
- """
- if data_type == 'array':
- data_format = None
-
- flatten_primitives = [
- val for sublist in BaseMethodIntrospector.PRIMITIVES.values()
- for val in sublist
- ]
-
- if data_format not in flatten_primitives:
- formats = BaseMethodIntrospector.PRIMITIVES.get(data_type, None)
- if formats:
- data_format = formats[0]
- else:
- data_format = None
- if data_format == data_type:
- data_format = None
-
- obj['type'] = data_type
- if data_format is None and 'format' in obj:
- del obj['format']
- elif data_format is not None:
- obj['format'] = data_format
-
-
-class YAMLDocstringParser(object):
- """
- Docstring parser powered by YAML syntax
-
- This parser allows you override some parts of automatic method inspection
- behaviours which are not always correct.
-
- See the following documents for more information about YAML and Swagger:
- - https://github.com/wordnik/swagger-core/wiki
- - http://www.yaml.org/spec/1.2/spec.html
- - https://github.com/wordnik/swagger-codegen/wiki/Creating-Swagger-JSON-from-YAML-files
-
- 1. Control over parameters
- ============================================================================
- Define parameters and its properties in docstrings:
-
- parameters:
- - name: some_param
- description: Foobar long description goes here
- required: true
- type: integer
- paramType: form
- minimum: 10
- maximum: 100
- - name: other_foo
- paramType: query
- - name: avatar
- type: file
-
- It is possible to override parameters discovered by method inspector by
- defining:
- `parameters_strategy` option to either `merge` or `replace`
-
- To define different strategies for different `paramType`'s use the
- following syntax:
- parameters_strategy:
- form: replace
- query: merge
-
- By default strategy is set to `merge`
-
-
- Sometimes method inspector produces wrong list of parameters that
- you might not won't to see in SWAGGER form. To handle this situation
- define `paramTypes` that should be omitted
- omit_parameters:
- - form
-
- 2. Control over serializers
- ============================================================================
- Once in a while you are using different serializers inside methods
- but automatic method inspector cannot detect this. For that purpose there
- is two explicit parameters that allows you to discard serializer detected
- by method inspector OR replace it with another one
-
- serializer: some.package.FooSerializer
- omit_serializer: true
-
- 3. Custom Response Class
- ============================================================================
- If your view is not using serializer at all but instead outputs simple
- data type such as JSON you may define custom response object in method
- signature like follows:
-
- type:
- name:
- required: true
- type: string
- url:
- required: false
- type: url
-
- 4. Response Messages (Error Codes)
- ============================================================================
- If you'd like to share common response errors that your APIView might throw
- you can define them in docstring using following format:
-
- responseMessages:
- - code: 401
- message: Not authenticated
- - code: 403
- message: Insufficient rights to call this procedure
-
-
- 5. Different models for reading and writing operations
- ============================================================================
- Since REST Framework won't output write_only fields in responses as well as
- does not require read_only fields to be provided it is worth to
- automatically register 2 separate models for reading and writing operations.
-
- Discovered serializer will be registered with `Write` or `Read` prefix.
- Response Class will be automatically adjusted if serializer class was
- detected by method inspector.
-
- You can also refer to this models in your parameters:
-
- parameters:
- - name: CigarSerializer
- type: WriteCigarSerializer
- paramType: body
-
-
- SAMPLE DOCSTRING:
- ============================================================================
-
- ---
- # API Docs
- # Note: YAML always starts with `---`
-
- type:
- name:
- required: true
- type: string
- url:
- required: false
- type: url
- created_at:
- required: true
- type: string
- format: date-time
-
- serializer: .serializers.FooSerializer
- omit_serializer: false
-
- parameters_strategy: merge
- omit_parameters:
- - path
- parameters:
- - name: name
- description: Foobar long description goes here
- required: true
- type: string
- paramType: form
- - name: other_foo
- paramType: query
- - name: other_bar
- paramType: query
- - name: avatar
- type: file
-
- responseMessages:
- - code: 401
- message: Not authenticated
- """
- PARAM_TYPES = ['header', 'path', 'form', 'body', 'query']
- yaml_error = None
-
- def __init__(self, method_introspector):
- self.method_introspector = method_introspector
- self.object = self.load_obj_from_docstring(
- docstring=self.method_introspector.get_docs())
- if self.object is None:
- self.object = {}
-
- def load_obj_from_docstring(self, docstring):
- """Loads YAML from docstring"""
- split_lines = trim_docstring(docstring).split('\n')
-
- # Cut YAML from rest of docstring
- for index, line in enumerate(split_lines):
- line = line.strip()
- if line.startswith('---'):
- cut_from = index
- break
- else:
- return None
-
- yaml_string = "\n".join(split_lines[cut_from:])
- yaml_string = formatting.dedent(yaml_string)
- try:
- return yaml.load(yaml_string)
- except yaml.YAMLError as e:
- self.yaml_error = e
- return None
-
- def _load_class(self, cls_path, callback):
- """
- Dynamically load a class from a string
- """
- if not cls_path or not callback or not hasattr(callback, '__module__'):
- return None
-
- package = None
-
- if '.' not in cls_path:
- # within current module/file
- class_name = cls_path
- module_path = self.method_introspector.get_module()
- else:
- # relative or fully qualified path import
- class_name = cls_path.split('.')[-1]
- module_path = ".".join(cls_path.split('.')[:-1])
-
- if cls_path.startswith('.'):
- # relative lookup against current package
- # ..serializers.FooSerializer
- package = self.method_introspector.get_module()
-
- class_obj = None
- # Try to perform local or relative/fq import
- try:
- module = importlib.import_module(module_path, package=package)
- class_obj = getattr(module, class_name, None)
- except ImportError:
- pass
-
- # Class was not found, maybe it was imported to callback module?
- # from app.serializers import submodule
- # serializer: submodule.FooSerializer
- if class_obj is None:
- try:
- module = importlib.import_module(
- self.method_introspector.get_module())
- class_obj = multi_getattr(module, cls_path, None)
- except (ImportError, AttributeError):
- raise Exception("Could not find %s, looked in %s" % (cls_path, module))
-
- return class_obj
-
- def get_serializer_class(self, callback):
- """
- Retrieves serializer class from YAML object
- """
- serializer = self.object.get('serializer', None)
- try:
- return self._load_class(serializer, callback)
- except (ImportError, ValueError):
- pass
- return None
-
- def get_extra_serializer_classes(self, callback):
- """
- Retrieves serializer classes from pytype YAML objects
- """
- parameters = self.object.get('parameters', [])
- serializers = []
- for parameter in parameters:
- serializer = parameter.get('pytype', None)
- if serializer is not None:
- try:
- serializer = self._load_class(serializer, callback)
- serializers.append(serializer)
- except (ImportError, ValueError):
- pass
- return serializers
-
- def get_request_serializer_class(self, callback):
- """
- Retrieves request serializer class from YAML object
- """
- serializer = self.object.get('request_serializer', None)
- try:
- return self._load_class(serializer, callback)
- except (ImportError, ValueError):
- pass
- return None
-
- def get_response_serializer_class(self, callback):
- """
- Retrieves response serializer class from YAML object
- """
- serializer = self.object.get('response_serializer', None)
- if isinstance(serializer, list):
- serializer = serializer[0]
- try:
- return self._load_class(serializer, callback)
- except (ImportError, ValueError):
- pass
- return None
-
- def get_response_type(self):
- """
- Docstring may define custom response class
- """
- return self.object.get('type', None)
-
- def get_consumes(self):
- """
- Retrieves media type supported as input
- """
- return self.object.get('consumes', [])
-
- def get_produces(self):
- """
- Retrieves media type supported as output
- """
- return self.object.get('produces', [])
-
- def get_response_messages(self):
- """
- Retrieves response error codes from YAML object
- """
- messages = []
- response_messages = self.object.get('responseMessages', [])
- for message in response_messages:
- messages.append({
- 'code': message.get('code', None),
- 'message': message.get('message', None),
- 'responseModel': message.get('responseModel', None),
- })
- return messages
-
- def get_view_mocker(self, callback):
- view_mocker = self.object.get('view_mocker', lambda a: a)
- if isinstance(view_mocker, six.string_types):
- view_mocker = self._load_class(view_mocker, callback)
- return view_mocker
-
- def get_parameters(self, callback):
- """
- Retrieves parameters from YAML object
- """
- params = []
- fields = self.object.get('parameters', [])
- for field in fields:
- param_type = field.get('paramType', None)
- if param_type not in self.PARAM_TYPES:
- param_type = 'form'
-
- # Data Type & Format
- # See:
- # https://github.com/wordnik/swagger-core/wiki/1.2-transition#wiki-additions-2
- # https://github.com/wordnik/swagger-core/wiki/Parameters
- data_type = field.get('type', 'string')
- pytype = field.get('pytype', None)
- if pytype is not None:
- try:
- serializer = self._load_class(pytype, callback)
- data_type = IntrospectorHelper.get_serializer_name(
- serializer)
- except (ImportError, ValueError):
- pass
- if param_type in ['path', 'query', 'header']:
- if data_type not in BaseMethodIntrospector.PRIMITIVES:
- data_type = 'string'
-
- # Data Format
- data_format = field.get('format', None)
-
- f = {
- 'paramType': param_type,
- 'name': field.get('name', None),
- 'description': field.get('description', ''),
- 'required': field.get('required', False),
- }
-
- normalize_data_format(data_type, data_format, f)
-
- if field.get('defaultValue', None) is not None:
- f['defaultValue'] = field.get('defaultValue', None)
-
- # Allow Multiple Values &f=1,2,3,4
- if field.get('allowMultiple'):
- f['allowMultiple'] = True
-
- if f['type'] == 'array':
- items = field.get('items', {})
- elt_data_type = items.get('type', 'string')
- elt_data_format = items.get('type', 'format')
- f['items'] = {
- }
- normalize_data_format(elt_data_type, elt_data_format, f['items'])
-
- uniqueItems = field.get('uniqueItems', None)
- if uniqueItems is not None:
- f['uniqueItems'] = uniqueItems
-
- # Min/Max are optional
- if 'minimum' in field and data_type == 'integer':
- f['minimum'] = str(field.get('minimum', 0))
-
- if 'maximum' in field and data_type == 'integer':
- f['maximum'] = str(field.get('maximum', 0))
-
- # enum options
- enum = field.get('enum', [])
- if enum:
- f['enum'] = enum
-
- # File support
- if f['type'] == 'file':
- f['paramType'] = 'body'
-
- params.append(f)
-
- return params
-
- def discover_parameters(self, inspector):
- """
- Applies parameters strategy for parameters discovered
- from method and docstring
- """
- parameters = []
- docstring_params = self.get_parameters(inspector.callback)
- method_params = inspector.get_parameters()
-
- # paramType may differ, overwrite first
- # so strategy can be applied
- for meth_param in method_params:
- for doc_param in docstring_params:
- if doc_param['name'] == meth_param['name']:
- if 'paramType' in doc_param:
- meth_param['paramType'] = doc_param['paramType']
-
- for param_type in self.PARAM_TYPES:
- if self.should_omit_parameters(param_type):
- continue
- parameters += self._apply_strategy(
- param_type, method_params, docstring_params
- )
-
- # PATCH requests expects all fields except path fields to be optional
- if inspector.get_http_method() == "PATCH":
- for param in parameters:
- if param['paramType'] != 'path':
- param['required'] = False
-
- return parameters
-
- def should_omit_parameters(self, param_type):
- """
- Checks if particular parameter types should be omitted explicitly
- """
- return param_type in self.object.get('omit_parameters', [])
-
- def should_omit_serializer(self):
- """
- Checks if serializer should be intentionally omitted
- """
- return self.object.get('omit_serializer', False)
-
- def _apply_strategy(self, param_type, method_params, docstring_params):
- """
- Applies strategy for subset of parameters filtered by `paramType`
- """
- strategy = self.get_parameters_strategy(param_type=param_type)
- method_params = self._filter_params(
- params=method_params,
- key='paramType',
- val=param_type
- )
- docstring_params = self._filter_params(
- params=docstring_params,
- key='paramType',
- val=param_type
- )
-
- if strategy == 'replace':
- return docstring_params or method_params
- elif strategy == 'merge':
- return self._merge_params(
- method_params,
- docstring_params,
- key='name',
- )
-
- return []
-
- @staticmethod
- def _filter_params(params, key, val):
- """
- Returns filter function for parameters structure
- """
- def filter_by(o):
- return o.get(key, None) == val
- return filter(filter_by, params)
-
- @staticmethod
- def _merge_params(params1, params2, key):
- """
- Helper method.
- Merges parameters lists by key
- """
- import itertools
- merged = OrderedDict()
- for item in itertools.chain(params1, params2):
- merged[item[key]] = item
-
- return [val for (_, val) in merged.items()]
-
- def get_parameters_strategy(self, param_type=None):
- """
- Get behaviour strategy for parameter types.
-
- It can be either `merge` or `replace`:
- - `merge` overwrites duplicate parameters signatures
- discovered by inspector with the ones defined explicitly in
- docstring
- - `replace` strategy completely overwrites parameters discovered
- by inspector with the ones defined explicitly in docstring.
-
- Note: Strategy can be defined per `paramType` so `path` parameters can
- use `merge` strategy while `form` parameters will use `replace`
- strategy.
-
- Default strategy: `merge`
- """
- default = 'merge'
- strategy = self.object.get('parameters_strategy', default)
- if hasattr(strategy, 'get') and param_type is not None:
- strategy = strategy.get(param_type, default)
-
- if strategy not in ['merge', 'replace']:
- strategy = default
-
- return strategy
diff --git a/rest_framework_swagger/models.py b/rest_framework_swagger/models.py
deleted file mode 100644
index 6b202199..00000000
--- a/rest_framework_swagger/models.py
+++ /dev/null
@@ -1 +0,0 @@
-# Create your models here.
diff --git a/rest_framework_swagger/renderers.py b/rest_framework_swagger/renderers.py
new file mode 100644
index 00000000..09007454
--- /dev/null
+++ b/rest_framework_swagger/renderers.py
@@ -0,0 +1,55 @@
+from coreapi.compat import force_bytes
+from django.conf import settings
+from django.shortcuts import resolve_url
+from django.template import loader, RequestContext
+from openapi_codec import OpenAPICodec
+from rest_framework.renderers import BaseRenderer
+import simplejson as json
+
+from .settings import swagger_settings
+
+
+class OpenAPIRenderer(BaseRenderer):
+ media_type = 'application/openapi+json'
+ charset = None
+ format = 'openapi'
+
+ def render(self, data, accepted_media_type=None, renderer_context=None):
+ codec = OpenAPICodec()
+ data = json.loads(codec.dump(data))
+
+ if swagger_settings.SECURITY_DEFINITIONS:
+ data['securityDefinitions'] = swagger_settings.SECURITY_DEFINITIONS
+
+ return force_bytes(json.dumps(data))
+
+
+class SwaggerUIRenderer(BaseRenderer):
+ media_type = 'text/html'
+ format = 'swagger'
+ template = 'rest_framework_swagger/index.html'
+ charset = 'utf-8'
+
+ def render(self, data, accepted_media_type=None, renderer_context=None):
+ context = self.get_context(renderer_context)
+ template = loader.get_template(self.template)
+
+ return template.render(context)
+
+ def get_context(self, renderer_context):
+ renderer_context['USE_SESSION_AUTH'] = \
+ swagger_settings.USE_SESSION_AUTH
+ self.set_session_auth_urls(renderer_context)
+
+ return RequestContext(renderer_context['request'], renderer_context)
+
+ def set_session_auth_urls(self, renderer_context):
+ path = renderer_context['request'].path
+ urls = {
+ 'LOGIN_URL': settings.LOGIN_URL,
+ 'LOGOUT_URL': settings.LOGOUT_URL
+ }
+ renderer_context.update({
+ key: '%s?next=%s' % (resolve_url(val), path)
+ for key, val in urls.items()
+ })
diff --git a/rest_framework_swagger/settings.py b/rest_framework_swagger/settings.py
new file mode 100644
index 00000000..96dd9588
--- /dev/null
+++ b/rest_framework_swagger/settings.py
@@ -0,0 +1,20 @@
+from django.conf import settings
+from rest_framework.settings import APISettings
+
+
+DEFAULTS = {
+ 'USE_SESSION_AUTH': True,
+ 'SECURITY_DEFINITIONS': {
+ 'basic': {
+ 'type': 'basic'
+ }
+ }
+}
+
+IMPORT_STRINGS = []
+
+swagger_settings = APISettings(
+ user_settings=getattr(settings, 'SWAGGER_SETTINGS', {}),
+ defaults=DEFAULTS,
+ import_strings=IMPORT_STRINGS
+)
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/atelier-dune.light.css b/rest_framework_swagger/static/rest_framework_swagger/css/atelier-dune.light.css
deleted file mode 100644
index 11c74232..00000000
--- a/rest_framework_swagger/static/rest_framework_swagger/css/atelier-dune.light.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Base16 Atelier Dune Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Dune Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #7d7a68;
-}
-
-/* Atelier Dune Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d73737;
-}
-
-/* Atelier Dune Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #b65611;
-}
-
-/* Atelier Dune Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #cfb017;
-}
-
-/* Atelier Dune Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #60ac39;
-}
-
-/* Atelier Dune Light Aqua */
-.css .hljs-hexcolor {
- color: #1fad83;
-}
-
-/* Atelier Dune Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #6684e1;
-}
-
-/* Atelier Dune Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #b854d4;
-}
-
-.hljs {
- display: block;
- background: #fefbec;
- color: #6e6b5e;
- padding: 0.5em;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/highlight.default.css b/rest_framework_swagger/static/rest_framework_swagger/css/highlight.default.css
deleted file mode 100755
index 3d8485b4..00000000
--- a/rest_framework_swagger/static/rest_framework_swagger/css/highlight.default.css
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
-
-Original style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block; padding: 0.5em;
- background: #F0F0F0;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag .hljs-title,
-.lisp .hljs-title,
-.clojure .hljs-built_in,
-.nginx .hljs-title {
- color: black;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-constant,
-.hljs-parent,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.haml .hljs-symbol,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-aggregate,
-.hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-addition,
-.hljs-flow,
-.hljs-stream,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.tex .hljs-special,
-.erlang_repl .hljs-function_or_atom,
-.asciidoc .hljs-header,
-.markdown .hljs-header,
-.coffeescript .hljs-attribute {
- color: #800;
-}
-
-.smartquote,
-.hljs-comment,
-.hljs-annotation,
-.hljs-template_comment,
-.diff .hljs-header,
-.hljs-chunk,
-.asciidoc .hljs-blockquote,
-.markdown .hljs-blockquote {
- color: #888;
-}
-
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.hljs-literal,
-.hljs-hexcolor,
-.smalltalk .hljs-symbol,
-.smalltalk .hljs-char,
-.go .hljs-constant,
-.hljs-change,
-.lasso .hljs-variable,
-.makefile .hljs-variable,
-.asciidoc .hljs-bullet,
-.markdown .hljs-bullet,
-.asciidoc .hljs-link_url,
-.markdown .hljs-link_url {
- color: #080;
-}
-
-.hljs-label,
-.hljs-javadoc,
-.ruby .hljs-string,
-.hljs-decorator,
-.hljs-filter .hljs-argument,
-.hljs-localvars,
-.hljs-array,
-.hljs-attr_selector,
-.hljs-important,
-.hljs-pseudo,
-.hljs-pi,
-.haml .hljs-bullet,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-envvar,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.tex .hljs-formula,
-.erlang_repl .hljs-reserved,
-.hljs-prompt,
-.asciidoc .hljs-link_label,
-.markdown .hljs-link_label,
-.vhdl .hljs-attribute,
-.clojure .hljs-attribute,
-.asciidoc .hljs-attribute,
-.lasso .hljs-attribute,
-.coffeescript .hljs-property,
-.hljs-phony {
- color: #88F
-}
-
-.hljs-keyword,
-.hljs-id,
-.hljs-title,
-.hljs-built_in,
-.hljs-aggregate,
-.css .hljs-tag,
-.hljs-javadoctag,
-.hljs-phpdoc,
-.hljs-yardoctag,
-.smalltalk .hljs-class,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.go .hljs-typename,
-.tex .hljs-command,
-.asciidoc .hljs-strong,
-.markdown .hljs-strong,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
-
-.asciidoc .hljs-emphasis,
-.markdown .hljs-emphasis {
- font-style: italic;
-}
-
-.nginx .hljs-built_in {
- font-weight: normal;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.lasso .markup,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/print.css b/rest_framework_swagger/static/rest_framework_swagger/css/print.css
new file mode 100644
index 00000000..d4c1e704
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/css/print.css
@@ -0,0 +1,1362 @@
+/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */
+.swagger-section pre code {
+ display: block;
+ padding: 0.5em;
+ background: #F0F0F0;
+}
+.swagger-section pre code,
+.swagger-section pre .subst,
+.swagger-section pre .tag .title,
+.swagger-section pre .lisp .title,
+.swagger-section pre .clojure .built_in,
+.swagger-section pre .nginx .title {
+ color: black;
+}
+.swagger-section pre .string,
+.swagger-section pre .title,
+.swagger-section pre .constant,
+.swagger-section pre .parent,
+.swagger-section pre .tag .value,
+.swagger-section pre .rules .value,
+.swagger-section pre .rules .value .number,
+.swagger-section pre .preprocessor,
+.swagger-section pre .ruby .symbol,
+.swagger-section pre .ruby .symbol .string,
+.swagger-section pre .aggregate,
+.swagger-section pre .template_tag,
+.swagger-section pre .django .variable,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .addition,
+.swagger-section pre .flow,
+.swagger-section pre .stream,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .apache .cbracket,
+.swagger-section pre .tex .command,
+.swagger-section pre .tex .special,
+.swagger-section pre .erlang_repl .function_or_atom,
+.swagger-section pre .markdown .header {
+ color: #800;
+}
+.swagger-section pre .comment,
+.swagger-section pre .annotation,
+.swagger-section pre .template_comment,
+.swagger-section pre .diff .header,
+.swagger-section pre .chunk,
+.swagger-section pre .markdown .blockquote {
+ color: #888;
+}
+.swagger-section pre .number,
+.swagger-section pre .date,
+.swagger-section pre .regexp,
+.swagger-section pre .literal,
+.swagger-section pre .smalltalk .symbol,
+.swagger-section pre .smalltalk .char,
+.swagger-section pre .go .constant,
+.swagger-section pre .change,
+.swagger-section pre .markdown .bullet,
+.swagger-section pre .markdown .link_url {
+ color: #080;
+}
+.swagger-section pre .label,
+.swagger-section pre .javadoc,
+.swagger-section pre .ruby .string,
+.swagger-section pre .decorator,
+.swagger-section pre .filter .argument,
+.swagger-section pre .localvars,
+.swagger-section pre .array,
+.swagger-section pre .attr_selector,
+.swagger-section pre .important,
+.swagger-section pre .pseudo,
+.swagger-section pre .pi,
+.swagger-section pre .doctype,
+.swagger-section pre .deletion,
+.swagger-section pre .envvar,
+.swagger-section pre .shebang,
+.swagger-section pre .apache .sqbracket,
+.swagger-section pre .nginx .built_in,
+.swagger-section pre .tex .formula,
+.swagger-section pre .erlang_repl .reserved,
+.swagger-section pre .prompt,
+.swagger-section pre .markdown .link_label,
+.swagger-section pre .vhdl .attribute,
+.swagger-section pre .clojure .attribute,
+.swagger-section pre .coffeescript .property {
+ color: #88F;
+}
+.swagger-section pre .keyword,
+.swagger-section pre .id,
+.swagger-section pre .phpdoc,
+.swagger-section pre .title,
+.swagger-section pre .built_in,
+.swagger-section pre .aggregate,
+.swagger-section pre .css .tag,
+.swagger-section pre .javadoctag,
+.swagger-section pre .phpdoc,
+.swagger-section pre .yardoctag,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .winutils,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .go .typename,
+.swagger-section pre .tex .command,
+.swagger-section pre .markdown .strong,
+.swagger-section pre .request,
+.swagger-section pre .status {
+ font-weight: bold;
+}
+.swagger-section pre .markdown .emphasis {
+ font-style: italic;
+}
+.swagger-section pre .nginx .built_in {
+ font-weight: normal;
+}
+.swagger-section pre .coffeescript .javascript,
+.swagger-section pre .javascript .xml,
+.swagger-section pre .tex .formula,
+.swagger-section pre .xml .javascript,
+.swagger-section pre .xml .vbscript,
+.swagger-section pre .xml .css,
+.swagger-section pre .xml .cdata {
+ opacity: 0.5;
+}
+.swagger-section .hljs {
+ display: block;
+ overflow-x: auto;
+ padding: 0.5em;
+ background: #F0F0F0;
+}
+.swagger-section .hljs,
+.swagger-section .hljs-subst {
+ color: #444;
+}
+.swagger-section .hljs-keyword,
+.swagger-section .hljs-attribute,
+.swagger-section .hljs-selector-tag,
+.swagger-section .hljs-meta-keyword,
+.swagger-section .hljs-doctag,
+.swagger-section .hljs-name {
+ font-weight: bold;
+}
+.swagger-section .hljs-built_in,
+.swagger-section .hljs-literal,
+.swagger-section .hljs-bullet,
+.swagger-section .hljs-code,
+.swagger-section .hljs-addition {
+ color: #1F811F;
+}
+.swagger-section .hljs-regexp,
+.swagger-section .hljs-symbol,
+.swagger-section .hljs-variable,
+.swagger-section .hljs-template-variable,
+.swagger-section .hljs-link,
+.swagger-section .hljs-selector-attr,
+.swagger-section .hljs-selector-pseudo {
+ color: #BC6060;
+}
+.swagger-section .hljs-type,
+.swagger-section .hljs-string,
+.swagger-section .hljs-number,
+.swagger-section .hljs-selector-id,
+.swagger-section .hljs-selector-class,
+.swagger-section .hljs-quote,
+.swagger-section .hljs-template-tag,
+.swagger-section .hljs-deletion {
+ color: #880000;
+}
+.swagger-section .hljs-title,
+.swagger-section .hljs-section {
+ color: #880000;
+ font-weight: bold;
+}
+.swagger-section .hljs-comment {
+ color: #888888;
+}
+.swagger-section .hljs-meta {
+ color: #2B6EA1;
+}
+.swagger-section .hljs-emphasis {
+ font-style: italic;
+}
+.swagger-section .hljs-strong {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap {
+ line-height: 1;
+ font-family: "Droid Sans", sans-serif;
+ min-width: 760px;
+ max-width: 960px;
+ margin-left: auto;
+ margin-right: auto;
+ /* JSONEditor specific styling */
+}
+.swagger-section .swagger-ui-wrap b,
+.swagger-section .swagger-ui-wrap strong {
+ font-family: "Droid Sans", sans-serif;
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap q,
+.swagger-section .swagger-ui-wrap blockquote {
+ quotes: none;
+}
+.swagger-section .swagger-ui-wrap p {
+ line-height: 1.4em;
+ padding: 0 0 10px;
+ color: #333333;
+}
+.swagger-section .swagger-ui-wrap q:before,
+.swagger-section .swagger-ui-wrap q:after,
+.swagger-section .swagger-ui-wrap blockquote:before,
+.swagger-section .swagger-ui-wrap blockquote:after {
+ content: none;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu h1,
+.swagger-section .swagger-ui-wrap .heading_with_menu h2,
+.swagger-section .swagger-ui-wrap .heading_with_menu h3,
+.swagger-section .swagger-ui-wrap .heading_with_menu h4,
+.swagger-section .swagger-ui-wrap .heading_with_menu h5,
+.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
+ display: block;
+ clear: none;
+ float: left;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ width: 60%;
+}
+.swagger-section .swagger-ui-wrap table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+.swagger-section .swagger-ui-wrap table thead tr th {
+ padding: 5px;
+ font-size: 0.9em;
+ color: #666666;
+ border-bottom: 1px solid #999999;
+}
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
+ border-bottom: none;
+}
+.swagger-section .swagger-ui-wrap table tbody tr.offset {
+ background-color: #f0f0f0;
+}
+.swagger-section .swagger-ui-wrap table tbody tr td {
+ padding: 6px;
+ font-size: 0.9em;
+ border-bottom: 1px solid #cccccc;
+ vertical-align: top;
+ line-height: 1.3em;
+}
+.swagger-section .swagger-ui-wrap ol {
+ margin: 0px 0 10px;
+ padding: 0 0 0 18px;
+ list-style-type: decimal;
+}
+.swagger-section .swagger-ui-wrap ol li {
+ padding: 5px 0px;
+ font-size: 0.9em;
+ color: #333333;
+}
+.swagger-section .swagger-ui-wrap ol,
+.swagger-section .swagger-ui-wrap ul {
+ list-style: none;
+}
+.swagger-section .swagger-ui-wrap h1 a,
+.swagger-section .swagger-ui-wrap h2 a,
+.swagger-section .swagger-ui-wrap h3 a,
+.swagger-section .swagger-ui-wrap h4 a,
+.swagger-section .swagger-ui-wrap h5 a,
+.swagger-section .swagger-ui-wrap h6 a {
+ text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap h1 a:hover,
+.swagger-section .swagger-ui-wrap h2 a:hover,
+.swagger-section .swagger-ui-wrap h3 a:hover,
+.swagger-section .swagger-ui-wrap h4 a:hover,
+.swagger-section .swagger-ui-wrap h5 a:hover,
+.swagger-section .swagger-ui-wrap h6 a:hover {
+ text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap h1 span.divider,
+.swagger-section .swagger-ui-wrap h2 span.divider,
+.swagger-section .swagger-ui-wrap h3 span.divider,
+.swagger-section .swagger-ui-wrap h4 span.divider,
+.swagger-section .swagger-ui-wrap h5 span.divider,
+.swagger-section .swagger-ui-wrap h6 span.divider {
+ color: #aaaaaa;
+}
+.swagger-section .swagger-ui-wrap a {
+ color: #547f00;
+}
+.swagger-section .swagger-ui-wrap a img {
+ border: none;
+}
+.swagger-section .swagger-ui-wrap article,
+.swagger-section .swagger-ui-wrap aside,
+.swagger-section .swagger-ui-wrap details,
+.swagger-section .swagger-ui-wrap figcaption,
+.swagger-section .swagger-ui-wrap figure,
+.swagger-section .swagger-ui-wrap footer,
+.swagger-section .swagger-ui-wrap header,
+.swagger-section .swagger-ui-wrap hgroup,
+.swagger-section .swagger-ui-wrap menu,
+.swagger-section .swagger-ui-wrap nav,
+.swagger-section .swagger-ui-wrap section,
+.swagger-section .swagger-ui-wrap summary {
+ display: block;
+}
+.swagger-section .swagger-ui-wrap pre {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ background-color: #fcf6db;
+ border: 1px solid #e5e0c6;
+ padding: 10px;
+}
+.swagger-section .swagger-ui-wrap pre code {
+ line-height: 1.6em;
+ background: none;
+}
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
+ clear: both;
+ display: block;
+ color: #0F6AB4;
+ font-size: 1.1em;
+ margin: 0;
+ padding: 15px 0 5px;
+}
+.swagger-section .swagger-ui-wrap .content pre {
+ font-size: 12px;
+ margin-top: 5px;
+ padding: 5px;
+}
+.swagger-section .swagger-ui-wrap .icon-btn {
+ cursor: pointer;
+}
+.swagger-section .swagger-ui-wrap .info_title {
+ padding-bottom: 10px;
+ font-weight: bold;
+ font-size: 25px;
+}
+.swagger-section .swagger-ui-wrap .footer {
+ margin-top: 20px;
+}
+.swagger-section .swagger-ui-wrap p.big,
+.swagger-section .swagger-ui-wrap div.big p {
+ font-size: 1em;
+ margin-bottom: 10px;
+}
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
+ width: 500px !important;
+}
+.swagger-section .swagger-ui-wrap .info_license {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_tos {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .message-fail {
+ color: #cc0000;
+}
+.swagger-section .swagger-ui-wrap .info_url {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_email {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_name {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_description {
+ padding-bottom: 10px;
+ font-size: 15px;
+}
+.swagger-section .swagger-ui-wrap .markdown ol li,
+.swagger-section .swagger-ui-wrap .markdown ul li {
+ padding: 3px 0px;
+ line-height: 1.4em;
+ color: #333333;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
+ display: block;
+ padding: 4px;
+ width: auto;
+ clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
+ font-size: 1.3em;
+}
+.swagger-section .swagger-ui-wrap table.fullwidth {
+ width: 100%;
+}
+.swagger-section .swagger-ui-wrap .model-signature {
+ font-family: "Droid Sans", sans-serif;
+ font-size: 1em;
+ line-height: 1.5em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
+ text-decoration: none;
+ color: #AAA;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
+ text-decoration: underline;
+ color: black;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
+ color: black;
+ text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propType {
+ color: #5555aa;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre:hover {
+ background-color: #ffffdd;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre {
+ font-size: .85em;
+ line-height: 1.2em;
+ overflow: auto;
+ max-height: 200px;
+ cursor: pointer;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
+ display: block;
+ min-width: 230px;
+ margin: 0;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
+ padding-right: 0;
+ border-right: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
+ float: left;
+ margin: 0 5px 5px 0;
+ padding: 2px 5px 2px 0;
+ border-right: 1px solid #ddd;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propOpt {
+ color: #555;
+}
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {
+ font-size: 0.75em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
+ font-style: italic;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .strong {
+ font-weight: bold;
+ color: #000;
+ font-size: .9em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description div {
+ font-size: 0.9em;
+ line-height: 1.5em;
+ margin-left: 1em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
+ font-weight: bold;
+ color: #000;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
+ border-spacing: 0;
+ position: absolute;
+ background-color: #ffffff;
+ border: 1px solid #bbbbbb;
+ display: none;
+ font-size: 11px;
+ max-width: 400px;
+ line-height: 30px;
+ color: black;
+ padding: 5px;
+ margin-left: 10px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
+ text-align: center;
+ background-color: #eeeeee;
+ border: 1px solid #bbbbbb;
+ font-size: 11px;
+ color: #666666;
+ font-weight: bold;
+ padding: 5px;
+ line-height: 15px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
+ display: inline;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
+ display: block;
+ content: '';
+}
+.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
+ margin-right: -3px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propName {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {
+ clear: both;
+}
+.swagger-section .swagger-ui-wrap .body-textarea {
+ width: 300px;
+ height: 100px;
+ border: 1px solid #aaa;
+}
+.swagger-section .swagger-ui-wrap .markdown p code,
+.swagger-section .swagger-ui-wrap .markdown li code {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ background-color: #f0f0f0;
+ color: black;
+ padding: 1px 3px;
+}
+.swagger-section .swagger-ui-wrap .required {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .editor_holder {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap .editor_holder label {
+ font-weight: normal!important;
+ /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
+}
+.swagger-section .swagger-ui-wrap .editor_holder label.required {
+ font-weight: bold!important;
+}
+.swagger-section .swagger-ui-wrap input.parameter {
+ width: 300px;
+ border: 1px solid #aaa;
+}
+.swagger-section .swagger-ui-wrap h1 {
+ color: black;
+ font-size: 1.5em;
+ line-height: 1.3em;
+ padding: 10px 0 10px 0;
+ font-family: "Droid Sans", sans-serif;
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu {
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {
+ display: block;
+ clear: none;
+ float: right;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ margin-top: 10px;
+}
+.swagger-section .swagger-ui-wrap h2 {
+ color: black;
+ font-size: 1.3em;
+ padding: 10px 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap h2 a {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap h2 span.sub {
+ font-size: 0.7em;
+ color: #999999;
+ font-style: italic;
+}
+.swagger-section .swagger-ui-wrap h2 span.sub a {
+ color: #777777;
+}
+.swagger-section .swagger-ui-wrap span.weak {
+ color: #666666;
+}
+.swagger-section .swagger-ui-wrap .message-success {
+ color: #89BF04;
+}
+.swagger-section .swagger-ui-wrap caption,
+.swagger-section .swagger-ui-wrap th,
+.swagger-section .swagger-ui-wrap td {
+ text-align: left;
+ font-weight: normal;
+ vertical-align: middle;
+}
+.swagger-section .swagger-ui-wrap .code {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
+ font-family: "Droid Sans", sans-serif;
+ height: 250px;
+ padding: 4px;
+ display: block;
+ clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
+ display: block;
+ clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
+ display: block;
+ float: left;
+ clear: none;
+ margin: 0;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
+ display: block;
+ float: left;
+ clear: none;
+ margin: 0 5px 0 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
+ display: block;
+ clear: both;
+ width: auto;
+ padding: 0 0 3px;
+ color: #666666;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
+ padding-left: 3px;
+ color: #888888;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
+ margin-left: 0;
+ font-style: italic;
+ font-size: 0.9em;
+ margin: 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
+ margin: 0;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap span.blank,
+.swagger-section .swagger-ui-wrap span.empty {
+ color: #888888;
+ font-style: italic;
+}
+.swagger-section .swagger-ui-wrap .markdown h3 {
+ color: #547f00;
+}
+.swagger-section .swagger-ui-wrap .markdown h4 {
+ color: #666666;
+}
+.swagger-section .swagger-ui-wrap .markdown pre {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ background-color: #fcf6db;
+ border: 1px solid #e5e0c6;
+ padding: 10px;
+ margin: 0 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap .markdown pre code {
+ line-height: 1.6em;
+ overflow: auto;
+}
+.swagger-section .swagger-ui-wrap div.gist {
+ margin: 20px 0 25px 0 !important;
+}
+.swagger-section .swagger-ui-wrap ul#resources {
+ font-family: "Droid Sans", sans-serif;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource {
+ border-bottom: 1px solid #dddddd;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
+ color: #555555;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
+ border-bottom: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
+ border: 1px solid transparent;
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+ overflow: hidden;
+ padding: 0;
+ display: block;
+ clear: none;
+ float: right;
+ margin: 14px 10px 0 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
+ float: left;
+ clear: none;
+ margin: 0;
+ padding: 2px 10px;
+ border-right: 1px solid #dddddd;
+ color: #666666;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
+ color: #aaaaaa;
+ text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
+ text-decoration: underline;
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
+ text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
+ padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
+ padding-right: 0;
+ border-right: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
+ padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
+ color: #999999;
+ padding-left: 0;
+ display: block;
+ clear: none;
+ float: left;
+ font-family: "Droid Sans", sans-serif;
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
+ color: #999999;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+ margin: 0 0 10px;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
+ display: block;
+ clear: none;
+ float: left;
+ width: auto;
+ margin: 0;
+ padding: 0;
+ line-height: 1.1em;
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
+ padding-left: 10px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
+ color: black;
+ text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated {
+ text-decoration: line-through;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
+ text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
+ text-transform: uppercase;
+ text-decoration: none;
+ color: white;
+ display: inline-block;
+ width: 50px;
+ font-size: 0.7em;
+ text-align: center;
+ padding: 7px 0 4px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ -o-border-radius: 2px;
+ -ms-border-radius: 2px;
+ -khtml-border-radius: 2px;
+ border-radius: 2px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
+ margin: 0;
+ padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
+ overflow: hidden;
+ padding: 0;
+ display: block;
+ clear: none;
+ float: right;
+ margin: 6px 10px 0 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
+ float: left;
+ clear: none;
+ margin: 0;
+ padding: 2px 10px;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
+ text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+ border-top: none;
+ padding: 10px;
+ -moz-border-radius-bottomleft: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+ -o-border-bottom-left-radius: 6px;
+ -ms-border-bottom-left-radius: 6px;
+ -khtml-border-bottom-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+ -o-border-bottom-right-radius: 6px;
+ -ms-border-bottom-right-radius: 6px;
+ -khtml-border-bottom-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ margin: 0 0 20px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
+ font-size: 1.1em;
+ margin: 0;
+ padding: 15px 0 5px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
+ float: none;
+ clear: both;
+ overflow: hidden;
+ display: block;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
+ padding: 4px 0 0 10px;
+ display: inline-block;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
+ display: block;
+ clear: none;
+ float: left;
+ padding: 6px 8px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
+ background-image: url('../images/throbber.gif');
+ width: 128px;
+ height: 16px;
+ display: block;
+ clear: none;
+ float: right;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
+ outline: 2px solid black;
+ outline-color: #cc0000;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {
+ max-width: 300px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ padding: 10px;
+ font-size: 0.9em;
+ max-height: 400px;
+ overflow-y: auto;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
+ background-color: #f9f2e9;
+ border: 1px solid #f0e0ca;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
+ background-color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #f0e0ca;
+ color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
+ color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
+ background-color: #faf5ee;
+ border: 1px solid #f0e0ca;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
+ color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
+ color: #dcb67f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
+ background-color: #fcffcd;
+ border: 1px solid black;
+ border-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
+ text-transform: uppercase;
+ background-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #ffd20f;
+ color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
+ color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
+ background-color: #fcffcd;
+ border: 1px solid black;
+ border-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
+ color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
+ color: #6fc992;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
+ background-color: #f5e8e8;
+ border: 1px solid #e8c6c7;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
+ text-transform: uppercase;
+ background-color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #e8c6c7;
+ color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
+ color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+ background-color: #f7eded;
+ border: 1px solid #e8c6c7;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
+ color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
+ color: #c8787a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
+ background-color: #e7f6ec;
+ border: 1px solid #c3e8d1;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
+ background-color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #c3e8d1;
+ color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
+ color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
+ background-color: #ebf7f0;
+ border: 1px solid #c3e8d1;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
+ color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
+ color: #6fc992;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
+ background-color: #FCE9E3;
+ border: 1px solid #F5D5C3;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
+ background-color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #f0cecb;
+ color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
+ color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
+ background-color: #faf0ef;
+ border: 1px solid #f0cecb;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
+ color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
+ color: #dcb67f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
+ background-color: #e7f0f7;
+ border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
+ background-color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #c3d9ec;
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
+ background-color: #ebf3f9;
+ border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
+ color: #6fa5d2;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
+ background-color: #e7f0f7;
+ border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
+ background-color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
+ border-right: 1px solid #dddddd;
+ border-right-color: #c3d9ec;
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
+ background-color: #ebf3f9;
+ border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
+ color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
+ color: #6fa5d2;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+ border-top: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
+ padding-right: 0;
+ border-right: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
+ text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
+ padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
+ padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap p#colophon {
+ margin: 0 15px 40px 15px;
+ padding: 10px 0;
+ font-size: 0.8em;
+ border-top: 1px solid #dddddd;
+ font-family: "Droid Sans", sans-serif;
+ color: #999999;
+ font-style: italic;
+}
+.swagger-section .swagger-ui-wrap p#colophon a {
+ text-decoration: none;
+ color: #547f00;
+}
+.swagger-section .swagger-ui-wrap h3 {
+ color: black;
+ font-size: 1.1em;
+ padding: 10px 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap .markdown ol,
+.swagger-section .swagger-ui-wrap .markdown ul {
+ font-family: "Droid Sans", sans-serif;
+ margin: 5px 0 10px;
+ padding: 0 0 0 18px;
+ list-style-type: disc;
+}
+.swagger-section .swagger-ui-wrap form.form_box {
+ background-color: #ebf3f9;
+ border: 1px solid #c3d9ec;
+ padding: 10px;
+}
+.swagger-section .swagger-ui-wrap form.form_box label {
+ color: #0f6ab4 !important;
+}
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
+ display: block;
+ padding: 10px;
+}
+.swagger-section .swagger-ui-wrap form.form_box p.weak {
+ font-size: 0.8em;
+}
+.swagger-section .swagger-ui-wrap form.form_box p {
+ font-size: 0.9em;
+ padding: 0 0 15px;
+ color: #7e7b6d;
+}
+.swagger-section .swagger-ui-wrap form.form_box p a {
+ color: #646257;
+}
+.swagger-section .swagger-ui-wrap form.form_box p strong {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
+ padding-bottom: 0;
+}
+.swagger-section .title {
+ font-style: bold;
+}
+.swagger-section .secondary_form {
+ display: none;
+}
+.swagger-section .main_image {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+.swagger-section .oauth_body {
+ margin-left: 100px;
+ margin-right: 100px;
+}
+.swagger-section .oauth_submit {
+ text-align: center;
+ display: inline-block;
+}
+.swagger-section .authorize-wrapper {
+ margin: 15px 0 10px;
+}
+.swagger-section .authorize-wrapper_operation {
+ float: right;
+}
+.swagger-section .authorize__btn:hover {
+ text-decoration: underline;
+ cursor: pointer;
+}
+.swagger-section .authorize__btn_operation:hover .authorize-scopes {
+ display: block;
+}
+.swagger-section .authorize-scopes {
+ position: absolute;
+ margin-top: 20px;
+ background: #FFF;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ display: none;
+ font-size: 13px;
+ max-width: 300px;
+ line-height: 30px;
+ color: black;
+ padding: 5px;
+}
+.swagger-section .authorize-scopes .authorize__scope {
+ text-decoration: none;
+}
+.swagger-section .authorize__btn_operation {
+ height: 18px;
+ vertical-align: middle;
+ display: inline-block;
+ background: url(../images/explorer_icons.png) no-repeat;
+}
+.swagger-section .authorize__btn_operation_login {
+ background-position: 0 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section .authorize__btn_operation_logout {
+ background-position: -30px 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section #auth_container {
+ color: #fff;
+ display: inline-block;
+ border: none;
+ padding: 5px;
+ width: 87px;
+ height: 13px;
+}
+.swagger-section #auth_container .authorize__btn {
+ color: #fff;
+}
+.swagger-section .auth_container {
+ padding: 0 0 10px;
+ margin-bottom: 5px;
+ border-bottom: solid 1px #CCC;
+ font-size: 0.9em;
+}
+.swagger-section .auth_container .auth__title {
+ color: #547f00;
+ font-size: 1.2em;
+}
+.swagger-section .auth_container .basic_auth__label {
+ display: inline-block;
+ width: 60px;
+}
+.swagger-section .auth_container .auth__description {
+ color: #999999;
+ margin-bottom: 5px;
+}
+.swagger-section .auth_container .auth__button {
+ margin-top: 10px;
+ height: 30px;
+}
+.swagger-section .auth_container .key_auth__field {
+ margin: 5px 0;
+}
+.swagger-section .auth_container .key_auth__label {
+ display: inline-block;
+ width: 60px;
+}
+.swagger-section .api-popup-dialog {
+ position: absolute;
+ display: none;
+}
+.swagger-section .api-popup-dialog-wrapper {
+ z-index: 1000;
+ width: 500px;
+ background: #FFF;
+ padding: 20px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ font-size: 13px;
+ color: #777;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+.swagger-section .api-popup-dialog-shadow {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0.2;
+ background-color: gray;
+ z-index: 900;
+}
+.swagger-section .api-popup-dialog .api-popup-title {
+ font-size: 24px;
+ padding: 10px 0;
+}
+.swagger-section .api-popup-dialog .api-popup-title {
+ font-size: 24px;
+ padding: 10px 0;
+}
+.swagger-section .api-popup-dialog .error-msg {
+ padding-left: 5px;
+ padding-bottom: 5px;
+}
+.swagger-section .api-popup-dialog .api-popup-content {
+ max-height: 500px;
+ overflow-y: auto;
+}
+.swagger-section .api-popup-dialog .api-popup-authbtn {
+ height: 30px;
+}
+.swagger-section .api-popup-dialog .api-popup-cancel {
+ height: 30px;
+}
+.swagger-section .api-popup-scopes {
+ padding: 10px 20px;
+}
+.swagger-section .api-popup-scopes li {
+ padding: 5px 0;
+ line-height: 20px;
+}
+.swagger-section .api-popup-scopes li input {
+ position: relative;
+ top: 2px;
+}
+.swagger-section .api-popup-scopes .api-scope-desc {
+ padding-left: 20px;
+ font-style: italic;
+}
+.swagger-section .api-popup-actions {
+ padding-top: 10px;
+}
+#header {
+ display: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre {
+ max-height: none;
+}
+.swagger-section .swagger-ui-wrap .body-textarea {
+ width: 100px;
+}
+.swagger-section .swagger-ui-wrap input.parameter {
+ width: 100px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+ display: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints {
+ display: block !important;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+ display: block !important;
+}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/reset.css b/rest_framework_swagger/static/rest_framework_swagger/css/reset.css
new file mode 100644
index 00000000..b2b07894
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/css/reset.css
@@ -0,0 +1,125 @@
+/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol,
+ul {
+ list-style: none;
+}
+blockquote,
+q {
+ quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/rest_framework_swagger.css b/rest_framework_swagger/static/rest_framework_swagger/css/rest_framework_swagger.css
deleted file mode 100644
index b57bbd12..00000000
--- a/rest_framework_swagger/static/rest_framework_swagger/css/rest_framework_swagger.css
+++ /dev/null
@@ -1,11 +0,0 @@
-#django-rest-swagger {
- background: #547f00;
- color: #eee;
- text-align:right;
- padding: 7px 0;
- font-size: 0.8em
-}
-#django-rest-swagger a {
- color: #fff;
- text-decoration: none;
-}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/screen.css b/rest_framework_swagger/static/rest_framework_swagger/css/screen.css
old mode 100755
new mode 100644
index 7ff3e63e..36523ed7
--- a/rest_framework_swagger/static/rest_framework_swagger/css/screen.css
+++ b/rest_framework_swagger/static/rest_framework_swagger/css/screen.css
@@ -1,161 +1,221 @@
-/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
-.swagger-ui-wrap html,
-.swagger-ui-wrap body,
-.swagger-ui-wrap div,
-.swagger-ui-wrap span,
-.swagger-ui-wrap applet,
-.swagger-ui-wrap object,
-.swagger-ui-wrap iframe,
-.swagger-ui-wrap h1,
-.swagger-ui-wrap h2,
-.swagger-ui-wrap h3,
-.swagger-ui-wrap h4,
-.swagger-ui-wrap h5,
-.swagger-ui-wrap h6,
-.swagger-ui-wrap p,
-.swagger-ui-wrap blockquote,
-.swagger-ui-wrap pre,
-.swagger-ui-wrap a,
-.swagger-ui-wrap abbr,
-.swagger-ui-wrap acronym,
-.swagger-ui-wrap address,
-.swagger-ui-wrap big,
-.swagger-ui-wrap cite,
-.swagger-ui-wrap code,
-.swagger-ui-wrap del,
-.swagger-ui-wrap dfn,
-.swagger-ui-wrap em,
-.swagger-ui-wrap img,
-.swagger-ui-wrap ins,
-.swagger-ui-wrap kbd,
-.swagger-ui-wrap q,
-.swagger-ui-wrap s,
-.swagger-ui-wrap samp,
-.swagger-ui-wrap small,
-.swagger-ui-wrap strike,
-.swagger-ui-wrap strong,
-.swagger-ui-wrap sub,
-.swagger-ui-wrap sup,
-.swagger-ui-wrap tt,
-.swagger-ui-wrap var,
-.swagger-ui-wrap b,
-.swagger-ui-wrap u,
-.swagger-ui-wrap i,
-.swagger-ui-wrap center,
-.swagger-ui-wrap dl,
-.swagger-ui-wrap dt,
-.swagger-ui-wrap dd,
-.swagger-ui-wrap ol,
-.swagger-ui-wrap ul,
-.swagger-ui-wrap li,
-.swagger-ui-wrap fieldset,
-.swagger-ui-wrap form,
-.swagger-ui-wrap label,
-.swagger-ui-wrap legend,
-.swagger-ui-wrap table,
-.swagger-ui-wrap caption,
-.swagger-ui-wrap tbody,
-.swagger-ui-wrap tfoot,
-.swagger-ui-wrap thead,
-.swagger-ui-wrap tr,
-.swagger-ui-wrap th,
-.swagger-ui-wrap td,
-.swagger-ui-wrap article,
-.swagger-ui-wrap aside,
-.swagger-ui-wrap canvas,
-.swagger-ui-wrap details,
-.swagger-ui-wrap embed,
-.swagger-ui-wrap figure,
-.swagger-ui-wrap figcaption,
-.swagger-ui-wrap footer,
-.swagger-ui-wrap header,
-.swagger-ui-wrap hgroup,
-.swagger-ui-wrap menu,
-.swagger-ui-wrap nav,
-.swagger-ui-wrap output,
-.swagger-ui-wrap ruby,
-.swagger-ui-wrap section,
-.swagger-ui-wrap summary,
-.swagger-ui-wrap time,
-.swagger-ui-wrap mark,
-.swagger-ui-wrap audio,
-.swagger-ui-wrap video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
-}
-/* HTML5 display-role reset for older browsers */
-.swagger-ui-wrap article,
-.swagger-ui-wrap aside,
-.swagger-ui-wrap details,
-.swagger-ui-wrap figcaption,
-.swagger-ui-wrap figure,
-.swagger-ui-wrap footer,
-.swagger-ui-wrap header,
-.swagger-ui-wrap hgroup,
-.swagger-ui-wrap menu,
-.swagger-ui-wrap nav,
-.swagger-ui-wrap section {
+/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */
+.swagger-section pre code {
display: block;
+ padding: 0.5em;
+ background: #F0F0F0;
+}
+.swagger-section pre code,
+.swagger-section pre .subst,
+.swagger-section pre .tag .title,
+.swagger-section pre .lisp .title,
+.swagger-section pre .clojure .built_in,
+.swagger-section pre .nginx .title {
+ color: black;
}
-.swagger-ui-wrap body {
- line-height: 1;
+.swagger-section pre .string,
+.swagger-section pre .title,
+.swagger-section pre .constant,
+.swagger-section pre .parent,
+.swagger-section pre .tag .value,
+.swagger-section pre .rules .value,
+.swagger-section pre .rules .value .number,
+.swagger-section pre .preprocessor,
+.swagger-section pre .ruby .symbol,
+.swagger-section pre .ruby .symbol .string,
+.swagger-section pre .aggregate,
+.swagger-section pre .template_tag,
+.swagger-section pre .django .variable,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .addition,
+.swagger-section pre .flow,
+.swagger-section pre .stream,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .apache .cbracket,
+.swagger-section pre .tex .command,
+.swagger-section pre .tex .special,
+.swagger-section pre .erlang_repl .function_or_atom,
+.swagger-section pre .markdown .header {
+ color: #800;
+}
+.swagger-section pre .comment,
+.swagger-section pre .annotation,
+.swagger-section pre .template_comment,
+.swagger-section pre .diff .header,
+.swagger-section pre .chunk,
+.swagger-section pre .markdown .blockquote {
+ color: #888;
+}
+.swagger-section pre .number,
+.swagger-section pre .date,
+.swagger-section pre .regexp,
+.swagger-section pre .literal,
+.swagger-section pre .smalltalk .symbol,
+.swagger-section pre .smalltalk .char,
+.swagger-section pre .go .constant,
+.swagger-section pre .change,
+.swagger-section pre .markdown .bullet,
+.swagger-section pre .markdown .link_url {
+ color: #080;
+}
+.swagger-section pre .label,
+.swagger-section pre .javadoc,
+.swagger-section pre .ruby .string,
+.swagger-section pre .decorator,
+.swagger-section pre .filter .argument,
+.swagger-section pre .localvars,
+.swagger-section pre .array,
+.swagger-section pre .attr_selector,
+.swagger-section pre .important,
+.swagger-section pre .pseudo,
+.swagger-section pre .pi,
+.swagger-section pre .doctype,
+.swagger-section pre .deletion,
+.swagger-section pre .envvar,
+.swagger-section pre .shebang,
+.swagger-section pre .apache .sqbracket,
+.swagger-section pre .nginx .built_in,
+.swagger-section pre .tex .formula,
+.swagger-section pre .erlang_repl .reserved,
+.swagger-section pre .prompt,
+.swagger-section pre .markdown .link_label,
+.swagger-section pre .vhdl .attribute,
+.swagger-section pre .clojure .attribute,
+.swagger-section pre .coffeescript .property {
+ color: #88F;
+}
+.swagger-section pre .keyword,
+.swagger-section pre .id,
+.swagger-section pre .phpdoc,
+.swagger-section pre .title,
+.swagger-section pre .built_in,
+.swagger-section pre .aggregate,
+.swagger-section pre .css .tag,
+.swagger-section pre .javadoctag,
+.swagger-section pre .phpdoc,
+.swagger-section pre .yardoctag,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .winutils,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .go .typename,
+.swagger-section pre .tex .command,
+.swagger-section pre .markdown .strong,
+.swagger-section pre .request,
+.swagger-section pre .status {
+ font-weight: bold;
}
-.swagger-ui-wrap ol,
-.swagger-ui-wrap ul {
- list-style: none;
+.swagger-section pre .markdown .emphasis {
+ font-style: italic;
}
-.swagger-ui-wrap blockquote,
-.swagger-ui-wrap q {
- quotes: none;
+.swagger-section pre .nginx .built_in {
+ font-weight: normal;
}
-.swagger-ui-wrap blockquote:before,
-.swagger-ui-wrap blockquote:after,
-.swagger-ui-wrap q:before,
-.swagger-ui-wrap q:after {
- content: '';
- content: none;
+.swagger-section pre .coffeescript .javascript,
+.swagger-section pre .javascript .xml,
+.swagger-section pre .tex .formula,
+.swagger-section pre .xml .javascript,
+.swagger-section pre .xml .vbscript,
+.swagger-section pre .xml .css,
+.swagger-section pre .xml .cdata {
+ opacity: 0.5;
}
-.swagger-ui-wrap table {
- border-collapse: collapse;
- border-spacing: 0;
+.swagger-section .hljs {
+ display: block;
+ overflow-x: auto;
+ padding: 0.5em;
+ background: #F0F0F0;
+}
+.swagger-section .hljs,
+.swagger-section .hljs-subst {
+ color: #444;
+}
+.swagger-section .hljs-keyword,
+.swagger-section .hljs-attribute,
+.swagger-section .hljs-selector-tag,
+.swagger-section .hljs-meta-keyword,
+.swagger-section .hljs-doctag,
+.swagger-section .hljs-name {
+ font-weight: bold;
+}
+.swagger-section .hljs-built_in,
+.swagger-section .hljs-literal,
+.swagger-section .hljs-bullet,
+.swagger-section .hljs-code,
+.swagger-section .hljs-addition {
+ color: #1F811F;
+}
+.swagger-section .hljs-regexp,
+.swagger-section .hljs-symbol,
+.swagger-section .hljs-variable,
+.swagger-section .hljs-template-variable,
+.swagger-section .hljs-link,
+.swagger-section .hljs-selector-attr,
+.swagger-section .hljs-selector-pseudo {
+ color: #BC6060;
+}
+.swagger-section .hljs-type,
+.swagger-section .hljs-string,
+.swagger-section .hljs-number,
+.swagger-section .hljs-selector-id,
+.swagger-section .hljs-selector-class,
+.swagger-section .hljs-quote,
+.swagger-section .hljs-template-tag,
+.swagger-section .hljs-deletion {
+ color: #880000;
+}
+.swagger-section .hljs-title,
+.swagger-section .hljs-section {
+ color: #880000;
+ font-weight: bold;
+}
+.swagger-section .hljs-comment {
+ color: #888888;
+}
+.swagger-section .hljs-meta {
+ color: #2B6EA1;
+}
+.swagger-section .hljs-emphasis {
+ font-style: italic;
+}
+.swagger-section .hljs-strong {
+ font-weight: bold;
}
-.swagger-ui-wrap {
+.swagger-section .swagger-ui-wrap {
line-height: 1;
font-family: "Droid Sans", sans-serif;
+ min-width: 760px;
max-width: 960px;
margin-left: auto;
margin-right: auto;
+ /* JSONEditor specific styling */
}
-.swagger-ui-wrap b,
-.swagger-ui-wrap strong {
+.swagger-section .swagger-ui-wrap b,
+.swagger-section .swagger-ui-wrap strong {
font-family: "Droid Sans", sans-serif;
font-weight: bold;
}
-.swagger-ui-wrap q,
-.swagger-ui-wrap blockquote {
+.swagger-section .swagger-ui-wrap q,
+.swagger-section .swagger-ui-wrap blockquote {
quotes: none;
}
-.swagger-ui-wrap p {
+.swagger-section .swagger-ui-wrap p {
line-height: 1.4em;
padding: 0 0 10px;
color: #333333;
}
-.swagger-ui-wrap q:before,
-.swagger-ui-wrap q:after,
-.swagger-ui-wrap blockquote:before,
-.swagger-ui-wrap blockquote:after {
+.swagger-section .swagger-ui-wrap q:before,
+.swagger-section .swagger-ui-wrap q:after,
+.swagger-section .swagger-ui-wrap blockquote:before,
+.swagger-section .swagger-ui-wrap blockquote:after {
content: none;
}
-.swagger-ui-wrap .heading_with_menu h1,
-.swagger-ui-wrap .heading_with_menu h2,
-.swagger-ui-wrap .heading_with_menu h3,
-.swagger-ui-wrap .heading_with_menu h4,
-.swagger-ui-wrap .heading_with_menu h5,
-.swagger-ui-wrap .heading_with_menu h6 {
+.swagger-section .swagger-ui-wrap .heading_with_menu h1,
+.swagger-section .swagger-ui-wrap .heading_with_menu h2,
+.swagger-section .swagger-ui-wrap .heading_with_menu h3,
+.swagger-section .swagger-ui-wrap .heading_with_menu h4,
+.swagger-section .swagger-ui-wrap .heading_with_menu h5,
+.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
display: block;
clear: none;
float: left;
@@ -165,98 +225,98 @@
box-sizing: border-box;
width: 60%;
}
-.swagger-ui-wrap table {
+.swagger-section .swagger-ui-wrap table {
border-collapse: collapse;
border-spacing: 0;
}
-.swagger-ui-wrap table thead tr th {
+.swagger-section .swagger-ui-wrap table thead tr th {
padding: 5px;
font-size: 0.9em;
color: #666666;
border-bottom: 1px solid #999999;
}
-.swagger-ui-wrap table tbody tr:last-child td {
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
border-bottom: none;
}
-.swagger-ui-wrap table tbody tr.offset {
+.swagger-section .swagger-ui-wrap table tbody tr.offset {
background-color: #f0f0f0;
}
-.swagger-ui-wrap table tbody tr td {
+.swagger-section .swagger-ui-wrap table tbody tr td {
padding: 6px;
font-size: 0.9em;
border-bottom: 1px solid #cccccc;
vertical-align: top;
line-height: 1.3em;
}
-.swagger-ui-wrap ol {
+.swagger-section .swagger-ui-wrap ol {
margin: 0px 0 10px;
padding: 0 0 0 18px;
list-style-type: decimal;
}
-.swagger-ui-wrap ol li {
+.swagger-section .swagger-ui-wrap ol li {
padding: 5px 0px;
font-size: 0.9em;
color: #333333;
}
-.swagger-ui-wrap ol,
-.swagger-ui-wrap ul {
+.swagger-section .swagger-ui-wrap ol,
+.swagger-section .swagger-ui-wrap ul {
list-style: none;
}
-.swagger-ui-wrap h1 a,
-.swagger-ui-wrap h2 a,
-.swagger-ui-wrap h3 a,
-.swagger-ui-wrap h4 a,
-.swagger-ui-wrap h5 a,
-.swagger-ui-wrap h6 a {
+.swagger-section .swagger-ui-wrap h1 a,
+.swagger-section .swagger-ui-wrap h2 a,
+.swagger-section .swagger-ui-wrap h3 a,
+.swagger-section .swagger-ui-wrap h4 a,
+.swagger-section .swagger-ui-wrap h5 a,
+.swagger-section .swagger-ui-wrap h6 a {
text-decoration: none;
}
-.swagger-ui-wrap h1 a:hover,
-.swagger-ui-wrap h2 a:hover,
-.swagger-ui-wrap h3 a:hover,
-.swagger-ui-wrap h4 a:hover,
-.swagger-ui-wrap h5 a:hover,
-.swagger-ui-wrap h6 a:hover {
+.swagger-section .swagger-ui-wrap h1 a:hover,
+.swagger-section .swagger-ui-wrap h2 a:hover,
+.swagger-section .swagger-ui-wrap h3 a:hover,
+.swagger-section .swagger-ui-wrap h4 a:hover,
+.swagger-section .swagger-ui-wrap h5 a:hover,
+.swagger-section .swagger-ui-wrap h6 a:hover {
text-decoration: underline;
}
-.swagger-ui-wrap h1 span.divider,
-.swagger-ui-wrap h2 span.divider,
-.swagger-ui-wrap h3 span.divider,
-.swagger-ui-wrap h4 span.divider,
-.swagger-ui-wrap h5 span.divider,
-.swagger-ui-wrap h6 span.divider {
+.swagger-section .swagger-ui-wrap h1 span.divider,
+.swagger-section .swagger-ui-wrap h2 span.divider,
+.swagger-section .swagger-ui-wrap h3 span.divider,
+.swagger-section .swagger-ui-wrap h4 span.divider,
+.swagger-section .swagger-ui-wrap h5 span.divider,
+.swagger-section .swagger-ui-wrap h6 span.divider {
color: #aaaaaa;
}
-.swagger-ui-wrap a {
+.swagger-section .swagger-ui-wrap a {
color: #547f00;
}
-.swagger-ui-wrap a img {
+.swagger-section .swagger-ui-wrap a img {
border: none;
}
-.swagger-ui-wrap article,
-.swagger-ui-wrap aside,
-.swagger-ui-wrap details,
-.swagger-ui-wrap figcaption,
-.swagger-ui-wrap figure,
-.swagger-ui-wrap footer,
-.swagger-ui-wrap header,
-.swagger-ui-wrap hgroup,
-.swagger-ui-wrap menu,
-.swagger-ui-wrap nav,
-.swagger-ui-wrap section,
-.swagger-ui-wrap summary {
+.swagger-section .swagger-ui-wrap article,
+.swagger-section .swagger-ui-wrap aside,
+.swagger-section .swagger-ui-wrap details,
+.swagger-section .swagger-ui-wrap figcaption,
+.swagger-section .swagger-ui-wrap figure,
+.swagger-section .swagger-ui-wrap footer,
+.swagger-section .swagger-ui-wrap header,
+.swagger-section .swagger-ui-wrap hgroup,
+.swagger-section .swagger-ui-wrap menu,
+.swagger-section .swagger-ui-wrap nav,
+.swagger-section .swagger-ui-wrap section,
+.swagger-section .swagger-ui-wrap summary {
display: block;
}
-.swagger-ui-wrap pre {
+.swagger-section .swagger-ui-wrap pre {
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
background-color: #fcf6db;
border: 1px solid #e5e0c6;
padding: 10px;
}
-.swagger-ui-wrap pre code {
+.swagger-section .swagger-ui-wrap pre code {
line-height: 1.6em;
background: none;
}
-.swagger-ui-wrap .content > .content-type > div > label {
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
clear: both;
display: block;
color: #0F6AB4;
@@ -264,165 +324,220 @@
margin: 0;
padding: 15px 0 5px;
}
-.swagger-ui-wrap .content pre {
+.swagger-section .swagger-ui-wrap .content pre {
font-size: 12px;
margin-top: 5px;
padding: 5px;
}
-.swagger-ui-wrap .icon-btn {
+.swagger-section .swagger-ui-wrap .icon-btn {
cursor: pointer;
}
-.swagger-ui-wrap .info_title {
- padding-bottom: 20px;
+.swagger-section .swagger-ui-wrap .info_title {
+ padding-bottom: 10px;
font-weight: bold;
font-size: 25px;
}
-.swagger-ui-wrap p.big,
-.swagger-ui-wrap div.big p {
+.swagger-section .swagger-ui-wrap .footer {
+ margin-top: 20px;
+}
+.swagger-section .swagger-ui-wrap p.big,
+.swagger-section .swagger-ui-wrap div.big p {
font-size: 1em;
margin-bottom: 10px;
}
-.swagger-ui-wrap form.fullwidth ol li.string input,
-.swagger-ui-wrap form.fullwidth ol li.url input,
-.swagger-ui-wrap form.fullwidth ol li.text textarea,
-.swagger-ui-wrap form.fullwidth ol li.numeric input {
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
width: 500px !important;
}
-.swagger-ui-wrap .info_license {
+.swagger-section .swagger-ui-wrap .info_license {
padding-bottom: 5px;
}
-.swagger-ui-wrap .info_tos {
+.swagger-section .swagger-ui-wrap .info_tos {
padding-bottom: 5px;
}
-.swagger-ui-wrap .message-fail {
+.swagger-section .swagger-ui-wrap .message-fail {
color: #cc0000;
}
-.swagger-ui-wrap .info_contact {
+.swagger-section .swagger-ui-wrap .info_url {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_email {
+ padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_name {
padding-bottom: 5px;
- font-size: 15px;
}
-.swagger-ui-wrap .info_description {
+.swagger-section .swagger-ui-wrap .info_description {
padding-bottom: 10px;
font-size: 15px;
- line-height: 1.4;
}
-.swagger-ui-wrap .markdown ol li,
-.swagger-ui-wrap .markdown ul li {
+.swagger-section .swagger-ui-wrap .markdown ol li,
+.swagger-section .swagger-ui-wrap .markdown ul li {
padding: 3px 0px;
line-height: 1.4em;
color: #333333;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
display: block;
padding: 4px;
width: auto;
clear: both;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
font-size: 1.3em;
}
-.swagger-ui-wrap table.fullwidth {
+.swagger-section .swagger-ui-wrap table.fullwidth {
width: 100%;
}
-.swagger-ui-wrap .model-signature {
+.swagger-section .swagger-ui-wrap .model-signature {
font-family: "Droid Sans", sans-serif;
font-size: 1em;
line-height: 1.5em;
}
-.swagger-ui-wrap .model-signature .signature-nav a {
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
text-decoration: none;
color: #AAA;
}
-.swagger-ui-wrap .model-signature .signature-nav a:hover {
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
text-decoration: underline;
color: black;
}
-.swagger-ui-wrap .model-signature .signature-nav .selected {
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
color: black;
text-decoration: none;
}
-.swagger-ui-wrap .model-signature .propType {
+.swagger-section .swagger-ui-wrap .model-signature .propType {
color: #5555aa;
}
-.swagger-ui-wrap .model-signature pre:hover {
+.swagger-section .swagger-ui-wrap .model-signature pre:hover {
background-color: #ffffdd;
}
-.swagger-ui-wrap .model-signature pre {
+.swagger-section .swagger-ui-wrap .model-signature pre {
font-size: .85em;
line-height: 1.2em;
overflow: auto;
max-height: 200px;
cursor: pointer;
}
-.swagger-ui-wrap .model-signature ul.signature-nav {
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
display: block;
+ min-width: 230px;
margin: 0;
padding: 0;
- list-style: none;
}
-.swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
padding-right: 0;
border-right: none;
}
-.swagger-ui-wrap .model-signature ul.signature-nav li {
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
float: left;
margin: 0 5px 5px 0;
padding: 2px 5px 2px 0;
border-right: 1px solid #ddd;
}
-.swagger-ui-wrap .model-signature .propOpt {
+.swagger-section .swagger-ui-wrap .model-signature .propOpt {
color: #555;
}
-.swagger-ui-wrap .model-signature .snippet small {
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {
font-size: 0.75em;
}
-.swagger-ui-wrap .model-signature .propOptKey {
+.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
font-style: italic;
}
-.swagger-ui-wrap .model-signature .description .strong {
+.swagger-section .swagger-ui-wrap .model-signature .description .strong {
font-weight: bold;
color: #000;
font-size: .9em;
}
-.swagger-ui-wrap .model-signature .description div {
+.swagger-section .swagger-ui-wrap .model-signature .description div {
font-size: 0.9em;
line-height: 1.5em;
margin-left: 1em;
}
-.swagger-ui-wrap .model-signature .description .stronger {
+.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
font-weight: bold;
color: #000;
}
-.swagger-ui-wrap .model-signature .propName {
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
+ border-spacing: 0;
+ position: absolute;
+ background-color: #ffffff;
+ border: 1px solid #bbbbbb;
+ display: none;
+ font-size: 11px;
+ max-width: 400px;
+ line-height: 30px;
+ color: black;
+ padding: 5px;
+ margin-left: 10px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
+ text-align: center;
+ background-color: #eeeeee;
+ border: 1px solid #bbbbbb;
+ font-size: 11px;
+ color: #666666;
font-weight: bold;
+ padding: 5px;
+ line-height: 15px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
+ display: inline;
}
-.swagger-ui-wrap .model-signature .signature-container {
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
+ display: block;
+ content: '';
+}
+.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
+ margin-right: -3px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propName {
+ font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {
clear: both;
}
-.swagger-ui-wrap .body-textarea {
+.swagger-section .swagger-ui-wrap .body-textarea {
width: 300px;
height: 100px;
border: 1px solid #aaa;
}
-.swagger-ui-wrap .markdown p code,
-.swagger-ui-wrap .markdown li code {
+.swagger-section .swagger-ui-wrap .markdown p code,
+.swagger-section .swagger-ui-wrap .markdown li code {
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
background-color: #f0f0f0;
color: black;
padding: 1px 3px;
}
-.swagger-ui-wrap .required {
+.swagger-section .swagger-ui-wrap .required {
font-weight: bold;
}
-.swagger-ui-wrap input.parameter {
+.swagger-section .swagger-ui-wrap .editor_holder {
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap .editor_holder label {
+ font-weight: normal!important;
+ /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
+}
+.swagger-section .swagger-ui-wrap .editor_holder label.required {
+ font-weight: bold!important;
+}
+.swagger-section .swagger-ui-wrap input.parameter {
width: 300px;
border: 1px solid #aaa;
}
-.swagger-ui-wrap h1 {
+.swagger-section .swagger-ui-wrap h1 {
color: black;
font-size: 1.5em;
line-height: 1.3em;
@@ -430,13 +545,13 @@
font-family: "Droid Sans", sans-serif;
font-weight: bold;
}
-.swagger-ui-wrap .heading_with_menu {
+.swagger-section .swagger-ui-wrap .heading_with_menu {
float: none;
clear: both;
overflow: hidden;
display: block;
}
-.swagger-ui-wrap .heading_with_menu ul {
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {
display: block;
clear: none;
float: right;
@@ -446,143 +561,143 @@
box-sizing: border-box;
margin-top: 10px;
}
-.swagger-ui-wrap h2 {
+.swagger-section .swagger-ui-wrap h2 {
color: black;
font-size: 1.3em;
padding: 10px 0 10px 0;
}
-.swagger-ui-wrap h2 a {
+.swagger-section .swagger-ui-wrap h2 a {
color: black;
}
-.swagger-ui-wrap h2 span.sub {
+.swagger-section .swagger-ui-wrap h2 span.sub {
font-size: 0.7em;
color: #999999;
font-style: italic;
}
-.swagger-ui-wrap h2 span.sub a {
+.swagger-section .swagger-ui-wrap h2 span.sub a {
color: #777777;
}
-.swagger-ui-wrap span.weak {
+.swagger-section .swagger-ui-wrap span.weak {
color: #666666;
}
-.swagger-ui-wrap .message-success {
+.swagger-section .swagger-ui-wrap .message-success {
color: #89BF04;
}
-.swagger-ui-wrap caption,
-.swagger-ui-wrap th,
-.swagger-ui-wrap td {
+.swagger-section .swagger-ui-wrap caption,
+.swagger-section .swagger-ui-wrap th,
+.swagger-section .swagger-ui-wrap td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
-.swagger-ui-wrap .code {
+.swagger-section .swagger-ui-wrap .code {
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
font-family: "Droid Sans", sans-serif;
height: 250px;
padding: 4px;
display: block;
clear: both;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
display: block;
clear: both;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
float: none;
clear: both;
overflow: hidden;
display: block;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
display: block;
float: left;
clear: none;
margin: 0;
padding: 0;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
display: block;
float: left;
clear: none;
margin: 0 5px 0 0;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
color: black;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
display: block;
clear: both;
width: auto;
padding: 0 0 3px;
color: #666666;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
padding-left: 3px;
color: #888888;
}
-.swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
margin-left: 0;
font-style: italic;
font-size: 0.9em;
margin: 0;
}
-.swagger-ui-wrap form.formtastic fieldset.buttons {
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
margin: 0;
padding: 0;
}
-.swagger-ui-wrap span.blank,
-.swagger-ui-wrap span.empty {
+.swagger-section .swagger-ui-wrap span.blank,
+.swagger-section .swagger-ui-wrap span.empty {
color: #888888;
font-style: italic;
}
-.swagger-ui-wrap .markdown h3 {
+.swagger-section .swagger-ui-wrap .markdown h3 {
color: #547f00;
}
-.swagger-ui-wrap .markdown h4 {
+.swagger-section .swagger-ui-wrap .markdown h4 {
color: #666666;
}
-.swagger-ui-wrap .markdown pre {
+.swagger-section .swagger-ui-wrap .markdown pre {
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
background-color: #fcf6db;
border: 1px solid #e5e0c6;
padding: 10px;
margin: 0 0 10px 0;
}
-.swagger-ui-wrap .markdown pre code {
+.swagger-section .swagger-ui-wrap .markdown pre code {
line-height: 1.6em;
+ overflow: auto;
}
-.swagger-ui-wrap div.gist {
+.swagger-section .swagger-ui-wrap div.gist {
margin: 20px 0 25px 0 !important;
}
-.swagger-ui-wrap ul#resources {
+.swagger-section .swagger-ui-wrap ul#resources {
font-family: "Droid Sans", sans-serif;
font-size: 0.9em;
- margin-top: 20px;
}
-.swagger-ui-wrap ul#resources li.resource {
+.swagger-section .swagger-ui-wrap ul#resources li.resource {
border-bottom: 1px solid #dddddd;
}
-.swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
-.swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
color: black;
}
-.swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
-.swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
color: #555555;
}
-.swagger-ui-wrap ul#resources li.resource:last-child {
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
border-bottom: none;
}
-.swagger-ui-wrap ul#resources li.resource div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
border: 1px solid transparent;
float: none;
clear: both;
overflow: hidden;
display: block;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
overflow: hidden;
padding: 0;
display: block;
@@ -590,7 +705,7 @@
float: right;
margin: 14px 10px 0 0;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
float: left;
clear: none;
margin: 0;
@@ -599,33 +714,33 @@
color: #666666;
font-size: 0.9em;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
color: #aaaaaa;
text-decoration: none;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
text-decoration: underline;
color: black;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
text-decoration: underline;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
padding-left: 0;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
padding-right: 0;
border-right: none;
}
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
-.swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
padding-left: 0;
}
-.swagger-ui-wrap ul#resources li.resource div.heading h2 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
color: #999999;
padding-left: 0;
display: block;
@@ -634,13 +749,13 @@
font-family: "Droid Sans", sans-serif;
font-weight: bold;
}
-.swagger-ui-wrap ul#resources li.resource div.heading h2 a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
color: #999999;
}
-.swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
color: black;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
float: none;
clear: both;
overflow: hidden;
@@ -648,7 +763,7 @@
margin: 0 0 10px;
padding: 0;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
float: none;
clear: both;
overflow: hidden;
@@ -656,7 +771,7 @@
margin: 0;
padding: 0;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
display: block;
clear: none;
float: left;
@@ -666,17 +781,20 @@
line-height: 1.1em;
color: black;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
padding-left: 10px;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
color: black;
text-decoration: none;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated {
+ text-decoration: line-through;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
text-decoration: underline;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
text-transform: uppercase;
text-decoration: none;
color: white;
@@ -692,11 +810,11 @@
-khtml-border-radius: 2px;
border-radius: 2px;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
margin: 0;
padding: 0;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
overflow: hidden;
padding: 0;
display: block;
@@ -704,20 +822,20 @@
float: right;
margin: 6px 10px 0 0;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
float: left;
clear: none;
margin: 0;
padding: 2px 10px;
font-size: 0.9em;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
text-decoration: none;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
color: black;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
border-top: none;
padding: 10px;
-moz-border-radius-bottomleft: 6px;
@@ -734,260 +852,266 @@
border-bottom-right-radius: 6px;
margin: 0 0 20px;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
font-size: 1.1em;
margin: 0;
padding: 15px 0 5px;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
float: none;
clear: both;
overflow: hidden;
display: block;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
padding: 4px 0 0 10px;
display: inline-block;
font-size: 0.9em;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header img {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
display: block;
clear: none;
- float: right;
+ float: left;
+ padding: 6px 8px;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
+ background-image: url('../images/throbber.gif');
+ width: 128px;
+ height: 16px;
display: block;
clear: none;
- float: left;
- padding: 6px 8px;
+ float: right;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
outline: 2px solid black;
outline-color: #cc0000;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {
+ max-width: 300px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
padding: 10px;
font-size: 0.9em;
max-height: 400px;
overflow-y: auto;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
background-color: #f9f2e9;
border: 1px solid #f0e0ca;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
background-color: #c5862b;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #f0e0ca;
color: #c5862b;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
color: #c5862b;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
background-color: #faf5ee;
border: 1px solid #f0e0ca;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
color: #c5862b;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
color: #dcb67f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
background-color: #fcffcd;
border: 1px solid black;
border-color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
text-transform: uppercase;
background-color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #ffd20f;
color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
background-color: #fcffcd;
border: 1px solid black;
border-color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
color: #ffd20f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
color: #6fc992;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
background-color: #f5e8e8;
border: 1px solid #e8c6c7;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
text-transform: uppercase;
background-color: #a41e22;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #e8c6c7;
color: #a41e22;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
color: #a41e22;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
background-color: #f7eded;
border: 1px solid #e8c6c7;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
color: #a41e22;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
color: #c8787a;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
background-color: #e7f6ec;
border: 1px solid #c3e8d1;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
background-color: #10a54a;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #c3e8d1;
color: #10a54a;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
color: #10a54a;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
background-color: #ebf7f0;
border: 1px solid #c3e8d1;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
color: #10a54a;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
color: #6fc992;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
background-color: #FCE9E3;
border: 1px solid #F5D5C3;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
background-color: #D38042;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #f0cecb;
color: #D38042;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
color: #D38042;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
background-color: #faf0ef;
border: 1px solid #f0cecb;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
color: #D38042;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
color: #dcb67f;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
background-color: #e7f0f7;
border: 1px solid #c3d9ec;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
background-color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #c3d9ec;
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
background-color: #ebf3f9;
border: 1px solid #c3d9ec;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
color: #6fa5d2;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
background-color: #e7f0f7;
border: 1px solid #c3d9ec;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
background-color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
border-right: 1px solid #dddddd;
border-right-color: #c3d9ec;
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
background-color: #ebf3f9;
border: 1px solid #c3d9ec;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
color: #0f6ab4;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
color: #6fa5d2;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
border-top: none;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
padding-right: 0;
border-right: none;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
text-decoration: underline;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
padding-left: 0;
}
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
-.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
padding-left: 0;
}
-.swagger-ui-wrap p#colophon {
+.swagger-section .swagger-ui-wrap p#colophon {
margin: 0 15px 40px 15px;
padding: 10px 0;
font-size: 0.8em;
@@ -996,122 +1120,241 @@
color: #999999;
font-style: italic;
}
-.swagger-ui-wrap p#colophon a {
+.swagger-section .swagger-ui-wrap p#colophon a {
text-decoration: none;
color: #547f00;
}
-.swagger-ui-wrap h3 {
+.swagger-section .swagger-ui-wrap h3 {
color: black;
font-size: 1.1em;
padding: 10px 0 10px 0;
}
-.swagger-ui-wrap .markdown ol,
-.swagger-ui-wrap .markdown ul {
+.swagger-section .swagger-ui-wrap .markdown ol,
+.swagger-section .swagger-ui-wrap .markdown ul {
font-family: "Droid Sans", sans-serif;
margin: 5px 0 10px;
padding: 0 0 0 18px;
list-style-type: disc;
}
-.swagger-ui-wrap form.form_box {
+.swagger-section .swagger-ui-wrap form.form_box {
background-color: #ebf3f9;
border: 1px solid #c3d9ec;
padding: 10px;
}
-.swagger-ui-wrap form.form_box label {
+.swagger-section .swagger-ui-wrap form.form_box label {
color: #0f6ab4 !important;
}
-.swagger-ui-wrap form.form_box input[type=submit] {
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
display: block;
padding: 10px;
}
-.swagger-ui-wrap form.form_box p.weak {
+.swagger-section .swagger-ui-wrap form.form_box p.weak {
font-size: 0.8em;
}
-.swagger-ui-wrap form.form_box p {
+.swagger-section .swagger-ui-wrap form.form_box p {
font-size: 0.9em;
padding: 0 0 15px;
color: #7e7b6d;
}
-.swagger-ui-wrap form.form_box p a {
+.swagger-section .swagger-ui-wrap form.form_box p a {
color: #646257;
}
-.swagger-ui-wrap form.form_box p strong {
+.swagger-section .swagger-ui-wrap form.form_box p strong {
color: black;
}
-.title {
+.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
+ padding-bottom: 0;
+}
+.swagger-section .title {
font-style: bold;
}
-.secondary_form {
+.swagger-section .secondary_form {
display: none;
}
-.main_image {
+.swagger-section .main_image {
display: block;
margin-left: auto;
margin-right: auto;
}
-.oauth_body {
+.swagger-section .oauth_body {
margin-left: 100px;
margin-right: 100px;
}
-.oauth_submit {
+.swagger-section .oauth_submit {
text-align: center;
+ display: inline-block;
+}
+.swagger-section .authorize-wrapper {
+ margin: 15px 0 10px;
+}
+.swagger-section .authorize-wrapper_operation {
+ float: right;
+}
+.swagger-section .authorize__btn:hover {
+ text-decoration: underline;
+ cursor: pointer;
+}
+.swagger-section .authorize__btn_operation:hover .authorize-scopes {
+ display: block;
+}
+.swagger-section .authorize-scopes {
+ position: absolute;
+ margin-top: 20px;
+ background: #FFF;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ display: none;
+ font-size: 13px;
+ max-width: 300px;
+ line-height: 30px;
+ color: black;
+ padding: 5px;
+}
+.swagger-section .authorize-scopes .authorize__scope {
+ text-decoration: none;
+}
+.swagger-section .authorize__btn_operation {
+ height: 18px;
+ vertical-align: middle;
+ display: inline-block;
+ background: url(../images/explorer_icons.png) no-repeat;
+}
+.swagger-section .authorize__btn_operation_login {
+ background-position: 0 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section .authorize__btn_operation_logout {
+ background-position: -30px 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section #auth_container {
+ color: #fff;
+ display: inline-block;
+ border: none;
+ padding: 5px;
+ width: 87px;
+ height: 13px;
+}
+.swagger-section #auth_container .authorize__btn {
+ color: #fff;
+}
+.swagger-section .auth_container {
+ padding: 0 0 10px;
+ margin-bottom: 5px;
+ border-bottom: solid 1px #CCC;
+ font-size: 0.9em;
+}
+.swagger-section .auth_container .auth__title {
+ color: #547f00;
+ font-size: 1.2em;
+}
+.swagger-section .auth_container .basic_auth__label {
+ display: inline-block;
+ width: 60px;
+}
+.swagger-section .auth_container .auth__description {
+ color: #999999;
+ margin-bottom: 5px;
+}
+.swagger-section .auth_container .auth__button {
+ margin-top: 10px;
+ height: 30px;
+}
+.swagger-section .auth_container .key_auth__field {
+ margin: 5px 0;
}
-.api-popup-dialog {
- z-index: 10000;
+.swagger-section .auth_container .key_auth__label {
+ display: inline-block;
+ width: 60px;
+}
+.swagger-section .api-popup-dialog {
position: absolute;
+ display: none;
+}
+.swagger-section .api-popup-dialog-wrapper {
+ z-index: 1000;
width: 500px;
background: #FFF;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
- display: none;
font-size: 13px;
color: #777;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+.swagger-section .api-popup-dialog-shadow {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0.2;
+ background-color: gray;
+ z-index: 900;
}
-.api-popup-dialog .api-popup-title {
+.swagger-section .api-popup-dialog .api-popup-title {
font-size: 24px;
padding: 10px 0;
}
-.api-popup-dialog .api-popup-title {
+.swagger-section .api-popup-dialog .api-popup-title {
font-size: 24px;
padding: 10px 0;
}
-.api-popup-dialog p.error-msg {
+.swagger-section .api-popup-dialog .error-msg {
padding-left: 5px;
padding-bottom: 5px;
}
-.api-popup-dialog button.api-popup-authbtn {
+.swagger-section .api-popup-dialog .api-popup-content {
+ max-height: 500px;
+ overflow-y: auto;
+}
+.swagger-section .api-popup-dialog .api-popup-authbtn {
height: 30px;
}
-.api-popup-dialog button.api-popup-cancel {
+.swagger-section .api-popup-dialog .api-popup-cancel {
height: 30px;
}
-.api-popup-scopes {
+.swagger-section .api-popup-scopes {
padding: 10px 20px;
}
-.api-popup-scopes li {
+.swagger-section .api-popup-scopes li {
padding: 5px 0;
line-height: 20px;
}
-.api-popup-scopes .api-scope-desc {
- padding-left: 20px;
- font-style: italic;
-}
-.api-popup-scopes li input {
+.swagger-section .api-popup-scopes li input {
position: relative;
top: 2px;
}
-.api-popup-actions {
+.swagger-section .api-popup-scopes .api-scope-desc {
+ padding-left: 20px;
+ font-style: italic;
+}
+.swagger-section .api-popup-actions {
padding-top: 10px;
}
-.access {
+.swagger-section .access {
float: right;
}
-.auth {
+.swagger-section .auth {
float: right;
}
-#api_information_panel {
- position: absolute;
+.swagger-section .api-ic {
+ height: 18px;
+ vertical-align: middle;
+ display: inline-block;
+ background: url(../images/explorer_icons.png) no-repeat;
+}
+.swagger-section .api-ic .api_information_panel {
+ position: relative;
+ margin-top: 20px;
+ margin-left: -5px;
background: #FFF;
border: 1px solid #ccc;
border-radius: 5px;
@@ -1122,84 +1365,81 @@
color: black;
padding: 5px;
}
-#api_information_panel p .api-msg-enabled {
+.swagger-section .api-ic .api_information_panel p .api-msg-enabled {
color: green;
}
-#api_information_panel p .api-msg-disabled {
+.swagger-section .api-ic .api_information_panel p .api-msg-disabled {
color: red;
}
-.api-ic {
- height: 18px;
- vertical-align: middle;
- display: inline-block;
- background: url(../images/explorer_icons.png) no-repeat;
+.swagger-section .api-ic:hover .api_information_panel {
+ position: absolute;
+ display: block;
}
-.ic-info {
+.swagger-section .ic-info {
background-position: 0 0;
width: 18px;
- margin-top: -7px;
+ margin-top: -6px;
margin-left: 4px;
}
-.ic-warning {
+.swagger-section .ic-warning {
background-position: -60px 0;
width: 18px;
- margin-top: -7px;
+ margin-top: -6px;
margin-left: 4px;
}
-.ic-error {
+.swagger-section .ic-error {
background-position: -30px 0;
width: 18px;
- margin-top: -7px;
+ margin-top: -6px;
margin-left: 4px;
}
-.ic-off {
+.swagger-section .ic-off {
background-position: -90px 0;
width: 58px;
margin-top: -4px;
cursor: pointer;
}
-.ic-on {
+.swagger-section .ic-on {
background-position: -160px 0;
width: 58px;
margin-top: -4px;
cursor: pointer;
}
-#header {
+.swagger-section #header {
background-color: #89bf04;
- padding: 14px;
+ padding: 9px 14px 19px 14px;
+ height: 23px;
+ min-width: 775px;
}
-#header a#logo {
- font-size: 1.5em;
- font-weight: bold;
- text-decoration: none;
- background: transparent url(../images/logo_small.png) no-repeat left center;
- padding: 20px 0 20px 40px;
- color: white;
+.swagger-section #input_baseUrl {
+ width: 400px;
}
-#header form#api_selector {
+.swagger-section #api_selector {
display: block;
clear: none;
float: right;
}
-#header form#api_selector .input {
- display: block;
+.swagger-section #api_selector .input {
+ display: inline-block;
clear: none;
- float: left;
margin: 0 10px 0 0;
}
-#header form#api_selector .input input#input_apiKey {
- width: 200px;
+.swagger-section #api_selector input {
+ font-size: 0.9em;
+ padding: 3px;
+ margin: 0;
}
-#header form#api_selector .input input#input_baseUrl {
- width: 400px;
+.swagger-section #input_apiKey {
+ width: 200px;
}
-#header form#api_selector .input a#explore {
+.swagger-section a.header__btn,
+.swagger-section #auth_container .authorize__btn {
display: block;
text-decoration: none;
font-weight: bold;
padding: 6px 8px;
font-size: 0.9em;
- color: white;
+ color: #fff;
background-color: #547f00;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
@@ -1208,21 +1448,42 @@
-khtml-border-radius: 4px;
border-radius: 4px;
}
-#header form#api_selector .input a#explore:hover {
+.swagger-section .header__btn:hover,
+.swagger-section #auth_container .authorize__btn:hover {
background-color: #547f00;
}
-#header form#api_selector .input input {
- font-size: 0.9em;
- padding: 3px;
- margin: 0;
+.swagger-section #header #logo {
+ font-size: 1.5em;
+ font-weight: bold;
+ text-decoration: none;
+ color: white;
+}
+.swagger-section #header #logo .logo__img {
+ display: block;
+ float: left;
+ margin-top: 2px;
}
-#content_message {
+.swagger-section #header #logo .logo__title {
+ display: inline-block;
+ padding: 5px 0 0 10px;
+}
+.swagger-section #content_message {
margin: 10px 15px;
font-style: italic;
color: #999999;
}
-#message-bar {
+.swagger-section #message-bar {
min-height: 30px;
text-align: center;
padding-top: 10px;
}
+.swagger-section .swagger-collapse:before {
+ content: "-";
+}
+.swagger-section .swagger-expand:before {
+ content: "+";
+}
+.swagger-section .error {
+ outline-color: #cc0000;
+ background-color: #f2dede;
+}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/style.css b/rest_framework_swagger/static/rest_framework_swagger/css/style.css
new file mode 100644
index 00000000..fc21a31d
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/css/style.css
@@ -0,0 +1,250 @@
+.swagger-section #header a#logo {
+ font-size: 1.5em;
+ font-weight: bold;
+ text-decoration: none;
+ background: transparent url(../images/logo.png) no-repeat left center;
+ padding: 20px 0 20px 40px;
+}
+#text-head {
+ font-size: 80px;
+ font-family: 'Roboto', sans-serif;
+ color: #ffffff;
+ float: right;
+ margin-right: 20%;
+}
+.navbar-fixed-top .navbar-nav {
+ height: auto;
+}
+.navbar-fixed-top .navbar-brand {
+ height: auto;
+}
+.navbar-header {
+ height: auto;
+}
+.navbar-inverse {
+ background-color: #000;
+ border-color: #000;
+}
+#navbar-brand {
+ margin-left: 20%;
+}
+.navtext {
+ font-size: 10px;
+}
+.h1,
+h1 {
+ font-size: 60px;
+}
+.navbar-default .navbar-header .navbar-brand {
+ color: #a2dfee;
+}
+/* tag titles */
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
+ color: #393939;
+ font-family: 'Arvo', serif;
+ font-size: 1.5em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
+ color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
+ color: #525252;
+ padding-left: 0px;
+ display: block;
+ clear: none;
+ float: left;
+ font-family: 'Arvo', serif;
+ font-weight: bold;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+ border-color: #0A0A0A;
+}
+.container1 {
+ width: 1500px;
+ margin: auto;
+ margin-top: 0;
+ background-image: url('../images/shield.png');
+ background-repeat: no-repeat;
+ background-position: -40px -20px;
+ margin-bottom: 210px;
+}
+.container-inner {
+ width: 1200px;
+ margin: auto;
+ background-color: rgba(223, 227, 228, 0.75);
+ padding-bottom: 40px;
+ padding-top: 40px;
+ border-radius: 15px;
+}
+.header-content {
+ padding: 0;
+ width: 1000px;
+}
+.title1 {
+ font-size: 80px;
+ font-family: 'Vollkorn', serif;
+ color: #404040;
+ text-align: center;
+ padding-top: 40px;
+ padding-bottom: 100px;
+}
+#icon {
+ margin-top: -18px;
+}
+.subtext {
+ font-size: 25px;
+ font-style: italic;
+ color: #08b;
+ text-align: right;
+ padding-right: 250px;
+}
+.bg-primary {
+ background-color: #00468b;
+}
+.navbar-default .nav > li > a,
+.navbar-default .nav > li > a:focus {
+ color: #08b;
+}
+.navbar-default .nav > li > a,
+.navbar-default .nav > li > a:hover {
+ color: #08b;
+}
+.navbar-default .nav > li > a,
+.navbar-default .nav > li > a:focus:hover {
+ color: #08b;
+}
+.text-faded {
+ font-size: 25px;
+ font-family: 'Vollkorn', serif;
+}
+.section-heading {
+ font-family: 'Vollkorn', serif;
+ font-size: 45px;
+ padding-bottom: 10px;
+}
+hr {
+ border-color: #00468b;
+ padding-bottom: 10px;
+}
+.description {
+ margin-top: 20px;
+ padding-bottom: 200px;
+}
+.description li {
+ font-family: 'Vollkorn', serif;
+ font-size: 25px;
+ color: #525252;
+ margin-left: 28%;
+ padding-top: 5px;
+}
+.gap {
+ margin-top: 200px;
+}
+.troubleshootingtext {
+ color: rgba(255, 255, 255, 0.7);
+ padding-left: 30%;
+}
+.troubleshootingtext li {
+ list-style-type: circle;
+ font-size: 25px;
+ padding-bottom: 5px;
+}
+.overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1000;
+}
+.block.response_body.json:hover {
+ cursor: pointer;
+}
+.backdrop {
+ color: blue;
+}
+#myModal {
+ height: 100%;
+}
+.modal-backdrop {
+ bottom: 0;
+ position: fixed;
+}
+.curl {
+ padding: 10px;
+ font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+ font-size: 0.9em;
+ max-height: 400px;
+ margin-top: 5px;
+ overflow-y: auto;
+ background-color: #fcf6db;
+ border: 1px solid #e5e0c6;
+ border-radius: 4px;
+}
+.curl_title {
+ font-size: 1.1em;
+ margin: 0;
+ padding: 15px 0 5px;
+ font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
+ font-weight: 500;
+ line-height: 1.1;
+}
+.footer {
+ display: none;
+}
+.swagger-section .swagger-ui-wrap h2 {
+ padding: 0;
+}
+h2 {
+ margin: 0;
+ margin-bottom: 5px;
+}
+.markdown p {
+ font-size: 15px;
+ font-family: 'Arvo', serif;
+}
+.swagger-section .swagger-ui-wrap .code {
+ font-size: 15px;
+ font-family: 'Arvo', serif;
+}
+.swagger-section .swagger-ui-wrap b {
+ font-family: 'Arvo', serif;
+}
+#signin:hover {
+ cursor: pointer;
+}
+.dropdown-menu {
+ padding: 15px;
+}
+.navbar-right .dropdown-menu {
+ left: 0;
+ right: auto;
+}
+#signinbutton {
+ width: 100%;
+ height: 32px;
+ font-size: 13px;
+ font-weight: bold;
+ color: #08b;
+}
+.navbar-default .nav > li .details {
+ color: #000000;
+ text-transform: none;
+ font-size: 15px;
+ font-weight: normal;
+ font-family: 'Open Sans', sans-serif;
+ font-style: italic;
+ line-height: 20px;
+ top: -2px;
+}
+.navbar-default .nav > li .details:hover {
+ color: black;
+}
+#signout {
+ width: 100%;
+ height: 32px;
+ font-size: 13px;
+ font-weight: bold;
+ color: #08b;
+}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/css/typography.css b/rest_framework_swagger/static/rest_framework_swagger/css/typography.css
new file mode 100644
index 00000000..efb785fa
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/css/typography.css
@@ -0,0 +1,14 @@
+/* Google Font's Droid Sans */
+@font-face {
+ font-family: 'Droid Sans';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype');
+}
+/* Google Font's Droid Sans Bold */
+@font-face {
+ font-family: 'Droid Sans';
+ font-style: normal;
+ font-weight: 700;
+ src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype');
+}
diff --git a/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans-Bold.ttf b/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans-Bold.ttf
new file mode 100644
index 00000000..036c4d13
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans-Bold.ttf differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans.ttf b/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans.ttf
new file mode 100644
index 00000000..e517a0c5
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/fonts/DroidSans.ttf differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/collapse.gif b/rest_framework_swagger/static/rest_framework_swagger/images/collapse.gif
new file mode 100644
index 00000000..8843e8ce
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/images/collapse.gif differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/expand.gif b/rest_framework_swagger/static/rest_framework_swagger/images/expand.gif
new file mode 100644
index 00000000..477bf137
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/images/expand.gif differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/explorer_icons.png b/rest_framework_swagger/static/rest_framework_swagger/images/explorer_icons.png
old mode 100755
new mode 100644
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/favicon-16x16.png b/rest_framework_swagger/static/rest_framework_swagger/images/favicon-16x16.png
new file mode 100755
index 00000000..66b1a5bf
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/images/favicon-16x16.png differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/favicon-32x32.png b/rest_framework_swagger/static/rest_framework_swagger/images/favicon-32x32.png
new file mode 100755
index 00000000..32f319f8
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/images/favicon-32x32.png differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/favicon.ico b/rest_framework_swagger/static/rest_framework_swagger/images/favicon.ico
new file mode 100755
index 00000000..8b60bcf0
Binary files /dev/null and b/rest_framework_swagger/static/rest_framework_swagger/images/favicon.ico differ
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/logo_small.png b/rest_framework_swagger/static/rest_framework_swagger/images/logo_small.png
old mode 100755
new mode 100644
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/pet_store_api.png b/rest_framework_swagger/static/rest_framework_swagger/images/pet_store_api.png
old mode 100755
new mode 100644
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/throbber.gif b/rest_framework_swagger/static/rest_framework_swagger/images/throbber.gif
old mode 100755
new mode 100644
diff --git a/rest_framework_swagger/static/rest_framework_swagger/images/wordnik_api.png b/rest_framework_swagger/static/rest_framework_swagger/images/wordnik_api.png
old mode 100755
new mode 100644
diff --git a/rest_framework_swagger/static/rest_framework_swagger/index.html b/rest_framework_swagger/static/rest_framework_swagger/index.html
deleted file mode 100755
index 9e5a66a1..00000000
--- a/rest_framework_swagger/static/rest_framework_swagger/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
- Swagger UI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rest_framework_swagger/static/rest_framework_swagger/init.js b/rest_framework_swagger/static/rest_framework_swagger/init.js
new file mode 100644
index 00000000..8378c0ca
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/init.js
@@ -0,0 +1,62 @@
+$(function () {
+ hljs.configure({
+ highlightSizeThreshold: 5000
+ });
+
+ // Pre load translate...
+ if(window.SwaggerTranslator) {
+ window.SwaggerTranslator.translate();
+ }
+ window.swaggerUi = new SwaggerUi({
+ url: window.location.pathname + '?format=openapi',
+ dom_id: "swagger-ui-container",
+ supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
+ onComplete: function(swaggerApi, swaggerUi){
+ if(typeof initOAuth == "function") {
+ initOAuth({
+ clientId: "your-client-id",
+ clientSecret: "your-client-secret-if-required",
+ realm: "your-realms",
+ appName: "your-app-name",
+ scopeSeparator: ",",
+ additionalQueryStringParams: {}
+ });
+ }
+
+ if(window.SwaggerTranslator) {
+ window.SwaggerTranslator.translate();
+ }
+ addCsrfTokenHeaders();
+ },
+ onFailure: function(data) {
+ log("Unable to Load SwaggerUI");
+ },
+ docExpansion: "none",
+ jsonEditor: false,
+ defaultModelRendering: 'schema',
+ showRequestHeaders: false
+ });
+
+ window.swaggerUi.load();
+
+ function addCsrfTokenHeaders() {
+ var token = $('[name="csrfmiddlewaretoken"]')[0];
+ if (!token) {
+ return;
+ }
+ swaggerUi.api.clientAuthorizations.add(
+ 'csrf_token',
+ new SwaggerClient.ApiKeyAuthorization(
+ 'X-CSRFToken',
+ token.value,
+ 'header'
+ )
+ );
+ }
+
+ function log() {
+ if ('console' in window) {
+ console.log.apply(console, arguments);
+ }
+ }
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/en.js b/rest_framework_swagger/static/rest_framework_swagger/lang/en.js
new file mode 100644
index 00000000..91831366
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/en.js
@@ -0,0 +1,56 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Warning: Deprecated",
+ "Implementation Notes":"Implementation Notes",
+ "Response Class":"Response Class",
+ "Status":"Status",
+ "Parameters":"Parameters",
+ "Parameter":"Parameter",
+ "Value":"Value",
+ "Description":"Description",
+ "Parameter Type":"Parameter Type",
+ "Data Type":"Data Type",
+ "Response Messages":"Response Messages",
+ "HTTP Status Code":"HTTP Status Code",
+ "Reason":"Reason",
+ "Response Model":"Response Model",
+ "Request URL":"Request URL",
+ "Response Body":"Response Body",
+ "Response Code":"Response Code",
+ "Response Headers":"Response Headers",
+ "Hide Response":"Hide Response",
+ "Headers":"Headers",
+ "Try it out!":"Try it out!",
+ "Show/Hide":"Show/Hide",
+ "List Operations":"List Operations",
+ "Expand Operations":"Expand Operations",
+ "Raw":"Raw",
+ "can't parse JSON. Raw result":"can't parse JSON. Raw result",
+ "Example Value":"Example Value",
+ "Model Schema":"Model Schema",
+ "Model":"Model",
+ "Click to set as parameter value":"Click to set as parameter value",
+ "apply":"apply",
+ "Username":"Username",
+ "Password":"Password",
+ "Terms of service":"Terms of service",
+ "Created by":"Created by",
+ "See more at":"See more at",
+ "Contact the developer":"Contact the developer",
+ "api version":"api version",
+ "Response Content Type":"Response Content Type",
+ "Parameter content type:":"Parameter content type:",
+ "fetching resource":"fetching resource",
+ "fetching resource list":"fetching resource list",
+ "Explore":"Explore",
+ "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.",
+ "Please specify the protocol for":"Please specify the protocol for",
+ "Can't read swagger JSON from":"Can't read swagger JSON from",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
+ "Unable to read api":"Unable to read api",
+ "from path":"from path",
+ "server returned":"server returned"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/es.js b/rest_framework_swagger/static/rest_framework_swagger/lang/es.js
new file mode 100644
index 00000000..13fa015e
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/es.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Advertencia: Obsoleto",
+ "Implementation Notes":"Notas de implementación",
+ "Response Class":"Clase de la Respuesta",
+ "Status":"Status",
+ "Parameters":"Parámetros",
+ "Parameter":"Parámetro",
+ "Value":"Valor",
+ "Description":"Descripción",
+ "Parameter Type":"Tipo del Parámetro",
+ "Data Type":"Tipo del Dato",
+ "Response Messages":"Mensajes de la Respuesta",
+ "HTTP Status Code":"Código de Status HTTP",
+ "Reason":"Razón",
+ "Response Model":"Modelo de la Respuesta",
+ "Request URL":"URL de la Solicitud",
+ "Response Body":"Cuerpo de la Respuesta",
+ "Response Code":"Código de la Respuesta",
+ "Response Headers":"Encabezados de la Respuesta",
+ "Hide Response":"Ocultar Respuesta",
+ "Try it out!":"Pruébalo!",
+ "Show/Hide":"Mostrar/Ocultar",
+ "List Operations":"Listar Operaciones",
+ "Expand Operations":"Expandir Operaciones",
+ "Raw":"Crudo",
+ "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
+ "Example Value":"Valor de Ejemplo",
+ "Model Schema":"Esquema del Modelo",
+ "Model":"Modelo",
+ "apply":"aplicar",
+ "Username":"Nombre de usuario",
+ "Password":"Contraseña",
+ "Terms of service":"Términos de Servicio",
+ "Created by":"Creado por",
+ "See more at":"Ver más en",
+ "Contact the developer":"Contactar al desarrollador",
+ "api version":"versión de la api",
+ "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",
+ "fetching resource":"buscando recurso",
+ "fetching resource list":"buscando lista del recurso",
+ "Explore":"Explorar",
+ "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",
+ "Please specify the protocol for":"Por favor, especificar el protocola para",
+ "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",
+ "Unable to read api":"No se puede leer la api",
+ "from path":"desde ruta",
+ "server returned":"el servidor retornó"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/fr.js b/rest_framework_swagger/static/rest_framework_swagger/lang/fr.js
new file mode 100644
index 00000000..388dff14
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/fr.js
@@ -0,0 +1,54 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Avertissement : Obsolète",
+ "Implementation Notes":"Notes d'implémentation",
+ "Response Class":"Classe de la réponse",
+ "Status":"Statut",
+ "Parameters":"Paramètres",
+ "Parameter":"Paramètre",
+ "Value":"Valeur",
+ "Description":"Description",
+ "Parameter Type":"Type du paramètre",
+ "Data Type":"Type de données",
+ "Response Messages":"Messages de la réponse",
+ "HTTP Status Code":"Code de statut HTTP",
+ "Reason":"Raison",
+ "Response Model":"Modèle de réponse",
+ "Request URL":"URL appelée",
+ "Response Body":"Corps de la réponse",
+ "Response Code":"Code de la réponse",
+ "Response Headers":"En-têtes de la réponse",
+ "Hide Response":"Cacher la réponse",
+ "Headers":"En-têtes",
+ "Try it out!":"Testez !",
+ "Show/Hide":"Afficher/Masquer",
+ "List Operations":"Liste des opérations",
+ "Expand Operations":"Développer les opérations",
+ "Raw":"Brut",
+ "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut",
+ "Example Value":"Exemple la valeur",
+ "Model Schema":"Définition du modèle",
+ "Model":"Modèle",
+ "apply":"appliquer",
+ "Username":"Nom d'utilisateur",
+ "Password":"Mot de passe",
+ "Terms of service":"Conditions de service",
+ "Created by":"Créé par",
+ "See more at":"Voir plus sur",
+ "Contact the developer":"Contacter le développeur",
+ "api version":"version de l'api",
+ "Response Content Type":"Content Type de la réponse",
+ "fetching resource":"récupération de la ressource",
+ "fetching resource list":"récupération de la liste de ressources",
+ "Explore":"Explorer",
+ "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",
+ "Please specify the protocol for":"Veuillez spécifier un protocole pour",
+ "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",
+ "Unable to read api":"Impossible de lire l'api",
+ "from path":"à partir du chemin",
+ "server returned":"réponse du serveur"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/geo.js b/rest_framework_swagger/static/rest_framework_swagger/lang/geo.js
new file mode 100644
index 00000000..609c20d9
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/geo.js
@@ -0,0 +1,56 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"ყურადღება: აღარ გამოიყენება",
+ "Implementation Notes":"იმპლემენტაციის აღწერა",
+ "Response Class":"რესპონს კლასი",
+ "Status":"სტატუსი",
+ "Parameters":"პარამეტრები",
+ "Parameter":"პარამეტრი",
+ "Value":"მნიშვნელობა",
+ "Description":"აღწერა",
+ "Parameter Type":"პარამეტრის ტიპი",
+ "Data Type":"მონაცემის ტიპი",
+ "Response Messages":"პასუხი",
+ "HTTP Status Code":"HTTP სტატუსი",
+ "Reason":"მიზეზი",
+ "Response Model":"რესპონს მოდელი",
+ "Request URL":"მოთხოვნის URL",
+ "Response Body":"პასუხის სხეული",
+ "Response Code":"პასუხის კოდი",
+ "Response Headers":"პასუხის ჰედერები",
+ "Hide Response":"დამალე პასუხი",
+ "Headers":"ჰედერები",
+ "Try it out!":"ცადე !",
+ "Show/Hide":"გამოჩენა/დამალვა",
+ "List Operations":"ოპერაციების სია",
+ "Expand Operations":"ოპერაციები ვრცლად",
+ "Raw":"ნედლი",
+ "can't parse JSON. Raw result":"JSON-ის დამუშავება ვერ მოხერხდა. ნედლი პასუხი",
+ "Example Value":"მაგალითი",
+ "Model Schema":"მოდელის სტრუქტურა",
+ "Model":"მოდელი",
+ "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე",
+ "apply":"გამოყენება",
+ "Username":"მოხმარებელი",
+ "Password":"პაროლი",
+ "Terms of service":"მომსახურების პირობები",
+ "Created by":"შექმნა",
+ "See more at":"ნახე ვრცლად",
+ "Contact the developer":"დაუკავშირდი დეველოპერს",
+ "api version":"api ვერსია",
+ "Response Content Type":"პასუხის კონტენტის ტიპი",
+ "Parameter content type:":"პარამეტრის კონტენტის ტიპი:",
+ "fetching resource":"რესურსების მიღება",
+ "fetching resource list":"რესურსების სიის მიღება",
+ "Explore":"ნახვა",
+ "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.",
+ "Please specify the protocol for":"მიუთითეთ პროტოკოლი",
+ "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა",
+ "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება",
+ "Unable to read api":"api წაკითხვა ვერ მოხერხდა",
+ "from path":"მისამართიდან",
+ "server returned":"სერვერმა დააბრუნა"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/it.js b/rest_framework_swagger/static/rest_framework_swagger/lang/it.js
new file mode 100644
index 00000000..8529c2a9
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/it.js
@@ -0,0 +1,52 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Attenzione: Deprecato",
+ "Implementation Notes":"Note di implementazione",
+ "Response Class":"Classe della risposta",
+ "Status":"Stato",
+ "Parameters":"Parametri",
+ "Parameter":"Parametro",
+ "Value":"Valore",
+ "Description":"Descrizione",
+ "Parameter Type":"Tipo di parametro",
+ "Data Type":"Tipo di dato",
+ "Response Messages":"Messaggi della risposta",
+ "HTTP Status Code":"Codice stato HTTP",
+ "Reason":"Motivo",
+ "Response Model":"Modello di risposta",
+ "Request URL":"URL della richiesta",
+ "Response Body":"Corpo della risposta",
+ "Response Code":"Oggetto della risposta",
+ "Response Headers":"Intestazioni della risposta",
+ "Hide Response":"Nascondi risposta",
+ "Try it out!":"Provalo!",
+ "Show/Hide":"Mostra/Nascondi",
+ "List Operations":"Mostra operazioni",
+ "Expand Operations":"Espandi operazioni",
+ "Raw":"Grezzo (raw)",
+ "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",
+ "Model Schema":"Schema del modello",
+ "Model":"Modello",
+ "apply":"applica",
+ "Username":"Nome utente",
+ "Password":"Password",
+ "Terms of service":"Condizioni del servizio",
+ "Created by":"Creato da",
+ "See more at":"Informazioni aggiuntive:",
+ "Contact the developer":"Contatta lo sviluppatore",
+ "api version":"versione api",
+ "Response Content Type":"Tipo di contenuto (content type) della risposta",
+ "fetching resource":"recuperando la risorsa",
+ "fetching resource list":"recuperando lista risorse",
+ "Explore":"Esplora",
+ "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",
+ "Please specify the protocol for":"Si prega di specificare il protocollo per",
+ "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",
+ "Unable to read api":"Impossibile leggere la api",
+ "from path":"da cartella",
+ "server returned":"il server ha restituito"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/ja.js b/rest_framework_swagger/static/rest_framework_swagger/lang/ja.js
new file mode 100755
index 00000000..3207bfc0
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/ja.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"警告: 廃止予定",
+ "Implementation Notes":"実装メモ",
+ "Response Class":"レスポンスクラス",
+ "Status":"ステータス",
+ "Parameters":"パラメータ群",
+ "Parameter":"パラメータ",
+ "Value":"値",
+ "Description":"説明",
+ "Parameter Type":"パラメータタイプ",
+ "Data Type":"データタイプ",
+ "Response Messages":"レスポンスメッセージ",
+ "HTTP Status Code":"HTTPステータスコード",
+ "Reason":"理由",
+ "Response Model":"レスポンスモデル",
+ "Request URL":"リクエストURL",
+ "Response Body":"レスポンスボディ",
+ "Response Code":"レスポンスコード",
+ "Response Headers":"レスポンスヘッダ",
+ "Hide Response":"レスポンスを隠す",
+ "Headers":"ヘッダ",
+ "Try it out!":"実際に実行!",
+ "Show/Hide":"表示/非表示",
+ "List Operations":"操作一覧",
+ "Expand Operations":"操作の展開",
+ "Raw":"Raw",
+ "can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
+ "Model Schema":"モデルスキーマ",
+ "Model":"モデル",
+ "apply":"実行",
+ "Username":"ユーザ名",
+ "Password":"パスワード",
+ "Terms of service":"サービス利用規約",
+ "Created by":"Created by",
+ "See more at":"See more at",
+ "Contact the developer":"開発者に連絡",
+ "api version":"APIバージョン",
+ "Response Content Type":"レスポンス コンテンツタイプ",
+ "fetching resource":"リソースの取得",
+ "fetching resource list":"リソース一覧の取得",
+ "Explore":"Explore",
+ "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
+ "Please specify the protocol for":"プロトコルを指定してください",
+ "Can't read swagger JSON from":"次からswagger JSONを読み込めません",
+ "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています",
+ "Unable to read api":"APIを読み込めません",
+ "from path":"次のパスから",
+ "server returned":"サーバからの返答"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/pl.js b/rest_framework_swagger/static/rest_framework_swagger/lang/pl.js
new file mode 100644
index 00000000..ce41e917
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/pl.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Uwaga: Wycofane",
+ "Implementation Notes":"Uwagi Implementacji",
+ "Response Class":"Klasa Odpowiedzi",
+ "Status":"Status",
+ "Parameters":"Parametry",
+ "Parameter":"Parametr",
+ "Value":"Wartość",
+ "Description":"Opis",
+ "Parameter Type":"Typ Parametru",
+ "Data Type":"Typ Danych",
+ "Response Messages":"Wiadomości Odpowiedzi",
+ "HTTP Status Code":"Kod Statusu HTTP",
+ "Reason":"Przyczyna",
+ "Response Model":"Model Odpowiedzi",
+ "Request URL":"URL Wywołania",
+ "Response Body":"Treść Odpowiedzi",
+ "Response Code":"Kod Odpowiedzi",
+ "Response Headers":"Nagłówki Odpowiedzi",
+ "Hide Response":"Ukryj Odpowiedź",
+ "Headers":"Nagłówki",
+ "Try it out!":"Wypróbuj!",
+ "Show/Hide":"Pokaż/Ukryj",
+ "List Operations":"Lista Operacji",
+ "Expand Operations":"Rozwiń Operacje",
+ "Raw":"Nieprzetworzone",
+ "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane",
+ "Model Schema":"Schemat Modelu",
+ "Model":"Model",
+ "apply":"użyj",
+ "Username":"Nazwa użytkownika",
+ "Password":"Hasło",
+ "Terms of service":"Warunki używania",
+ "Created by":"Utworzone przez",
+ "See more at":"Zobacz więcej na",
+ "Contact the developer":"Kontakt z deweloperem",
+ "api version":"wersja api",
+ "Response Content Type":"Typ Zasobu Odpowiedzi",
+ "fetching resource":"ładowanie zasobu",
+ "fetching resource list":"ładowanie listy zasobów",
+ "Explore":"Eksploruj",
+ "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.",
+ "Please specify the protocol for":"Proszę podać protokół dla",
+ "Can't read swagger JSON from":"Nie można odczytać swagger JSON z",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI",
+ "Unable to read api":"Nie można odczytać api",
+ "from path":"ze ścieżki",
+ "server returned":"serwer zwrócił"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/pt.js b/rest_framework_swagger/static/rest_framework_swagger/lang/pt.js
new file mode 100644
index 00000000..f2e7c13d
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/pt.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Aviso: Depreciado",
+ "Implementation Notes":"Notas de Implementação",
+ "Response Class":"Classe de resposta",
+ "Status":"Status",
+ "Parameters":"Parâmetros",
+ "Parameter":"Parâmetro",
+ "Value":"Valor",
+ "Description":"Descrição",
+ "Parameter Type":"Tipo de parâmetro",
+ "Data Type":"Tipo de dados",
+ "Response Messages":"Mensagens de resposta",
+ "HTTP Status Code":"Código de status HTTP",
+ "Reason":"Razão",
+ "Response Model":"Modelo resposta",
+ "Request URL":"URL requisição",
+ "Response Body":"Corpo da resposta",
+ "Response Code":"Código da resposta",
+ "Response Headers":"Cabeçalho da resposta",
+ "Headers":"Cabeçalhos",
+ "Hide Response":"Esconder resposta",
+ "Try it out!":"Tente agora!",
+ "Show/Hide":"Mostrar/Esconder",
+ "List Operations":"Listar operações",
+ "Expand Operations":"Expandir operações",
+ "Raw":"Cru",
+ "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
+ "Model Schema":"Modelo esquema",
+ "Model":"Modelo",
+ "apply":"Aplicar",
+ "Username":"Usuário",
+ "Password":"Senha",
+ "Terms of service":"Termos do serviço",
+ "Created by":"Criado por",
+ "See more at":"Veja mais em",
+ "Contact the developer":"Contate o desenvolvedor",
+ "api version":"Versão api",
+ "Response Content Type":"Tipo de conteúdo da resposta",
+ "fetching resource":"busca recurso",
+ "fetching resource list":"buscando lista de recursos",
+ "Explore":"Explorar",
+ "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin",
+ "Please specify the protocol for":"Por favor especifique o protocolo",
+ "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI",
+ "Unable to read api":"Não foi possível ler api",
+ "from path":"do caminho",
+ "server returned":"servidor retornou"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/ru.js b/rest_framework_swagger/static/rest_framework_swagger/lang/ru.js
new file mode 100644
index 00000000..592744e9
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/ru.js
@@ -0,0 +1,56 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Предупреждение: Устарело",
+ "Implementation Notes":"Заметки",
+ "Response Class":"Пример ответа",
+ "Status":"Статус",
+ "Parameters":"Параметры",
+ "Parameter":"Параметр",
+ "Value":"Значение",
+ "Description":"Описание",
+ "Parameter Type":"Тип параметра",
+ "Data Type":"Тип данных",
+ "HTTP Status Code":"HTTP код",
+ "Reason":"Причина",
+ "Response Model":"Структура ответа",
+ "Request URL":"URL запроса",
+ "Response Body":"Тело ответа",
+ "Response Code":"HTTP код ответа",
+ "Response Headers":"Заголовки ответа",
+ "Hide Response":"Спрятать ответ",
+ "Headers":"Заголовки",
+ "Response Messages":"Что может прийти в ответ",
+ "Try it out!":"Попробовать!",
+ "Show/Hide":"Показать/Скрыть",
+ "List Operations":"Операции кратко",
+ "Expand Operations":"Операции подробно",
+ "Raw":"В сыром виде",
+ "can't parse JSON. Raw result":"Не удается распарсить ответ:",
+ "Example Value":"Пример",
+ "Model Schema":"Структура",
+ "Model":"Описание",
+ "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра",
+ "apply":"применить",
+ "Username":"Имя пользователя",
+ "Password":"Пароль",
+ "Terms of service":"Условия использования",
+ "Created by":"Разработано",
+ "See more at":"Еще тут",
+ "Contact the developer":"Связаться с разработчиком",
+ "api version":"Версия API",
+ "Response Content Type":"Content Type ответа",
+ "Parameter content type:":"Content Type параметра:",
+ "fetching resource":"Получение ресурса",
+ "fetching resource list":"Получение ресурсов",
+ "Explore":"Показать",
+ "Show Swagger Petstore Example Apis":"Показать примеры АПИ",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа",
+ "Please specify the protocol for":"Пожалуйста, укажите протокол для",
+ "Can't read swagger JSON from":"Не получается прочитать swagger json из",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",
+ "Unable to read api":"Не удалось прочитать api",
+ "from path":"по адресу",
+ "server returned":"сервер сказал"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/tr.js b/rest_framework_swagger/static/rest_framework_swagger/lang/tr.js
new file mode 100644
index 00000000..16426a9c
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/tr.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"Uyarı: Deprecated",
+ "Implementation Notes":"Gerçekleştirim Notları",
+ "Response Class":"Dönen Sınıf",
+ "Status":"Statü",
+ "Parameters":"Parametreler",
+ "Parameter":"Parametre",
+ "Value":"Değer",
+ "Description":"Açıklama",
+ "Parameter Type":"Parametre Tipi",
+ "Data Type":"Veri Tipi",
+ "Response Messages":"Dönüş Mesajı",
+ "HTTP Status Code":"HTTP Statü Kodu",
+ "Reason":"Gerekçe",
+ "Response Model":"Dönüş Modeli",
+ "Request URL":"İstek URL",
+ "Response Body":"Dönüş İçeriği",
+ "Response Code":"Dönüş Kodu",
+ "Response Headers":"Dönüş Üst Bilgileri",
+ "Hide Response":"Dönüşü Gizle",
+ "Headers":"Üst Bilgiler",
+ "Try it out!":"Dene!",
+ "Show/Hide":"Göster/Gizle",
+ "List Operations":"Operasyonları Listele",
+ "Expand Operations":"Operasyonları Aç",
+ "Raw":"Ham",
+ "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç",
+ "Model Schema":"Model Şema",
+ "Model":"Model",
+ "apply":"uygula",
+ "Username":"Kullanıcı Adı",
+ "Password":"Parola",
+ "Terms of service":"Servis şartları",
+ "Created by":"Oluşturan",
+ "See more at":"Daha fazlası için",
+ "Contact the developer":"Geliştirici ile İletişime Geçin",
+ "api version":"api versiyon",
+ "Response Content Type":"Dönüş İçerik Tipi",
+ "fetching resource":"kaynak getiriliyor",
+ "fetching resource list":"kaynak listesi getiriliyor",
+ "Explore":"Keşfet",
+ "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.",
+ "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz",
+ "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor",
+ "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor",
+ "Unable to read api":"api okunamadı",
+ "from path":"yoldan",
+ "server returned":"sunucuya dönüldü"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/translator.js b/rest_framework_swagger/static/rest_framework_swagger/lang/translator.js
new file mode 100644
index 00000000..ffb879f9
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/translator.js
@@ -0,0 +1,39 @@
+'use strict';
+
+/**
+ * Translator for documentation pages.
+ *
+ * To enable translation you should include one of language-files in your index.html
+ * after .
+ * For example -
+ *
+ * If you wish to translate some new texts you should do two things:
+ * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
+ * 2. Mark that text it templates this way New Phrase or .
+ * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.
+ *
+ */
+window.SwaggerTranslator = {
+
+ _words:[],
+
+ translate: function(sel) {
+ var $this = this;
+ sel = sel || '[data-sw-translate]';
+
+ $(sel).each(function() {
+ $(this).html($this._tryTranslate($(this).html()));
+
+ $(this).val($this._tryTranslate($(this).val()));
+ $(this).attr('title', $this._tryTranslate($(this).attr('title')));
+ });
+ },
+
+ _tryTranslate: function(word) {
+ return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
+ },
+
+ learn: function(wordsMap) {
+ this._words = wordsMap;
+ }
+};
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lang/zh-cn.js b/rest_framework_swagger/static/rest_framework_swagger/lang/zh-cn.js
new file mode 100644
index 00000000..570319ba
--- /dev/null
+++ b/rest_framework_swagger/static/rest_framework_swagger/lang/zh-cn.js
@@ -0,0 +1,53 @@
+'use strict';
+
+/* jshint quotmark: double */
+window.SwaggerTranslator.learn({
+ "Warning: Deprecated":"警告:已过时",
+ "Implementation Notes":"实现备注",
+ "Response Class":"响应类",
+ "Status":"状态",
+ "Parameters":"参数",
+ "Parameter":"参数",
+ "Value":"值",
+ "Description":"描述",
+ "Parameter Type":"参数类型",
+ "Data Type":"数据类型",
+ "Response Messages":"响应消息",
+ "HTTP Status Code":"HTTP状态码",
+ "Reason":"原因",
+ "Response Model":"响应模型",
+ "Request URL":"请求URL",
+ "Response Body":"响应体",
+ "Response Code":"响应码",
+ "Response Headers":"响应头",
+ "Hide Response":"隐藏响应",
+ "Headers":"头",
+ "Try it out!":"试一下!",
+ "Show/Hide":"显示/隐藏",
+ "List Operations":"显示操作",
+ "Expand Operations":"展开操作",
+ "Raw":"原始",
+ "can't parse JSON. Raw result":"无法解析JSON. 原始结果",
+ "Model Schema":"模型架构",
+ "Model":"模型",
+ "apply":"应用",
+ "Username":"用户名",
+ "Password":"密码",
+ "Terms of service":"服务条款",
+ "Created by":"创建者",
+ "See more at":"查看更多:",
+ "Contact the developer":"联系开发者",
+ "api version":"api版本",
+ "Response Content Type":"响应Content Type",
+ "fetching resource":"正在获取资源",
+ "fetching resource list":"正在获取资源列表",
+ "Explore":"浏览",
+ "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis",
+ "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。",
+ "Please specify the protocol for":"请指定协议:",
+ "Can't read swagger JSON from":"无法读取swagger JSON于",
+ "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI",
+ "Unable to read api":"无法读取api",
+ "from path":"从路径",
+ "server returned":"服务器返回"
+});
diff --git a/rest_framework_swagger/static/rest_framework_swagger/lib/backbone-min.js b/rest_framework_swagger/static/rest_framework_swagger/lib/backbone-min.js
deleted file mode 100755
index c1c0d4ff..00000000
--- a/rest_framework_swagger/static/rest_framework_swagger/lib/backbone-min.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Backbone.js 0.9.2
-
-// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks=
-{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g=
-z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent=
-{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null==
-b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent:
-b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)};
-a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error,
-h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t();
-return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending=
-{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length||
-!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator);
-this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?i(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!b?i(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,
-this.interval));this.fragment=a;a=window.location;b=a.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&b&&a.hash&&(this.fragment=this.getHash().replace(s,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},
-stop:function(){i(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);m.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe)));if(a==this.fragment)return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,
-function(a){if(a.route.test(b))return a.callback(b),!0})},navigate:function(a,b){if(!m.started)return!1;if(!b||!0===b)b={trigger:b};var c=(a||"").replace(s,"");this.fragment!=c&&(this._hasPushState?(0!=c.indexOf(this.options.root)&&(c=this.options.root+c),this.fragment=c,window.history[b.replace?"replaceState":"pushState"]({},document.title,c)):this._wantsHashChange?(this.fragment=c,this._updateHash(window.location,c,b.replace),this.iframe&&c!=this.getFragment(this.getHash(this.iframe))&&(b.replace||
-this.iframe.document.open().close(),this._updateHash(this.iframe.location,c,b.replace))):window.location.assign(this.options.root+a),b.trigger&&this.loadUrl(a))},_updateHash:function(a,b,c){c?a.replace(a.toString().replace(/(javascript:|#).*$/,"")+"#"+b):a.hash=b}});var v=g.View=function(a){this.cid=f.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()},F=/^(\S+)\s*(.*)$/,w="model,collection,el,id,attributes,className,tagName".split(",");
-f.extend(v.prototype,k,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(a,b,c){a=document.createElement(a);b&&i(a).attr(b);c&&i(a).html(c);return a},setElement:function(a,b){this.$el&&this.undelegateEvents();this.$el=a instanceof i?a:i(a);this.el=this.$el[0];!1!==b&&this.delegateEvents();return this},delegateEvents:function(a){if(a||(a=n(this,"events"))){this.undelegateEvents();
-for(var b in a){var c=a[b];f.isFunction(c)||(c=this[a[b]]);if(!c)throw Error('Method "'+a[b]+'" does not exist');var d=b.match(F),e=d[1],d=d[2],c=f.bind(c,this),e=e+(".delegateEvents"+this.cid);""===d?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(var b=0,c=w.length;b= 1.0.0'
-};
-
-Handlebars.helpers = {};
-Handlebars.partials = {};
-
-var toString = Object.prototype.toString,
- functionType = '[object Function]',
- objectType = '[object Object]';
-
-Handlebars.registerHelper = function(name, fn, inverse) {
- if (toString.call(name) === objectType) {
- if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); }
- Handlebars.Utils.extend(this.helpers, name);
- } else {
- if (inverse) { fn.not = inverse; }
- this.helpers[name] = fn;
- }
-};
-
-Handlebars.registerPartial = function(name, str) {
- if (toString.call(name) === objectType) {
- Handlebars.Utils.extend(this.partials, name);
- } else {
- this.partials[name] = str;
- }
-};
-
-Handlebars.registerHelper('helperMissing', function(arg) {
- if(arguments.length === 2) {
- return undefined;
- } else {
- throw new Error("Missing helper: '" + arg + "'");
- }
-});
-
-Handlebars.registerHelper('blockHelperMissing', function(context, options) {
- var inverse = options.inverse || function() {}, fn = options.fn;
-
- var type = toString.call(context);
-
- if(type === functionType) { context = context.call(this); }
-
- if(context === true) {
- return fn(this);
- } else if(context === false || context == null) {
- return inverse(this);
- } else if(type === "[object Array]") {
- if(context.length > 0) {
- return Handlebars.helpers.each(context, options);
- } else {
- return inverse(this);
- }
- } else {
- return fn(context);
- }
-});
-
-Handlebars.K = function() {};
-
-Handlebars.createFrame = Object.create || function(object) {
- Handlebars.K.prototype = object;
- var obj = new Handlebars.K();
- Handlebars.K.prototype = null;
- return obj;
-};
-
-Handlebars.logger = {
- DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
-
- methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
-
- // can be overridden in the host environment
- log: function(level, obj) {
- if (Handlebars.logger.level <= level) {
- var method = Handlebars.logger.methodMap[level];
- if (typeof console !== 'undefined' && console[method]) {
- console[method].call(console, obj);
- }
- }
- }
-};
-
-Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
-
-Handlebars.registerHelper('each', function(context, options) {
- var fn = options.fn, inverse = options.inverse;
- var i = 0, ret = "", data;
-
- var type = toString.call(context);
- if(type === functionType) { context = context.call(this); }
-
- if (options.data) {
- data = Handlebars.createFrame(options.data);
- }
-
- if(context && typeof context === 'object') {
- if(context instanceof Array){
- for(var j = context.length; i 2) {
- expected.push("'" + this.terminals_[p] + "'");
- }
- if (this.lexer.showPosition) {
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
- } else {
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
- }
- this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
- }
- }
- if (action[0] instanceof Array && action.length > 1) {
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
- }
- switch (action[0]) {
- case 1:
- stack.push(symbol);
- vstack.push(this.lexer.yytext);
- lstack.push(this.lexer.yylloc);
- stack.push(action[1]);
- symbol = null;
- if (!preErrorSymbol) {
- yyleng = this.lexer.yyleng;
- yytext = this.lexer.yytext;
- yylineno = this.lexer.yylineno;
- yyloc = this.lexer.yylloc;
- if (recovering > 0)
- recovering--;
- } else {
- symbol = preErrorSymbol;
- preErrorSymbol = null;
- }
- break;
- case 2:
- len = this.productions_[action[1]][1];
- yyval.$ = vstack[vstack.length - len];
- yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
- if (ranges) {
- yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
- }
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
- if (typeof r !== "undefined") {
- return r;
- }
- if (len) {
- stack = stack.slice(0, -1 * len * 2);
- vstack = vstack.slice(0, -1 * len);
- lstack = lstack.slice(0, -1 * len);
- }
- stack.push(this.productions_[action[1]][0]);
- vstack.push(yyval.$);
- lstack.push(yyval._$);
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
- stack.push(newState);
- break;
- case 3:
- return true;
- }
- }
- return true;
-}
-};
-/* Jison generated lexer */
-var lexer = (function(){
-var lexer = ({EOF:1,
-parseError:function parseError(str, hash) {
- if (this.yy.parser) {
- this.yy.parser.parseError(str, hash);
- } else {
- throw new Error(str);
- }
- },
-setInput:function (input) {
- this._input = input;
- this._more = this._less = this.done = false;
- this.yylineno = this.yyleng = 0;
- this.yytext = this.matched = this.match = '';
- this.conditionStack = ['INITIAL'];
- this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
- if (this.options.ranges) this.yylloc.range = [0,0];
- this.offset = 0;
- return this;
- },
-input:function () {
- var ch = this._input[0];
- this.yytext += ch;
- this.yyleng++;
- this.offset++;
- this.match += ch;
- this.matched += ch;
- var lines = ch.match(/(?:\r\n?|\n).*/g);
- if (lines) {
- this.yylineno++;
- this.yylloc.last_line++;
- } else {
- this.yylloc.last_column++;
- }
- if (this.options.ranges) this.yylloc.range[1]++;
-
- this._input = this._input.slice(1);
- return ch;
- },
-unput:function (ch) {
- var len = ch.length;
- var lines = ch.split(/(?:\r\n?|\n)/g);
-
- this._input = ch + this._input;
- this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
- //this.yyleng -= len;
- this.offset -= len;
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
- this.match = this.match.substr(0, this.match.length-1);
- this.matched = this.matched.substr(0, this.matched.length-1);
-
- if (lines.length-1) this.yylineno -= lines.length-1;
- var r = this.yylloc.range;
-
- this.yylloc = {first_line: this.yylloc.first_line,
- last_line: this.yylineno+1,
- first_column: this.yylloc.first_column,
- last_column: lines ?
- (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
- this.yylloc.first_column - len
- };
-
- if (this.options.ranges) {
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
- }
- return this;
- },
-more:function () {
- this._more = true;
- return this;
- },
-less:function (n) {
- this.unput(this.match.slice(n));
- },
-pastInput:function () {
- var past = this.matched.substr(0, this.matched.length - this.match.length);
- return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
- },
-upcomingInput:function () {
- var next = this.match;
- if (next.length < 20) {
- next += this._input.substr(0, 20-next.length);
- }
- return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
- },
-showPosition:function () {
- var pre = this.pastInput();
- var c = new Array(pre.length + 1).join("-");
- return pre + this.upcomingInput() + "\n" + c+"^";
- },
-next:function () {
- if (this.done) {
- return this.EOF;
- }
- if (!this._input) this.done = true;
-
- var token,
- match,
- tempMatch,
- index,
- col,
- lines;
- if (!this._more) {
- this.yytext = '';
- this.match = '';
- }
- var rules = this._currentRules();
- for (var i=0;i < rules.length; i++) {
- tempMatch = this._input.match(this.rules[rules[i]]);
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
- match = tempMatch;
- index = i;
- if (!this.options.flex) break;
- }
- }
- if (match) {
- lines = match[0].match(/(?:\r\n?|\n).*/g);
- if (lines) this.yylineno += lines.length;
- this.yylloc = {first_line: this.yylloc.last_line,
- last_line: this.yylineno+1,
- first_column: this.yylloc.last_column,
- last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
- this.yytext += match[0];
- this.match += match[0];
- this.matches = match;
- this.yyleng = this.yytext.length;
- if (this.options.ranges) {
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
- }
- this._more = false;
- this._input = this._input.slice(match[0].length);
- this.matched += match[0];
- token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
- if (this.done && this._input) this.done = false;
- if (token) return token;
- else return;
- }
- if (this._input === "") {
- return this.EOF;
- } else {
- return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
- {text: "", token: null, line: this.yylineno});
- }
- },
-lex:function lex() {
- var r = this.next();
- if (typeof r !== 'undefined') {
- return r;
- } else {
- return this.lex();
- }
- },
-begin:function begin(condition) {
- this.conditionStack.push(condition);
- },
-popState:function popState() {
- return this.conditionStack.pop();
- },
-_currentRules:function _currentRules() {
- return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
- },
-topState:function () {
- return this.conditionStack[this.conditionStack.length-2];
- },
-pushState:function begin(condition) {
- this.begin(condition);
- }});
-lexer.options = {};
-lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
-
-var YYSTATE=YY_START
-switch($avoiding_name_collisions) {
-case 0: yy_.yytext = "\\"; return 14;
-break;
-case 1:
- if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
- if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
- if(yy_.yytext) return 14;
-
-break;
-case 2: return 14;
-break;
-case 3:
- if(yy_.yytext.slice(-1) !== "\\") this.popState();
- if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
- return 14;
-
-break;
-case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15;
-break;
-case 5: return 25;
-break;
-case 6: return 16;
-break;
-case 7: return 20;
-break;
-case 8: return 19;
-break;
-case 9: return 19;
-break;
-case 10: return 23;
-break;
-case 11: return 22;
-break;
-case 12: this.popState(); this.begin('com');
-break;
-case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
-break;
-case 14: return 22;
-break;
-case 15: return 37;
-break;
-case 16: return 36;
-break;
-case 17: return 36;
-break;
-case 18: return 40;
-break;
-case 19: /*ignore whitespace*/
-break;
-case 20: this.popState(); return 24;
-break;
-case 21: this.popState(); return 18;
-break;
-case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31;
-break;
-case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31;
-break;
-case 24: return 38;
-break;
-case 25: return 33;
-break;
-case 26: return 33;
-break;
-case 27: return 32;
-break;
-case 28: return 36;
-break;
-case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36;
-break;
-case 30: return 'INVALID';
-break;
-case 31: return 5;
-break;
-}
-};
-lexer.rules = [/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];
-lexer.conditions = {"mu":{"rules":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":false},"emu":{"rules":[3],"inclusive":false},"com":{"rules":[4],"inclusive":false},"INITIAL":{"rules":[0,1,2,31],"inclusive":true}};
-return lexer;})()
-parser.lexer = lexer;
-function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
-return new Parser;
-})();;
-// lib/handlebars/compiler/base.js
-
-Handlebars.Parser = handlebars;
-
-Handlebars.parse = function(input) {
-
- // Just return if an already-compile AST was passed in.
- if(input.constructor === Handlebars.AST.ProgramNode) { return input; }
-
- Handlebars.Parser.yy = Handlebars.AST;
- return Handlebars.Parser.parse(input);
-};
-;
-// lib/handlebars/compiler/ast.js
-Handlebars.AST = {};
-
-Handlebars.AST.ProgramNode = function(statements, inverse) {
- this.type = "program";
- this.statements = statements;
- if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
-};
-
-Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {
- this.type = "mustache";
- this.escaped = !unescaped;
- this.hash = hash;
-
- var id = this.id = rawParams[0];
- var params = this.params = rawParams.slice(1);
-
- // a mustache is an eligible helper if:
- // * its id is simple (a single part, not `this` or `..`)
- var eligibleHelper = this.eligibleHelper = id.isSimple;
-
- // a mustache is definitely a helper if:
- // * it is an eligible helper, and
- // * it has at least one parameter or hash segment
- this.isHelper = eligibleHelper && (params.length || hash);
-
- // if a mustache is an eligible helper but not a definite
- // helper, it is ambiguous, and will be resolved in a later
- // pass or at runtime.
-};
-
-Handlebars.AST.PartialNode = function(partialName, context) {
- this.type = "partial";
- this.partialName = partialName;
- this.context = context;
-};
-
-Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {
- var verifyMatch = function(open, close) {
- if(open.original !== close.original) {
- throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
- }
- };
-
- verifyMatch(mustache.id, close);
- this.type = "block";
- this.mustache = mustache;
- this.program = program;
- this.inverse = inverse;
-
- if (this.inverse && !this.program) {
- this.isInverse = true;
- }
-};
-
-Handlebars.AST.ContentNode = function(string) {
- this.type = "content";
- this.string = string;
-};
-
-Handlebars.AST.HashNode = function(pairs) {
- this.type = "hash";
- this.pairs = pairs;
-};
-
-Handlebars.AST.IdNode = function(parts) {
- this.type = "ID";
-
- var original = "",
- dig = [],
- depth = 0;
-
- for(var i=0,l=parts.length; i 0) { throw new Handlebars.Exception("Invalid path: " + original); }
- else if (part === "..") { depth++; }
- else { this.isScoped = true; }
- }
- else { dig.push(part); }
- }
-
- this.original = original;
- this.parts = dig;
- this.string = dig.join('.');
- this.depth = depth;
-
- // an ID is simple if it only has one part, and that part is not
- // `..` or `this`.
- this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;
-
- this.stringModeValue = this.string;
-};
-
-Handlebars.AST.PartialNameNode = function(name) {
- this.type = "PARTIAL_NAME";
- this.name = name.original;
-};
-
-Handlebars.AST.DataNode = function(id) {
- this.type = "DATA";
- this.id = id;
-};
-
-Handlebars.AST.StringNode = function(string) {
- this.type = "STRING";
- this.original =
- this.string =
- this.stringModeValue = string;
-};
-
-Handlebars.AST.IntegerNode = function(integer) {
- this.type = "INTEGER";
- this.original =
- this.integer = integer;
- this.stringModeValue = Number(integer);
-};
-
-Handlebars.AST.BooleanNode = function(bool) {
- this.type = "BOOLEAN";
- this.bool = bool;
- this.stringModeValue = bool === "true";
-};
-
-Handlebars.AST.CommentNode = function(comment) {
- this.type = "comment";
- this.comment = comment;
-};
-;
-// lib/handlebars/utils.js
-
-var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
-
-Handlebars.Exception = function(message) {
- var tmp = Error.prototype.constructor.apply(this, arguments);
-
- // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
- for (var idx = 0; idx < errorProps.length; idx++) {
- this[errorProps[idx]] = tmp[errorProps[idx]];
- }
-};
-Handlebars.Exception.prototype = new Error();
-
-// Build out our basic SafeString type
-Handlebars.SafeString = function(string) {
- this.string = string;
-};
-Handlebars.SafeString.prototype.toString = function() {
- return this.string.toString();
-};
-
-var escape = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- "`": "`"
-};
-
-var badChars = /[&<>"'`]/g;
-var possible = /[&<>"'`]/;
-
-var escapeChar = function(chr) {
- return escape[chr] || "&";
-};
-
-Handlebars.Utils = {
- extend: function(obj, value) {
- for(var key in value) {
- if(value.hasOwnProperty(key)) {
- obj[key] = value[key];
- }
- }
- },
-
- escapeExpression: function(string) {
- // don't escape SafeStrings, since they're already safe
- if (string instanceof Handlebars.SafeString) {
- return string.toString();
- } else if (string == null || string === false) {
- return "";
- }
-
- // Force a string conversion as this will be done by the append regardless and
- // the regex test will do this transparently behind the scenes, causing issues if
- // an object's to string has escaped characters in it.
- string = string.toString();
-
- if(!possible.test(string)) { return string; }
- return string.replace(badChars, escapeChar);
- },
-
- isEmpty: function(value) {
- if (!value && value !== 0) {
- return true;
- } else if(toString.call(value) === "[object Array]" && value.length === 0) {
- return true;
- } else {
- return false;
- }
- }
-};
-;
-// lib/handlebars/compiler/compiler.js
-
-/*jshint eqnull:true*/
-var Compiler = Handlebars.Compiler = function() {};
-var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {};
-
-// the foundHelper register will disambiguate helper lookup from finding a
-// function in a context. This is necessary for mustache compatibility, which
-// requires that context functions in blocks are evaluated by blockHelperMissing,
-// and then proceed as if the resulting value was provided to blockHelperMissing.
-
-Compiler.prototype = {
- compiler: Compiler,
-
- disassemble: function() {
- var opcodes = this.opcodes, opcode, out = [], params, param;
-
- for (var i=0, l=opcodes.length; i 0) {
- this.source[1] = this.source[1] + ", " + locals.join(", ");
- }
-
- // Generate minimizer alias mappings
- if (!this.isChild) {
- for (var alias in this.context.aliases) {
- if (this.context.aliases.hasOwnProperty(alias)) {
- this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
- }
- }
- }
-
- if (this.source[1]) {
- this.source[1] = "var " + this.source[1].substring(2) + ";";
- }
-
- // Merge children
- if (!this.isChild) {
- this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
- }
-
- if (!this.environment.isSimple) {
- this.source.push("return buffer;");
- }
-
- var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
-
- for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
- return this.topStackName();
- },
- topStackName: function() {
- return "stack" + this.stackSlot;
- },
- flushInline: function() {
- var inlineStack = this.inlineStack;
- if (inlineStack.length) {
- this.inlineStack = [];
- for (var i = 0, len = inlineStack.length; i < len; i++) {
- var entry = inlineStack[i];
- if (entry instanceof Literal) {
- this.compileStack.push(entry);
- } else {
- this.pushStack(entry);
- }
- }
- }
- },
- isInline: function() {
- return this.inlineStack.length;
- },
-
- popStack: function(wrapped) {
- var inline = this.isInline(),
- item = (inline ? this.inlineStack : this.compileStack).pop();
-
- if (!wrapped && (item instanceof Literal)) {
- return item.value;
- } else {
- if (!inline) {
- this.stackSlot--;
- }
- return item;
- }
- },
-
- topStack: function(wrapped) {
- var stack = (this.isInline() ? this.inlineStack : this.compileStack),
- item = stack[stack.length - 1];
-
- if (!wrapped && (item instanceof Literal)) {
- return item.value;
- } else {
- return item;
- }
- },
-
- quotedString: function(str) {
- return '"' + str
- .replace(/\\/g, '\\\\')
- .replace(/"/g, '\\"')
- .replace(/\n/g, '\\n')
- .replace(/\r/g, '\\r')
- .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
- .replace(/\u2029/g, '\\u2029') + '"';
- },
-
- setupHelper: function(paramSize, name, missingParams) {
- var params = [];
- this.setupParams(paramSize, params, missingParams);
- var foundHelper = this.nameLookup('helpers', name, 'helper');
-
- return {
- params: params,
- name: foundHelper,
- callParams: ["depth0"].concat(params).join(", "),
- helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ")
- };
- },
-
- // the params and contexts arguments are passed in arrays
- // to fill in
- setupParams: function(paramSize, params, useRegister) {
- var options = [], contexts = [], types = [], param, inverse, program;
-
- options.push("hash:" + this.popStack());
-
- inverse = this.popStack();
- program = this.popStack();
-
- // Avoid setting fn and inverse if neither are set. This allows
- // helpers to do a check for `if (options.fn)`
- if (program || inverse) {
- if (!program) {
- this.context.aliases.self = "this";
- program = "self.noop";
- }
-
- if (!inverse) {
- this.context.aliases.self = "this";
- inverse = "self.noop";
- }
-
- options.push("inverse:" + inverse);
- options.push("fn:" + program);
- }
-
- for(var i=0; i/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=(""+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q'+L[0]+""}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+=""}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"",rE:true,sL:"css"}},{cN:"tag",b:"
\ No newline at end of file
diff --git a/rest_framework_swagger/static/rest_framework_swagger/swagger-ui.js b/rest_framework_swagger/static/rest_framework_swagger/swagger-ui.js
old mode 100755
new mode 100644
index 7da10354..1d0c635c
--- a/rest_framework_swagger/static/rest_framework_swagger/swagger-ui.js
+++ b/rest_framework_swagger/static/rest_framework_swagger/swagger-ui.js
@@ -1,22 +1,141 @@
+/**
+ * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
+ * @version v2.1.4
+ * @link http://swagger.io
+ * @license Apache-2.0
+ */
+(function(){this["Handlebars"] = this["Handlebars"] || {};
+this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
+this["Handlebars"]["templates"]["apikey_auth"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+ return " "
+ + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
+ + "\n";
+},"3":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n";
+},"useData":true});
+this["Handlebars"]["templates"]["auth_button_operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ return " authorize__btn_operation_login\n";
+ },"3":function(depth0,helpers,partials,data) {
+ return " authorize__btn_operation_logout\n";
+ },"5":function(depth0,helpers,partials,data) {
+ var stack1, buffer = " \n";
+ stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.scopes : depth0), {"name":"each","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ return buffer + "
\n";
+},"6":function(depth0,helpers,partials,data) {
+ var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+ return " "
+ + escapeExpression(((helper = (helper = helpers.scope || (depth0 != null ? depth0.scope : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"scope","hash":{},"data":data}) : helper)))
+ + "\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ var stack1, buffer = "\n";
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.scopes : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ return buffer + "
\n";
+},"useData":true});
+this["Handlebars"]["templates"]["auth_button"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ return "Authorize\n";
+ },"useData":true});
+this["Handlebars"]["templates"]["auth_view"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"3":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ var stack1, buffer = "\n\n
\n
\n";
+ stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isAuthorized : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ return buffer + "
\n\n
\n";
+},"useData":true});
+this["Handlebars"]["templates"]["basic_auth"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ return " - authorized";
+ },"3":function(depth0,helpers,partials,data) {
+ var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+ return " "
+ + escapeExpression(((helper = (helper = helpers.username || (depth0 != null ? depth0.username : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"username","hash":{},"data":data}) : helper)))
+ + "\n";
+},"5":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"7":function(depth0,helpers,partials,data) {
+ return " \n password:\n \n
\n";
+ },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n
Basic authentication";
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ buffer += "
\n
\n
\n";
+},"useData":true});
+this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ var stack1, buffer = "";
+ stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ return buffer;
+},"2":function(depth0,helpers,partials,data) {
+ var lambda=this.lambda, escapeExpression=this.escapeExpression;
+ return " \n";
+},"4":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n\n";
+},"useData":true});
+'use strict';
+
+
$(function() {
// Helper function for vertically aligning DOM elements
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
$.fn.vAlign = function() {
- return this.each(function(i){
- var ah = $(this).height();
- var ph = $(this).parent().height();
- var mh = (ph - ah) / 2;
- $(this).css('margin-top', mh);
+ return this.each(function(){
+ var ah = $(this).height();
+ var ph = $(this).parent().height();
+ var mh = (ph - ah) / 2;
+ $(this).css('margin-top', mh);
});
};
$.fn.stretchFormtasticInputWidthToParent = function() {
- return this.each(function(i){
- var p_width = $(this).closest("form").innerWidth();
- var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
- var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
- $(this).css('width', p_width - p_padding - this_padding);
+ return this.each(function(){
+ var p_width = $(this).closest("form").innerWidth();
+ var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10);
+ var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
+ $(this).css('width', p_width - p_padding - this_padding);
});
};
@@ -38,7 +157,7 @@ $(function() {
$(this).removeClass('error');
// Tack the error style on if the input is empty..
- if ($(this).val() == '') {
+ if ($(this).val() === '') {
$(this).addClass('error');
$(this).wiggle();
error_free = false;
@@ -51,7 +170,7 @@ $(function() {
});
-function clippyCopiedCallback(a) {
+function clippyCopiedCallback() {
$('#api_key_copied').fadeIn().delay(1000).fadeOut();
// var b = $("#clippy_tooltip_" + a);
@@ -62,16 +181,16 @@ function clippyCopiedCallback(a) {
}
// Logging function that accounts for browsers that don't have window.console
-log = function(){
+function log(){
log.history = log.history || [];
log.history.push(arguments);
if(this.console){
- console.log( Array.prototype.slice.call(arguments) );
+ console.log( Array.prototype.slice.call(arguments)[0] );
}
-};
+}
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
-if (Function.prototype.bind && console && typeof console.log == "object") {
+if (Function.prototype.bind && console && typeof console.log === "object") {
[
"log","info","warn","error","assert","dir","clear","profile","profileEnd"
].forEach(function (method) {
@@ -79,7 +198,7 @@ if (Function.prototype.bind && console && typeof console.log == "object") {
}, Function.prototype.call);
}
-var Docs = {
+window.Docs = {
shebang: function() {
@@ -90,40 +209,39 @@ var Docs = {
switch (fragments.length) {
case 1:
- // Expand all operations for the resource and scroll to it
- log('shebang resource:' + fragments[0]);
- var dom_id = 'resource_' + fragments[0];
+ if (fragments[0].length > 0) { // prevent matching "#/"
+ // Expand all operations for the resource and scroll to it
+ var dom_id = 'resource_' + fragments[0];
- Docs.expandEndpointListForResource(fragments[0]);
- $("#"+dom_id).slideto({highlight: false});
+ Docs.expandEndpointListForResource(fragments[0]);
+ $("#"+dom_id).slideto({highlight: false});
+ }
break;
case 2:
// Refer to the endpoint DOM element, e.g. #words_get_search
- log('shebang endpoint: ' + fragments.join('_'));
// Expand Resource
Docs.expandEndpointListForResource(fragments[0]);
$("#"+dom_id).slideto({highlight: false});
- // Expand operation
- var li_dom_id = fragments.join('_');
- var li_content_dom_id = li_dom_id + "_content";
+ // Expand operation
+ var li_dom_id = fragments.join('_');
+ var li_content_dom_id = li_dom_id + "_content";
- log("li_dom_id " + li_dom_id);
- log("li_content_dom_id " + li_content_dom_id);
- Docs.expandOperation($('#'+li_content_dom_id));
- $('#'+li_dom_id).slideto({highlight: false});
- break;
+ Docs.expandOperation($('#'+li_content_dom_id));
+ $('#'+li_dom_id).slideto({highlight: false});
+ break;
}
-
},
toggleEndpointListForResource: function(resource) {
var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');
if (elem.is(':visible')) {
+ $.bbq.pushState('#/', 2);
Docs.collapseEndpointListForResource(resource);
} else {
+ $.bbq.pushState('#/' + resource, 2);
Docs.expandEndpointListForResource(resource);
}
},
@@ -135,7 +253,7 @@ var Docs = {
$('.resource ul.endpoints').slideDown();
return;
}
-
+
$('li#resource_' + resource).addClass('active');
var elem = $('li#resource_' + resource + ' ul.endpoints');
@@ -145,6 +263,11 @@ var Docs = {
// Collapse resource and mark as explicitly closed
collapseEndpointListForResource: function(resource) {
var resource = Docs.escapeResourceName(resource);
+ if (resource == '') {
+ $('.resource ul.endpoints').slideUp();
+ return;
+ }
+
$('li#resource_' + resource).removeClass('active');
var elem = $('li#resource_' + resource + ' ul.endpoints');
@@ -154,7 +277,7 @@ var Docs = {
expandOperationsForResource: function(resource) {
// Make sure the resource container is open..
Docs.expandEndpointListForResource(resource);
-
+
if (resource == '') {
$('.resource ul.endpoints li.operation div.content').slideDown();
return;
@@ -169,6 +292,11 @@ var Docs = {
// Make sure the resource container is open..
Docs.expandEndpointListForResource(resource);
+ if (resource == '') {
+ $('.resource ul.endpoints li.operation div.content').slideUp();
+ return;
+ }
+
$('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
Docs.collapseOperation($(this));
});
@@ -185,2063 +313,22294 @@ var Docs = {
collapseOperation: function(elem) {
elem.slideUp();
}
-};(function() {
- var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['content_type'] = template(function (Handlebars,depth0,helpers,partials,data) {
- this.compilerInfo = [4,'>= 1.0.0'];
-helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
- var buffer = "", stack1, functionType="function", self=this;
-
-function program1(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n ";
- stack1 = helpers.each.call(depth0, depth0.produces, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
- if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n";
- return buffer;
- }
-function program2(depth0,data) {
-
- var buffer = "", stack1;
- buffer += "\n \n ";
- return buffer;
- }
+};
-function program4(depth0,data) {
-
-
- return "\n \n";
- }
+'use strict';
+/*jslint eqeq: true*/
- buffer += "\n\n";
- return buffer;
- });
-})();
+Handlebars.registerHelper('sanitize', function(html) {
+ // Strip the script tags from the html, and return it as a Handlebars.SafeString
+ html = html.replace(/
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% endblock %}
-
+
+
+
+
+
+
+