/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2024 Nordix Foundation.
+ * Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
+import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@EqualsAndHashCode(callSuper = false)
public class JpaParticipant extends Validated
implements PfAuthorative<Participant>, Comparable<JpaParticipant>, Serializable {
+
+ @Serial
private static final long serialVersionUID = -4697758484642403483L;
@Id
<!--
============LICENSE_START=======================================================
- Copyright (C) 2023-2025 Nordix Foundation.
+ Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
- <version>2024.0.0</version>
+ <version>2024.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2021, 2023-2025 Nordix Foundation.
+ Copyright (C) 2021, 2023-2025 OpenInfra Foundation Europe. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-otel</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.openapitools</groupId>
+ <artifactId>jackson-databind-nullable</artifactId>
+ </dependency>
</dependencies>
<build>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2021-2025 Nordix Foundation.
+ Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.openapitools</groupId>
+ <artifactId>jackson-databind-nullable</artifactId>
+ </dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2024 Nordix Foundation.
+ * Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* starts Main and inserts a commissioning template.
*/
@BeforeAll
- public static void setUpBeforeClass() {
+ static void setUpBeforeClass() {
serviceTemplate = InstantiationUtils.getToscaServiceTemplate(TOSCA_SERVICE_TEMPLATE_YAML);
}
@BeforeEach
- public void setUpPort() {
+ void setUpPort() {
super.setHttpPrefix(randomServerPort);
}
assertThat(Response.Status.BAD_REQUEST.getStatusCode()).isEqualTo(resp.getStatus());
var commissioningResponse = resp.readEntity(CommissioningResponse.class);
assertThat(commissioningResponse.getErrorDetails())
- .isEqualTo("org.springframework.http.converter.HttpMessageNotReadableException "
- + "Could not read JSON: java.lang.IllegalStateException: "
- + "Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $");
+ .contains("org.springframework.http.converter.HttpMessageNotReadableException");
assertThat(commissioningResponse.getAffectedAutomationCompositionDefinitions()).isNull();
resp.close();
}
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2022-2023 Nordix Foundation.
+ * Copyright (C) 2022-2023, 2025 OpenInfra Foundation Europe. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private static final String COMMISSIONING_ENDPOINT = "compositions";
private static final String COMPOSITION_ID = "1aeed185-a98b-45b6-af22-8d5d20485ea3";
- private static ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate();
+ private static final ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate();
@LocalServerPort
private int randomServerPort;
@BeforeEach
- public void setUpPort() {
+ void setUpPort() {
super.setHttpPrefix(randomServerPort);
}
var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + COMPOSITION_ID);
var respPost = invocationBuilder.put(Entity.json(serviceTemplate));
assertThat(Response.Status.ACCEPTED.getStatusCode()).isEqualTo(respPost.getStatus());
+ respPost.close();
}
@Test
var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT);
var respPost = invocationBuilder.post(Entity.json(serviceTemplate));
assertThat(Response.Status.OK.getStatusCode()).isEqualTo(respPost.getStatus());
+ respPost.close();
}
@Test
var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + COMPOSITION_ID);
var respPost = invocationBuilder.delete();
assertThat(Response.Status.OK.getStatusCode()).isEqualTo(respPost.getStatus());
+ respPost.close();
}
}