File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ Here are a few basic areas which can be customized:
11
11
- ` {% block user_context_message %} ` Customize the "Hello, user" message (Django session only)
12
12
- ` {% block extra_nav %} ` Placeholder for additional content in the nav bar.
13
13
14
+
15
+ ## Version Headers
14
16
The following would append a version number to every request, which is required
15
17
with ` rest_framework.versioning.AcceptHeaderVersioning ` .
16
18
This should go into ` rest_framework_swagger/index.html ` in your template path.
@@ -26,8 +28,10 @@ This should go into `rest_framework_swagger/index.html` in your template path.
26
28
obj .headers [' Accept' ] += ' ; version=1.0' ;
27
29
return true ;
28
30
};
29
- swaggerUi .api .clientAuthorizations .add (' api_version' ,
30
- new ApiVersionAuthorization ());
31
+ swaggerUi .api .clientAuthorizations .add (
32
+ ' api_version' ,
33
+ new ApiVersionAuthorization ()
34
+ );
31
35
});
32
36
</script >
33
37
{% endblock extra_scripts %}
You can’t perform that action at this time.
0 commit comments