Skip to content

Commit 981df50

Browse files
committed
Add title to version example
1 parent 11bf280 commit 981df50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/customization.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Here are a few basic areas which can be customized:
1111
- `{% block user_context_message %}` Customize the "Hello, user" message (Django session only)
1212
- `{% block extra_nav %}` Placeholder for additional content in the nav bar.
1313

14+
15+
## Version Headers
1416
The following would append a version number to every request, which is required
1517
with `rest_framework.versioning.AcceptHeaderVersioning`.
1618
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.
2628
obj.headers['Accept'] += '; version=1.0';
2729
return true;
2830
};
29-
swaggerUi.api.clientAuthorizations.add('api_version',
30-
new ApiVersionAuthorization());
31+
swaggerUi.api.clientAuthorizations.add(
32+
'api_version',
33+
new ApiVersionAuthorization()
34+
);
3135
});
3236
</script>
3337
{% endblock extra_scripts %}

0 commit comments

Comments
 (0)