Skip to content

Commit

Permalink
Version 2.0.12
Browse files Browse the repository at this point in the history
* Pinned jsonschema to 3.2.0 to solve a serious issue with the interaction
  between bravado core and jsonschema (see: python-jsonschema/jsonschema#847)
* Fixed a bug in the order of route handling when it is desired to serve the UI and to allow
  subpaths in the Swagger API that aren't strictly defined by the specification.
  • Loading branch information
rpcope1 committed Dec 15, 2021
1 parent c347464 commit 1dde942
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions bottle_swagger/__init__.py
@@ -1,4 +1,4 @@
__version__ = (2, 0, 11)
__version__ = (2, 0, 12)

import os
import re
Expand Down Expand Up @@ -416,12 +416,12 @@ def _swagger_validate(self, callback, route, *args, **kwargs):
swagger_op = self._swagger_op(route)

if not swagger_op:
if not route.rule.startswith(self.swagger_base_path) or self.ignore_undefined_routes:
return callback(*args, **kwargs)
elif self.serve_swagger_schema and route.rule == self.swagger_schema_url:
if self.serve_swagger_schema and route.rule == self.swagger_schema_url:
return callback(*args, **kwargs)
elif self.serve_swagger_ui and route.rule.startswith(self.swagger_ui_base_url):
return callback(*args, **kwargs)
elif not route.rule.startswith(self.swagger_base_path) or self.ignore_undefined_routes:
return callback(*args, **kwargs)
else:
return self.swagger_op_not_found_handler(route)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
@@ -1,4 +1,4 @@
bottle
jsonschema
jsonschema==3.2.0
bravado-core
six
six
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -11,7 +11,7 @@ def _read(fname):


REQUIREMENTS = [l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')]
VERSION = '2.0.11'
VERSION = '2.0.12'

setup(
name='bottle-swagger-2',
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist=py35,py36,py37,py38
envlist=py35,py36,py37,py38,py39,py310

[testenv]
commands=coverage run --source bottle_swagger -m unittest discover test_bottle_swagger
Expand All @@ -11,4 +11,4 @@ commands=coverage erase
[testenv:stats]
commands=
coverage report
coverage html
coverage html

0 comments on commit 1dde942

Please sign in to comment.