Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Fixed
- Fix `unitTest` task not running the tests in the `test` source set ([#2074](https://github.com/opensearch-project/opensearch-java/pull/2074))
- Run model tests against both JSON mappers instead of picking one at random ([#2085](https://github.com/opensearch-project/opensearch-java/pull/2085))
- Fix ISM timestamp fields typed as `Integer` instead of `Long` causing numeric overflow for epoch-millisecond values ([#2039](https://github.com/opensearch-project/opensearch-java/pull/2039))

## [Unreleased 3.x]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class IsmTemplate implements PlainJsonSerializable, ToCopyableBuilder<Ism
private final List<String> indexPatterns;

@Nullable
private final Integer lastUpdatedTime;
private final Long lastUpdatedTime;

@Nullable
private final Number priority;
Expand Down Expand Up @@ -100,7 +100,7 @@ public final List<String> indexPatterns() {
* </p>
*/
@Nullable
public final Integer lastUpdatedTime() {
public final Long lastUpdatedTime() {
return this.lastUpdatedTime;
}

Expand Down Expand Up @@ -166,7 +166,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private List<String> indexPatterns;
@Nullable
private Integer lastUpdatedTime;
private Long lastUpdatedTime;
@Nullable
private Number priority;

Expand Down Expand Up @@ -229,7 +229,7 @@ public final Builder indexPatterns(String value, String... values) {
* </p>
*/
@Nonnull
public final Builder lastUpdatedTime(@Nullable Integer value) {
public final Builder lastUpdatedTime(@Nullable Long value) {
this.lastUpdatedTime = value;
return this;
}
Expand Down Expand Up @@ -272,7 +272,7 @@ public IsmTemplate build() {

protected static void setupIsmTemplateDeserializer(ObjectDeserializer<IsmTemplate.Builder> op) {
op.add(Builder::indexPatterns, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "index_patterns");
op.add(Builder::lastUpdatedTime, JsonpDeserializer.integerDeserializer(), "last_updated_time");
op.add(Builder::lastUpdatedTime, JsonpDeserializer.longDeserializer(), "last_updated_time");
op.add(Builder::priority, JsonpDeserializer.numberDeserializer(), "priority");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class Policy implements PlainJsonSerializable, ToCopyableBuilder<Policy.B
private final List<IsmTemplate> ismTemplate;

@Nullable
private final Integer lastUpdatedTime;
private final Long lastUpdatedTime;

@Nullable
private final String policyId;
Expand Down Expand Up @@ -156,7 +156,7 @@ public final List<IsmTemplate> ismTemplate() {
* </p>
*/
@Nullable
public final Integer lastUpdatedTime() {
public final Long lastUpdatedTime() {
return this.lastUpdatedTime;
}

Expand Down Expand Up @@ -279,7 +279,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private List<IsmTemplate> ismTemplate;
@Nullable
private Integer lastUpdatedTime;
private Long lastUpdatedTime;
@Nullable
private String policyId;
@Nullable
Expand Down Expand Up @@ -418,7 +418,7 @@ public final Builder ismTemplate(Function<IsmTemplate.Builder, ObjectBuilder<Ism
* </p>
*/
@Nonnull
public final Builder lastUpdatedTime(@Nullable Integer value) {
public final Builder lastUpdatedTime(@Nullable Long value) {
this.lastUpdatedTime = value;
return this;
}
Expand Down Expand Up @@ -523,7 +523,7 @@ protected static void setupPolicyDeserializer(ObjectDeserializer<Policy.Builder>
op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description");
op.add(Builder::errorNotification, ErrorNotification._DESERIALIZER, "error_notification");
op.add(Builder::ismTemplate, JsonpDeserializer.arrayDeserializer(IsmTemplate._DESERIALIZER), "ism_template");
op.add(Builder::lastUpdatedTime, JsonpDeserializer.integerDeserializer(), "last_updated_time");
op.add(Builder::lastUpdatedTime, JsonpDeserializer.longDeserializer(), "last_updated_time");
op.add(Builder::policyId, JsonpDeserializer.stringDeserializer(), "policy_id");
op.add(Builder::schemaVersion, JsonpDeserializer.numberDeserializer(), "schema_version");
op.add(Builder::states, JsonpDeserializer.arrayDeserializer(States._DESERIALIZER), "states");
Expand Down
5 changes: 5 additions & 0 deletions java-codegen/opensearch-openapi.yaml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Submitted the spec fix upstream: opensearch-project/opensearch-api-specification#1196

Original file line number Diff line number Diff line change
Expand Up @@ -56686,9 +56686,11 @@ components:
$ref: '#/components/schemas/flow_framework.common___user'
created_time:
type: integer
format: int64
description: When the workflow was created.
last_updated_time:
type: integer
format: int64
description: When the workflow was last updated.
last_provisioned_time:
type: number
Expand Down Expand Up @@ -61772,6 +61774,7 @@ components:
description: The priority of the ISM template.
last_updated_time:
type: integer
format: int64
description: When the ISM template was last updated.
ism._common___Metadata:
type: object
Expand All @@ -61797,6 +61800,7 @@ components:
description: The description of the policy.
last_updated_time:
type: integer
format: int64
description: When the policy was last updated.
schema_version:
type: number
Expand Down Expand Up @@ -70265,6 +70269,7 @@ components:
type: boolean
last_updated_time:
type: integer
format: int64
description: When the policy was last modified.
enabled_time:
type: integer
Expand Down
Loading