Skip to content

Commit

Permalink
Update test data to aas-core-meta 77d3442 (#536)
Browse files Browse the repository at this point in the history
We update the development requirements to and re-record the test data
for [aas-core-meta 77d3442].

Notably, we propagate the fix for V3.0 in the meta-model which reverted
the order of ``data_specification`` and ``data_specification_content``.
This was necessary so that the XML schemas for V3.0 remain backwards
compatible.

[aas-core-meta 77d3442]: aas-core-works/aas-core-meta@77d3442
  • Loading branch information
mristin authored Nov 4, 2024
1 parent f0f0925 commit 4433d09
Show file tree
Hide file tree
Showing 41 changed files with 604 additions and 604 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"twine",
"jsonschema==3.2.0",
"xmlschema==3.3.1",
"aas-core-meta@git+https://github.com/aas-core-works/aas-core-meta@35aa2cc#egg=aas-core-meta",
"aas-core-meta@git+https://github.com/aas-core-works/aas-core-meta@77d3442#egg=aas-core-meta",
"ssort==0.12.3",
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7104,20 +7104,6 @@ class EnhancedEmbeddedDataSpecification
return types::ModelType::kEmbeddedDataSpecification;
}

const std::shared_ptr<types::IDataSpecificationContent>& data_specification_content() const override {
return instance_->data_specification_content();
}

std::shared_ptr<types::IDataSpecificationContent>& mutable_data_specification_content() override {
return instance_->mutable_data_specification_content();
}

void set_data_specification_content(
std::shared_ptr<types::IDataSpecificationContent> value
) override {
instance_->set_data_specification_content(value);
}

const std::shared_ptr<types::IReference>& data_specification() const override {
return instance_->data_specification();
}
Expand All @@ -7132,6 +7118,20 @@ class EnhancedEmbeddedDataSpecification
instance_->set_data_specification(value);
}

const std::shared_ptr<types::IDataSpecificationContent>& data_specification_content() const override {
return instance_->data_specification_content();
}

std::shared_ptr<types::IDataSpecificationContent>& mutable_data_specification_content() override {
return instance_->mutable_data_specification_content();
}

void set_data_specification_content(
std::shared_ptr<types::IDataSpecificationContent> value
) override {
instance_->set_data_specification_content(value);
}

const std::shared_ptr<E>& enhancement() const {
return enhancement_;
}
Expand Down Expand Up @@ -13524,16 +13524,16 @@ std::shared_ptr<types::IEmbeddedDataSpecification> WrapEmbeddedDataSpecification
// We assume that we already checked whether `that` has been enhanced
// in the caller.

that->set_data_specification_content(
that->set_data_specification(
Wrap<E>(
that->data_specification_content(),
that->data_specification(),
factory
)
);

that->set_data_specification(
that->set_data_specification_content(
Wrap<E>(
that->data_specification(),
that->data_specification_content(),
factory
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11300,10 +11300,10 @@ void IteratorOverEmbeddedDataSpecification::Execute() {
index_ = -1;
done_ = false;

property_ = Property::kDataSpecificationContent;
property_ = Property::kDataSpecification;
item_ = std::move(
std::static_pointer_cast<types::IClass>(
casted_->data_specification_content()
casted_->data_specification()
)
);
++index_;
Expand All @@ -11313,10 +11313,10 @@ void IteratorOverEmbeddedDataSpecification::Execute() {
}

case 1: {
property_ = Property::kDataSpecification;
property_ = Property::kDataSpecificationContent;
item_ = std::move(
std::static_pointer_cast<types::IClass>(
casted_->data_specification()
casted_->data_specification_content()
)
);
++index_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23529,8 +23529,8 @@ std::pair<
}

std::set<std::string> kPropertiesInEmbeddedDataSpecification = {
"dataSpecificationContent",
"dataSpecification"
"dataSpecification",
"dataSpecificationContent"
};

std::pair<
Expand Down Expand Up @@ -23585,26 +23585,26 @@ std::pair<

// region Check required properties

if (!json.contains("dataSpecificationContent")) {
if (!json.contains("dataSpecification")) {
return std::make_pair<
common::optional<std::shared_ptr<types::IEmbeddedDataSpecification> >,
common::optional<DeserializationError>
>(
common::nullopt,
common::make_optional<DeserializationError>(
L"The required property dataSpecificationContent is missing"
L"The required property dataSpecification is missing"
)
);
}

if (!json.contains("dataSpecification")) {
if (!json.contains("dataSpecificationContent")) {
return std::make_pair<
common::optional<std::shared_ptr<types::IEmbeddedDataSpecification> >,
common::optional<DeserializationError>
>(
common::nullopt,
common::make_optional<DeserializationError>(
L"The required property dataSpecification is missing"
L"The required property dataSpecificationContent is missing"
)
);
}
Expand All @@ -23615,26 +23615,26 @@ std::pair<

common::optional<DeserializationError> error;

common::optional<std::shared_ptr<types::IDataSpecificationContent> > the_data_specification_content;

common::optional<std::shared_ptr<types::IReference> > the_data_specification;

common::optional<std::shared_ptr<types::IDataSpecificationContent> > the_data_specification_content;

// endregion Initialization

// region De-serialize dataSpecificationContent
// region De-serialize dataSpecification

std::tie(
the_data_specification_content,
the_data_specification,
error
) = DeserializeDataSpecificationContent(
json["dataSpecificationContent"],
) = DeserializeReference(
json["dataSpecification"],
additional_properties
);

if (error.has_value()) {
error->path.segments.emplace_front(
common::make_unique<PropertySegment>(
L"dataSpecificationContent"
L"dataSpecification"
)
);

Expand All @@ -23647,22 +23647,22 @@ std::pair<
);
}

// endregion De-serialize dataSpecificationContent
// endregion De-serialize dataSpecification

// region De-serialize dataSpecification
// region De-serialize dataSpecificationContent

std::tie(
the_data_specification,
the_data_specification_content,
error
) = DeserializeReference(
json["dataSpecification"],
) = DeserializeDataSpecificationContent(
json["dataSpecificationContent"],
additional_properties
);

if (error.has_value()) {
error->path.segments.emplace_front(
common::make_unique<PropertySegment>(
L"dataSpecification"
L"dataSpecificationContent"
)
);

Expand All @@ -23675,7 +23675,7 @@ std::pair<
);
}

// endregion De-serialize dataSpecification
// endregion De-serialize dataSpecificationContent

return std::make_pair(
common::make_optional<
Expand All @@ -23685,8 +23685,8 @@ std::pair<
// We deliberately do not use std::make_shared here to avoid an unnecessary
// upcast.
new types::EmbeddedDataSpecification(
std::move(*the_data_specification_content),
std::move(*the_data_specification)
std::move(*the_data_specification),
std::move(*the_data_specification_content)
)
),
common::nullopt
Expand Down Expand Up @@ -36920,17 +36920,17 @@ std::pair<

common::optional<SerializationError> error;

common::optional<nlohmann::json> json_data_specification_content;
common::optional<nlohmann::json> json_data_specification;
std::tie(
json_data_specification_content,
json_data_specification,
error
) = SerializeIClass(
*that.data_specification_content()
*that.data_specification()
);
if (error.has_value()) {
error->path.segments.emplace_front(
common::make_unique<iteration::PropertySegment>(
iteration::Property::kDataSpecificationContent
iteration::Property::kDataSpecification
)
);

Expand All @@ -36943,21 +36943,21 @@ std::pair<
);
}

result["dataSpecificationContent"] = std::move(
*json_data_specification_content
result["dataSpecification"] = std::move(
*json_data_specification
);

common::optional<nlohmann::json> json_data_specification;
common::optional<nlohmann::json> json_data_specification_content;
std::tie(
json_data_specification,
json_data_specification_content,
error
) = SerializeIClass(
*that.data_specification()
*that.data_specification_content()
);
if (error.has_value()) {
error->path.segments.emplace_front(
common::make_unique<iteration::PropertySegment>(
iteration::Property::kDataSpecification
iteration::Property::kDataSpecificationContent
)
);

Expand All @@ -36970,8 +36970,8 @@ std::pair<
);
}

result["dataSpecification"] = std::move(
*json_data_specification
result["dataSpecificationContent"] = std::move(
*json_data_specification_content
);

return std::make_pair<
Expand Down
36 changes: 18 additions & 18 deletions test_data/cpp/test_main/aas_core_meta.v3/expected_output/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6911,32 +6911,18 @@ void Environment::set_concept_descriptions(
// region EmbeddedDataSpecification

EmbeddedDataSpecification::EmbeddedDataSpecification(
std::shared_ptr<IDataSpecificationContent> data_specification_content,
std::shared_ptr<IReference> data_specification
std::shared_ptr<IReference> data_specification,
std::shared_ptr<IDataSpecificationContent> data_specification_content
) {
data_specification_content_ = std::move(data_specification_content);

data_specification_ = std::move(data_specification);

data_specification_content_ = std::move(data_specification_content);
}

ModelType EmbeddedDataSpecification::model_type() const {
return ModelType::kEmbeddedDataSpecification;
}

const std::shared_ptr<IDataSpecificationContent>& EmbeddedDataSpecification::data_specification_content() const {
return data_specification_content_;
}

std::shared_ptr<IDataSpecificationContent>& EmbeddedDataSpecification::mutable_data_specification_content() {
return data_specification_content_;
}

void EmbeddedDataSpecification::set_data_specification_content(
std::shared_ptr<IDataSpecificationContent> value
) {
data_specification_content_ = value;
}

const std::shared_ptr<IReference>& EmbeddedDataSpecification::data_specification() const {
return data_specification_;
}
Expand All @@ -6951,6 +6937,20 @@ void EmbeddedDataSpecification::set_data_specification(
data_specification_ = value;
}

const std::shared_ptr<IDataSpecificationContent>& EmbeddedDataSpecification::data_specification_content() const {
return data_specification_content_;
}

std::shared_ptr<IDataSpecificationContent>& EmbeddedDataSpecification::mutable_data_specification_content() {
return data_specification_content_;
}

void EmbeddedDataSpecification::set_data_specification_content(
std::shared_ptr<IDataSpecificationContent> value
) {
data_specification_content_ = value;
}

// endregion EmbeddedDataSpecification

// region LevelType
Expand Down
Loading

0 comments on commit 4433d09

Please sign in to comment.