diff --git a/api-guide/schemas/index.html b/api-guide/schemas/index.html index 46564b18b..1664341f3 100644 --- a/api-guide/schemas/index.html +++ b/api-guide/schemas/index.html @@ -475,7 +475,8 @@ urlpatterns = [ # * Provide view name for use with `reverse()`. path('openapi', get_schema_view( title="Your Project", - description="API for all things …" + description="API for all things …", + version="1.0.0" ), name='openapi-schema'), # ... ] @@ -486,6 +487,7 @@ urlpatterns = [
title
: May be used to provide a descriptive title for the schema definition.description
: Longer descriptive text.version
: The version of the API. Defaults to 0.1.0
.url
: May be used to pass a canonical base URL for the schema.
schema_view = get_schema_view(
@@ -549,6 +551,7 @@ view and collates the resulting OpenAPI schema.
title
required: The name of the API.
description
: Longer descriptive text.
+version
: The version of the API. Defaults to 0.1.0
.
url
: The root URL of the API schema. This option is not required unless the schema is included under path prefix.
patterns
: A list of URLs to inspect when generating the schema. Defaults to the project's URL conf.
urlconf
: A URL conf module name to use when generating the schema. Defaults to settings.ROOT_URLCONF
.
diff --git a/api-guide/validators/index.html b/api-guide/validators/index.html
index bb31f3b37..68ee195d3 100644
--- a/api-guide/validators/index.html
+++ b/api-guide/validators/index.html
@@ -615,7 +615,6 @@ class ExampleSerializer(serializers.Serializer):
If you want the date field to be visible, but not editable by the user, then set read_only=True
and additionally set a default=...
argument.
published = serializers.DateTimeField(read_only=True, default=timezone.now)
-The field will not be writable to the user, but the default value will still be passed through to the validated_data
.
Using with a hidden date field.
If you want the date field to be entirely hidden from the user, then use HiddenField
. This field type does not accept user input, but instead always returns its default value to the validated_data
in the serializer.
published = serializers.HiddenField(default=timezone.now)
diff --git a/community/release-notes/index.html b/community/release-notes/index.html
index 4fe31d6f1..51cf2c18f 100644
--- a/community/release-notes/index.html
+++ b/community/release-notes/index.html
@@ -509,6 +509,24 @@
3.10.x series
+3.10.3
+
+- Include API version in OpenAPI schema generation, defaulting to empty string.
+- Add pagination properties to OpenAPI response schemas.
+- Add missing "description" property to OpenAPI response schemas.
+- Only include "required" for non-empty cases in OpenAPI schemas.
+- Fix response schemas for "DELETE" case in OpenAPI schemas.
+- Use an array type for list view response schemas.
+- Use consistent
lowerInitialCamelCase
style in OpenAPI operation IDs.
+- Fix
minLength
/maxLength
/minItems
/maxItems
properties in OpenAPI schemas.
+- Only call
FileField.url
once in serialization, for improved performance.
+-
+
Fix an edge case where throttling calcualtions could error after a configuration change.
+
+-
+
TODO
+
+
3.10.2
Date: 29th July 2019
diff --git a/community/third-party-packages/index.html b/community/third-party-packages/index.html
index d46ad7285..1942b5741 100644
--- a/community/third-party-packages/index.html
+++ b/community/third-party-packages/index.html
@@ -580,6 +580,7 @@ You probably want to also tag the version now:
Enables black/whitelisting fields, and conditionally expanding child serializers on a per-view/request basis.