Skip to content

Commit 5d690ee

Browse files
Merge pull request #1595 from gooddata/snapshot-master-dff0a001-to-rel/dev
[bot] Merge master/dff0a001 into rel/dev
2 parents 5a038d7 + dff0a00 commit 5d690ee

18 files changed

Lines changed: 467 additions & 105 deletions

Makefile

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ NO_CLIENT_GD_PROJECTS_ABS = $(filter-out %client, $(wildcard $(CURDIR)/packages/
88
NO_CLIENT_GD_PROJECTS_DIRS = $(foreach dir, $(NO_CLIENT_GD_PROJECTS_ABS), $(notdir $(dir)))
99
# TODO: replace API_VERSION in the future by call to API
1010
API_VERSION="v1"
11-
# Default: generate from localhost; use `make api-client STAGING=1` to download from remote
11+
# Default: generate from localhost; use `make api-client STAGING=1` to download from staging
1212
ifdef STAGING
13-
BASE_URL="https://demo-cicd.cloud.gooddata.com"
13+
BASE_URL="https://staging.dev-latest.stg11.panther.intgdc.com"
1414
else
1515
BASE_URL="http://localhost:3000"
1616
endif
@@ -61,22 +61,8 @@ endef
6161
.PHONY: _api-client-generate
6262
_api-client-generate:
6363
rm -f schemas/gooddata-api-client.json
64-
# Merge per-domain specs and strip literal NUL bytes that jq decoded from
65-
# escapes in the source (the previous `sed '/.../d'` pattern was a no-op:
66-
# sed BRE/ERE doesn't interpret \uNNNN, so it never matched anything).
67-
cat schemas/gooddata-*.json | jq -S -s 'reduce .[] as $$item ({}; . * $$item) + { tags : ( reduce .[].tags as $$item (null; . + $$item) | unique_by(.name) ) }' | tr -d '\000' > "schemas/gooddata-api-client.json"
68-
# Break the DashboardCompoundConditionItem ↔ children oneOf/allOf cycle that
69-
# crashes openapi-generator-cli v6.6.0 with StackOverflowError in
70-
# recursiveGetDiscriminator (its walker has no visited-set). Parent has no
71-
# own properties, so dropping the redundant `allOf: [{$$ref: parent}]` from
72-
# each child is semantically a no-op.
73-
jq '(.components.schemas.DashboardCompoundComparisonCondition.allOf) |= map(select(.["$$ref"] != "#/components/schemas/DashboardCompoundConditionItem")) | (.components.schemas.DashboardCompoundRangeCondition.allOf) |= map(select(.["$$ref"] != "#/components/schemas/DashboardCompoundConditionItem"))' schemas/gooddata-api-client.json > schemas/gooddata-api-client.json.tmp && mv schemas/gooddata-api-client.json.tmp schemas/gooddata-api-client.json
64+
cat schemas/gooddata-*.json | jq -S -s 'reduce .[] as $$item ({}; . * $$item) + { tags : ( reduce .[].tags as $$item (null; . + $$item) | unique_by(.name) ) }' > "schemas/gooddata-api-client.json"
7465
$(call generate_client,api)
75-
# Repair regex patterns of the form ^[^\x00]*$ that openapi-generator mangles
76-
# in two ways: sometimes it drops the NUL (leaving the invalid `^[^]*$`),
77-
# sometimes it embeds a literal NUL byte (producing a Python source that
78-
# fails to import with SyntaxError). The helper handles both shapes.
79-
./scripts/postprocess_api_client.py gooddata-api-client/gooddata_api_client
8066

8167
.PHONY: api-client
8268
api-client: download _api-client-generate

gooddata-api-client/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ docs/DeclarativeFilterContext.md
291291
docs/DeclarativeFilterView.md
292292
docs/DeclarativeIdentityProvider.md
293293
docs/DeclarativeIdentityProviderIdentifier.md
294+
docs/DeclarativeIpAllowlistPolicy.md
294295
docs/DeclarativeJwk.md
295296
docs/DeclarativeJwkSpecification.md
296297
docs/DeclarativeLabel.md
@@ -1831,6 +1832,7 @@ gooddata_api_client/model/declarative_filter_context.py
18311832
gooddata_api_client/model/declarative_filter_view.py
18321833
gooddata_api_client/model/declarative_identity_provider.py
18331834
gooddata_api_client/model/declarative_identity_provider_identifier.py
1835+
gooddata_api_client/model/declarative_ip_allowlist_policy.py
18341836
gooddata_api_client/model/declarative_jwk.py
18351837
gooddata_api_client/model/declarative_jwk_specification.py
18361838
gooddata_api_client/model/declarative_label.py

gooddata-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ Class | Method | HTTP request | Description
15771577
- [DeclarativeFilterView](docs/DeclarativeFilterView.md)
15781578
- [DeclarativeIdentityProvider](docs/DeclarativeIdentityProvider.md)
15791579
- [DeclarativeIdentityProviderIdentifier](docs/DeclarativeIdentityProviderIdentifier.md)
1580+
- [DeclarativeIpAllowlistPolicy](docs/DeclarativeIpAllowlistPolicy.md)
15801581
- [DeclarativeJwk](docs/DeclarativeJwk.md)
15811582
- [DeclarativeJwkSpecification](docs/DeclarativeJwkSpecification.md)
15821583
- [DeclarativeLabel](docs/DeclarativeLabel.md)

gooddata-api-client/docs/DeclarativeColumn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A table column.
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**data_type** | **str** | Column type |
9-
**name** | **str** | Column name |
9+
**name** | **str** | Column name. Must not contain NUL (0x00) characters. |
1010
**description** | **str** | Column description/comment from database | [optional]
1111
**is_nullable** | **bool** | Column is nullable | [optional]
1212
**is_primary_key** | **bool** | Is column part of primary key? | [optional]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# DeclarativeIpAllowlistPolicy
2+
3+
A declarative form of an IP allowlist policy.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**allowed_sources** | **[str]** | Allowed source IP addresses or CIDR ranges. |
9+
**id** | **str** | Identifier of an IP allowlist policy. |
10+
**user_groups** | [**[DeclarativeUserGroupIdentifier]**](DeclarativeUserGroupIdentifier.md) | Target user groups this policy applies to. | [optional]
11+
**users** | [**[DeclarativeUserIdentifier]**](DeclarativeUserIdentifier.md) | Target users this policy applies to. | [optional]
12+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

gooddata-api-client/docs/DeclarativeOrganization.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**data_sources** | [**[DeclarativeDataSource]**](DeclarativeDataSource.md) | | [optional]
1212
**export_templates** | [**[DeclarativeExportTemplate]**](DeclarativeExportTemplate.md) | | [optional]
1313
**identity_providers** | [**[DeclarativeIdentityProvider]**](DeclarativeIdentityProvider.md) | | [optional]
14+
**ip_allowlist_policies** | [**[DeclarativeIpAllowlistPolicy]**](DeclarativeIpAllowlistPolicy.md) | | [optional]
1415
**jwks** | [**[DeclarativeJwk]**](DeclarativeJwk.md) | | [optional]
1516
**notification_channels** | [**[DeclarativeNotificationChannel]**](DeclarativeNotificationChannel.md) | | [optional]
1617
**user_groups** | [**[DeclarativeUserGroup]**](DeclarativeUserGroup.md) | | [optional]

gooddata-api-client/docs/LayoutApi.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4435,6 +4435,24 @@ with gooddata_api_client.ApiClient() as api_client:
44354435
saml_metadata="saml_metadata_example",
44364436
),
44374437
],
4438+
ip_allowlist_policies=[
4439+
DeclarativeIpAllowlistPolicy(
4440+
allowed_sources=["203.0.113.10/32","198.51.100.0/24"],
4441+
id="admin-vpn-only",
4442+
user_groups=[
4443+
DeclarativeUserGroupIdentifier(
4444+
id="group.admins",
4445+
type="userGroup",
4446+
),
4447+
],
4448+
users=[
4449+
DeclarativeUserIdentifier(
4450+
id="employee123",
4451+
type="user",
4452+
),
4453+
],
4454+
),
4455+
],
44384456
jwks=[
44394457
DeclarativeJwk(
44404458
content=DeclarativeJwkSpecification(),

gooddata-api-client/docs/OrganizationDeclarativeAPIsApi.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,24 @@ with gooddata_api_client.ApiClient() as api_client:
582582
saml_metadata="saml_metadata_example",
583583
),
584584
],
585+
ip_allowlist_policies=[
586+
DeclarativeIpAllowlistPolicy(
587+
allowed_sources=["203.0.113.10/32","198.51.100.0/24"],
588+
id="admin-vpn-only",
589+
user_groups=[
590+
DeclarativeUserGroupIdentifier(
591+
id="group.admins",
592+
type="userGroup",
593+
),
594+
],
595+
users=[
596+
DeclarativeUserIdentifier(
597+
id="employee123",
598+
type="user",
599+
),
600+
],
601+
),
602+
],
585603
jwks=[
586604
DeclarativeJwk(
587605
content=DeclarativeJwkSpecification(),

gooddata-api-client/gooddata_api_client/model/declarative_column.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ class DeclarativeColumn(ModelNormal):
7171
validations = {
7272
('name',): {
7373
'max_length': 255,
74-
'regex': {
75-
'pattern': r'^[^\x00]*$', # noqa: E501
76-
},
7774
},
7875
('description',): {
7976
'max_length': 10000,
@@ -143,7 +140,7 @@ def _from_openapi_data(cls, data_type, name, *args, **kwargs): # noqa: E501
143140
144141
Args:
145142
data_type (str): Column type
146-
name (str): Column name
143+
name (str): Column name. Must not contain NUL (0x00) characters.
147144
148145
Keyword Args:
149146
_check_type (bool): if True, values for parameters in openapi_types
@@ -239,7 +236,7 @@ def __init__(self, data_type, name, *args, **kwargs): # noqa: E501
239236
240237
Args:
241238
data_type (str): Column type
242-
name (str): Column name
239+
name (str): Column name. Must not contain NUL (0x00) characters.
243240
244241
Keyword Args:
245242
_check_type (bool): if True, values for parameters in openapi_types

0 commit comments

Comments
 (0)