Skip to content

Add spectral rule for validating no unnamed objects in lists #1656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 8, 2023
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-06 15:59:41.504730",
"spec_repo_commit": "f65a8312"
"regenerated": "2023-09-07 17:53:35.006145",
"spec_repo_commit": "40dbfff2"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-06 15:59:41.521256",
"spec_repo_commit": "f65a8312"
"regenerated": "2023-09-07 17:53:35.025696",
"spec_repo_commit": "40dbfff2"
}
}
}
24 changes: 13 additions & 11 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6901,18 +6901,20 @@ components:
MonitorSearchCount:
description: Search facets.
items:
description: A facet item.
properties:
count:
description: The number of found monitors with the listed value.
format: int64
readOnly: true
type: integer
name:
description: The facet value.
readOnly: true
type: object
$ref: '#/components/schemas/MonitorSearchCountItem'
type: array
MonitorSearchCountItem:
description: A facet item.
properties:
count:
description: The number of found monitors with the listed value.
format: int64
readOnly: true
type: integer
name:
description: The facet value.
readOnly: true
type: object
MonitorSearchResponse:
description: The response form a monitor search.
example:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,13 @@ monitor\_search\_count
:members:
:show-inheritance:

monitor\_search\_count\_item
----------------------------

.. automodule:: datadog_api_client.v1.model.monitor_search_count_item
:members:
:show-inheritance:

monitor\_search\_response
-------------------------

Expand Down
6 changes: 4 additions & 2 deletions src/datadog_api_client/v1/model/monitor_search_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ class MonitorSearchCount(ModelSimple):
Search facets.


:type value: [dict]
:type value: [MonitorSearchCountItem]
"""

@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.monitor_search_count_item import MonitorSearchCountItem

return {
"value": ([dict],),
"value": ([MonitorSearchCountItem],),
}
60 changes: 60 additions & 0 deletions src/datadog_api_client/v1/model/monitor_search_count_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Any, Union

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


class MonitorSearchCountItem(ModelNormal):
@cached_property
def openapi_types(_):
return {
"count": (int,),
"name": (
bool,
date,
datetime,
dict,
float,
int,
list,
str,
none_type,
),
}

attribute_map = {
"count": "count",
"name": "name",
}
read_only_vars = {
"count",
"name",
}

def __init__(self_, count: Union[int, UnsetType] = unset, name: Union[Any, UnsetType] = unset, **kwargs):
"""
A facet item.

:param count: The number of found monitors with the listed value.
:type count: int, optional

:param name: The facet value.
:type name: bool, date, datetime, dict, float, int, list, str, none_type, optional
"""
if count is not unset:
kwargs["count"] = count
if name is not unset:
kwargs["name"] = name
super().__init__(kwargs)
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
from datadog_api_client.v1.model.monitor_overall_states import MonitorOverallStates
from datadog_api_client.v1.model.monitor_renotify_status_type import MonitorRenotifyStatusType
from datadog_api_client.v1.model.monitor_search_count import MonitorSearchCount
from datadog_api_client.v1.model.monitor_search_count_item import MonitorSearchCountItem
from datadog_api_client.v1.model.monitor_search_response import MonitorSearchResponse
from datadog_api_client.v1.model.monitor_search_response_counts import MonitorSearchResponseCounts
from datadog_api_client.v1.model.monitor_search_response_metadata import MonitorSearchResponseMetadata
Expand Down Expand Up @@ -1213,6 +1214,7 @@
"MonitorOverallStates",
"MonitorRenotifyStatusType",
"MonitorSearchCount",
"MonitorSearchCountItem",
"MonitorSearchResponse",
"MonitorSearchResponseCounts",
"MonitorSearchResponseMetadata",
Expand Down