Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "3a6cb30",
"generated": "2025-08-12 15:41:29.674"
"spec_repo_commit": "6b8994f",
"generated": "2025-08-13 15:22:27.709"
}
20 changes: 18 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3446,9 +3446,25 @@ components:
example:
focus: WORLD
properties:
custom_extent:
description: A custom extent of the map defined by an array of four numbers
in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
example:
- -30
- -40
- 40
- 30
items:
description: The longitudinal or latitudinal coordinates of the bounding
box.
format: double
type: number
maxItems: 4
minItems: 4
type: array
focus:
description: The 2-letter ISO code of a country to focus the map on. Or
`WORLD`.
description: The ISO code of a country, sub-division, or region to focus
the map on. Or `WORLD`. Mutually exclusive with `custom_extent`.
example: WORLD
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,48 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


class GeomapWidgetDefinitionView(ModelNormal):
validations = {
"custom_extent": {
"max_items": 4,
"min_items": 4,
},
}

@cached_property
def openapi_types(_):
return {
"custom_extent": ([float],),
"focus": (str,),
}

attribute_map = {
"custom_extent": "custom_extent",
"focus": "focus",
}

def __init__(self_, focus: str, **kwargs):
def __init__(self_, focus: str, custom_extent: Union[List[float], UnsetType] = unset, **kwargs):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Code Quality Violation

Suggested change
def __init__(self_, focus: str, custom_extent: Union[List[float], UnsetType] = unset, **kwargs):
def __init__(self, focus: str, custom_extent: Union[List[float], UnsetType] = unset, **kwargs):
first parameter of a class function should be self (...read more)

In a class method (that is not a class method nor a static method), the first argument must be self by convention.

Learn More

View in Datadog  Leave us feedback  Documentation

"""
The view of the world that the map should render.

:param focus: The 2-letter ISO code of a country to focus the map on. Or ``WORLD``.
:param custom_extent: A custom extent of the map defined by an array of four numbers in the order ``[minLongitude, minLatitude, maxLongitude, maxLatitude]``.
:type custom_extent: [float], optional

:param focus: The ISO code of a country, sub-division, or region to focus the map on. Or ``WORLD``. Mutually exclusive with ``custom_extent``.
:type focus: str
"""
if custom_extent is not unset:
kwargs["custom_extent"] = custom_extent
super().__init__(kwargs)

self_.focus = focus
Loading