We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 690c432 commit 68f9c09Copy full SHA for 68f9c09
1 file changed
opendrift_leeway_webgui/api/v1/serializers.py
@@ -38,6 +38,15 @@ class Meta:
38
#: Exclude user field because the username is shown instead
39
exclude = ["user"]
40
41
+ #: Set example values for drf-spectacular Swagger documentation
42
+ extra_kwargs = {
43
+ "duration": {"default": 12, "help_text": "Length of simulation in hours."},
44
+ "radius": {
45
+ "default": 1000,
46
+ "help_text": "Radius in meters for distributing particles around start coordinates.",
47
+ },
48
+ }
49
+
50
#: Define fields which are shown when retrieving simulations,
51
#: but cannot be set when creating new ones
52
read_only_fields = [
0 commit comments