Skip to content

Commit

Permalink
📝 update 'has_geometry' description in OAS
Browse files Browse the repository at this point in the history
  • Loading branch information
annashamray committed Nov 26, 2021
1 parent bc7c142 commit 922002c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/objecttypes/api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ components:
description: Last date when the object type was modified
hasGeometry:
type: boolean
description: Shows whether the related objects have geographic coordinates
description: 'Shows whether the related objects have geographic coordinates.
If the value is ''false'' the related objects are not allowed to have
coordinates and the creation/update of objects with `geometry` property
will raise an error '
versions:
type: array
items:
Expand Down Expand Up @@ -639,7 +642,10 @@ components:
description: Last date when the object type was modified
hasGeometry:
type: boolean
description: Shows whether the related objects have geographic coordinates
description: 'Shows whether the related objects have geographic coordinates.
If the value is ''false'' the related objects are not allowed to have
coordinates and the creation/update of objects with `geometry` property
will raise an error '
versions:
type: array
items:
Expand Down
10 changes: 8 additions & 2 deletions src/objecttypes/api/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ components:
description: Last date when the object type was modified
hasGeometry:
type: boolean
description: Shows whether the related objects have geographic coordinates
description: 'Shows whether the related objects have geographic coordinates.
If the value is ''false'' the related objects are not allowed to have
coordinates and the creation/update of objects with `geometry` property
will raise an error '
versions:
type: array
items:
Expand Down Expand Up @@ -699,7 +702,10 @@ components:
description: Last date when the object type was modified
hasGeometry:
type: boolean
description: Shows whether the related objects have geographic coordinates
description: 'Shows whether the related objects have geographic coordinates.
If the value is ''false'' the related objects are not allowed to have
coordinates and the creation/update of objects with `geometry` property
will raise an error '
versions:
type: array
items:
Expand Down
22 changes: 22 additions & 0 deletions src/objecttypes/core/migrations/0017_auto_20211126_1736.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 2.2.24 on 2021-11-26 16:36

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0016_objecttype_has_geometry"),
]

operations = [
migrations.AlterField(
model_name="objecttype",
name="has_geometry",
field=models.BooleanField(
default=True,
help_text="Shows whether the related objects have geographic coordinates. If the value is 'false' the related objects are not allowed to have coordinates and the creation/update of objects with `geometry` property will raise an error ",
verbose_name="has geometry",
),
),
]
7 changes: 6 additions & 1 deletion src/objecttypes/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ class ObjectType(models.Model):
has_geometry = models.BooleanField(
_("has geometry"),
default=True,
help_text=_("Shows whether the related objects have geographic coordinates"),
help_text=_(
"Shows whether the related objects have geographic coordinates. "
"If the value is 'false' the related objects are not allowed to "
"have coordinates and the creation/update of objects with "
"`geometry` property will raise an error "
),
)

def __str__(self):
Expand Down

0 comments on commit 922002c

Please sign in to comment.