Skip to content

Commit fce4d83

Browse files
authored
Merge pull request postmanlabs#485 from steffenschroeder/master
Fixed postmanlabs#484 by correcting templates
2 parents 4cb4b15 + 4db88df commit fce4d83

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:18.04
22

33
LABEL name="httpbin"
4-
LABEL version="0.9.1"
4+
LABEL version="0.9.2"
55
LABEL description="A simple HTTP service."
66
LABEL org.kennethreitz.vendor="Kenneth Reitz"
77

httpbin/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.1
1+
0.9.2

httpbin/templates/flasgger/index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<hgroup class="main">
8888
<h2 class="title">httpbin.org
8989
<small>
90-
<pre class="version">0.9.1</pre>
90+
<pre class="version">0.9.2</pre>
9191
</small>
9292
</h2>
9393
<pre class="base-url">[ Base URL: httpbin.org/ ]</pre>
@@ -137,14 +137,14 @@ <h2 class="title">httpbin.org
137137

138138
<script src="{{url_for('flasgger.static', filename='swagger-ui-bundle.js')}}"> </script>
139139
<script src="{{url_for('flasgger.static', filename='swagger-ui-standalone-preset.js')}}"> </script>
140-
<script src='{{url_for(' flasgger.static ', filename=' ')}}lib/jquery.min.js' type='text/javascript'></script>
140+
<script src='{{url_for('flasgger.static', filename=' ')}}lib/jquery.min.js' type='text/javascript'></script>
141141
<script>
142142

143143
window.onload = function () {
144-
{% if config.JWT_AUTH_URL_RULE -%}
144+
{% if config.JWT_AUTH_URL_RULE %}
145145
// JWT token holder
146146
var jwt_token;
147-
{% - endif %}
147+
{% endif %}
148148

149149
fetch("{{ specs[0]['url'] }}")
150150
.then(function (response) {
@@ -177,7 +177,7 @@ <h2 class="title">httpbin.org
177177
plugins: [
178178
SwaggerUIBundle.plugins.DownloadUrl
179179
],
180-
{% if config.JWT_AUTH_URL_RULE -%}
180+
{% if config.JWT_AUTH_URL_RULE %}
181181
requestInterceptor: function (request) {
182182
if (jwt_token) {
183183
request.headers.Authorization = "Bearer " + jwt_token;
@@ -195,7 +195,7 @@ <h2 class="title">httpbin.org
195195

196196
return response;
197197
},
198-
{% - endif %}
198+
{% endif %}
199199
// layout: "StandaloneLayout" // uncomment to enable the green top header
200200
})
201201

test_httpbin.py

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ def setUp(self):
114114
httpbin.app.debug = True
115115
self.app = httpbin.app.test_client()
116116

117+
def test_index(self):
118+
response = self.app.get('/', headers={'User-Agent': 'test'})
119+
self.assertEqual(response.status_code, 200)
120+
117121
def get_data(self, response):
118122
if 'get_data' in dir(response):
119123
return response.get_data()

0 commit comments

Comments
 (0)