summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/application
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-10-30 14:12:12 +0530
committerDan Timoney <dtimoney@att.com>2018-11-02 18:07:49 +0000
commit115a90365564d9cb5a6415f4fa525b999a36b5ea (patch)
tree15ab3799a2112df522bde461ab908f4795ba4189 /ms/controllerblueprints/application
parentad2bd5603230897091b93167b683b05955b91330 (diff)
SwaggerConfig,ResourceAssignmentInitializer-Sonar
Fixed sonar issues/code-smells accross these files Issue-ID: CCSDK-631 Change-Id: I0312937af688341e37b68f7da6229fdf935d620d Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/application')
-rw-r--r--ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/SwaggerConfig.java309
1 files changed, 155 insertions, 154 deletions
diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/SwaggerConfig.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/SwaggerConfig.java
index cfcccf33..8b96f04a 100644
--- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/SwaggerConfig.java
+++ b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/apps/controllerblueprints/SwaggerConfig.java
@@ -1,154 +1,155 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.apps.controllerblueprints;
-
-import com.google.common.collect.Lists;
-import org.jetbrains.annotations.NotNull;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.RequestMethod;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.builders.ResponseMessageBuilder;
-import springfox.documentation.schema.ModelRef;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.service.Contact;
-import springfox.documentation.service.Header;
-import springfox.documentation.service.ResponseMessage;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * SwaggerConfig
- *
- * @author Brinda Santh 8/13/2018
- */
-@Configuration
-@EnableSwagger2
-@SuppressWarnings("unused")
-public class SwaggerConfig {
- @Value("${appVersion}")
- private String appVersion;
- @Value("${swagger.contact.name}")
- private String contactName;
- @Value("${swagger.contact.url}")
- private String contactUrl;
- @Value("${swagger.contact.email}")
- private String contactEmail;
-
- @Bean
- @SuppressWarnings("unused")
- public Docket api() {
- return new Docket(DocumentationType.SWAGGER_2)
- .globalResponseMessage(RequestMethod.GET, getDefaultGetResponseMessages())
- .globalResponseMessage(RequestMethod.POST, getDefaultPostResponseMessages())
- .globalResponseMessage(RequestMethod.PUT, getDefaultPutResponseMessages())
- .globalResponseMessage(RequestMethod.DELETE, getDefaultDeleteResponseMessages())
- .select()
- .apis(RequestHandlerSelectors.any())
- .paths(PathSelectors.any())
- .build()
- .apiInfo(apiInfo());
- }
-
- private ApiInfo apiInfo() {
- return new ApiInfo(
- "Controller Blueprints API",
- "Controller blueprints API for VNF Self Service.",
- appVersion,
- "Terms of service",
- new Contact(contactName, contactUrl, contactEmail),
- "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
- }
-
- private List<ResponseMessage> getDefaultGetResponseMessages() {
- List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
- Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.NOT_FOUND, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
- return defaultResponseMessages;
- }
-
- private List<ResponseMessage> getDefaultPostResponseMessages() {
- List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
- Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.CREATED, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
- return defaultResponseMessages;
- }
-
- private List<ResponseMessage> getDefaultPutResponseMessages() {
- List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
- Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
- return defaultResponseMessages;
- }
-
- private List<ResponseMessage> getDefaultDeleteResponseMessages() {
- List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
- Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
- defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
- return defaultResponseMessages;
- }
-
- private ResponseMessage getResponseBuilder(@NotNull HttpStatus httpStatus, Map<String, Header> defaultHeaders) {
- ResponseMessageBuilder responseMessageBuilder = new ResponseMessageBuilder();
- responseMessageBuilder.code(httpStatus.value())
- .message(httpStatus.getReasonPhrase())
- .headersWithDescription(defaultHeaders)
- .build();
- return responseMessageBuilder.build();
- }
-
- private Map<String, Header> getDefaultResponseHeaders() {
- Map<String, Header> defaultHeaders = new HashMap<>();
- defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID,
- new Header(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID, "Transaction Id", new ModelRef("string")));
- defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION,
- new Header(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION, "API Latest Version", new ModelRef("string")));
- defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION,
- new Header(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION, "API Minor Version", new ModelRef("string")));
- defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION,
- new Header(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION, "API Patch Version", new ModelRef("string")));
- return defaultHeaders;
- }
-}
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints;
+
+import com.google.common.collect.Lists;
+import org.jetbrains.annotations.NotNull;
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.RequestMethod;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.builders.ResponseMessageBuilder;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Header;
+import springfox.documentation.service.ResponseMessage;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * SwaggerConfig
+ *
+ * @author Brinda Santh 8/13/2018
+ */
+@Configuration
+@EnableSwagger2
+@SuppressWarnings("unused")
+public class SwaggerConfig {
+ @Value("${appVersion}")
+ private String appVersion;
+ @Value("${swagger.contact.name}")
+ private String contactName;
+ @Value("${swagger.contact.url}")
+ private String contactUrl;
+ @Value("${swagger.contact.email}")
+ private String contactEmail;
+ private String stringModelRef = "string";
+
+ @Bean
+ @SuppressWarnings("unused")
+ public Docket api() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .globalResponseMessage(RequestMethod.GET, getDefaultGetResponseMessages())
+ .globalResponseMessage(RequestMethod.POST, getDefaultPostResponseMessages())
+ .globalResponseMessage(RequestMethod.PUT, getDefaultPutResponseMessages())
+ .globalResponseMessage(RequestMethod.DELETE, getDefaultDeleteResponseMessages())
+ .select()
+ .apis(RequestHandlerSelectors.any())
+ .paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfo(
+ "Controller Blueprints API",
+ "Controller blueprints API for VNF Self Service.",
+ appVersion,
+ "Terms of service",
+ new Contact(contactName, contactUrl, contactEmail),
+ "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
+ }
+
+ private List<ResponseMessage> getDefaultGetResponseMessages() {
+ List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
+ Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.NOT_FOUND, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
+ return defaultResponseMessages;
+ }
+
+ private List<ResponseMessage> getDefaultPostResponseMessages() {
+ List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
+ Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.CREATED, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
+ return defaultResponseMessages;
+ }
+
+ private List<ResponseMessage> getDefaultPutResponseMessages() {
+ List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
+ Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
+ return defaultResponseMessages;
+ }
+
+ private List<ResponseMessage> getDefaultDeleteResponseMessages() {
+ List<ResponseMessage> defaultResponseMessages = Lists.newArrayList();
+ Map<String, Header> defaultHeaders = getDefaultResponseHeaders();
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.OK, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.BAD_REQUEST, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.UNAUTHORIZED, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.FORBIDDEN, defaultHeaders));
+ defaultResponseMessages.add(getResponseBuilder(HttpStatus.INTERNAL_SERVER_ERROR, defaultHeaders));
+ return defaultResponseMessages;
+ }
+
+ private ResponseMessage getResponseBuilder(@NotNull HttpStatus httpStatus, Map<String, Header> defaultHeaders) {
+ ResponseMessageBuilder responseMessageBuilder = new ResponseMessageBuilder();
+ responseMessageBuilder.code(httpStatus.value())
+ .message(httpStatus.getReasonPhrase())
+ .headersWithDescription(defaultHeaders)
+ .build();
+ return responseMessageBuilder.build();
+ }
+
+ private Map<String, Header> getDefaultResponseHeaders() {
+ Map<String, Header> defaultHeaders = new HashMap<>();
+ defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID,
+ new Header(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID, "Transaction Id", new ModelRef(stringModelRef)));
+ defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION,
+ new Header(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION, "API Latest Version", new ModelRef(stringModelRef)));
+ defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION,
+ new Header(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION, "API Minor Version", new ModelRef(stringModelRef)));
+ defaultHeaders.put(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION,
+ new Header(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION, "API Patch Version", new ModelRef(stringModelRef)));
+ return defaultHeaders;
+ }
+}
flowResourceTarget) {
+ super();
+ this.artifactType = artifactType;
+ this.artifactUuid = artifactUuid;
+ this.artifactName = artifactName;
+ this.artifactVersion = artifactVersion;
+ this.artifactDescription = artifactDescription;
+ this.workflowName = workflowName;
+ this.operationName = operationName;
+ this.workflowSource = workflowSource;
+ this.workflowResourceTarget = workflowResourceTarget;
+ }
+
+ @JsonProperty("artifactType")
+ public String getArtifactType() {
+ return artifactType;
+ }
+
+ @JsonProperty("artifactType")
+ public void setArtifactType(String artifactType) {
+ this.artifactType = artifactType;
+ }
+
+ public ArtifactInfo withArtifactType(String artifactType) {
+ this.artifactType = artifactType;
+ return this;
+ }
+
+ @JsonProperty("artifactUuid")
+ public String getArtifactUuid() {
+ return artifactUuid;
+ }
+
+ @JsonProperty("artifactUuid")
+ public void setArtifactUuid(String artifactUuid) {
+ this.artifactUuid = artifactUuid;
+ }
+
+ public ArtifactInfo withArtifactUuid(String artifactUuid) {
+ this.artifactUuid = artifactUuid;
+ return this;
+ }
+
+ @JsonProperty("artifactName")
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ @JsonProperty("artifactName")
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public ArtifactInfo withArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ return this;
+ }
+
+ @JsonProperty("artifactVersion")
+ public String getArtifactVersion() {
+ return artifactVersion;
+ }
+
+ @JsonProperty("artifactVersion")
+ public void setArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ }
+
+ public ArtifactInfo withArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ return this;
+ }
+
+ @JsonProperty("artifactDescription")
+ public String getArtifactDescription() {
+ return artifactDescription;
+ }
+
+ @JsonProperty("artifactDescription")
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ public ArtifactInfo withArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ return this;
+ }
+
+ @JsonProperty("workflowName")
+ public String getWorkflowName() {
+ return workflowName;
+ }
+
+ @JsonProperty("workflowName")
+ public void setWorkflowName(String workflowName) {
+ this.workflowName = workflowName;
+ }
+
+ public ArtifactInfo withWorkflowName(String workflowName) {
+ this.workflowName = workflowName;
+ return this;
+ }
+
+ @JsonProperty("operationName")
+ public String getOperationName() {
+ return operationName;
+ }
+
+ @JsonProperty("operationName")
+ public void setOperationName(String operationName) {
+ this.operationName = operationName;
+ }
+
+ public ArtifactInfo withOperationName(String operationName) {
+ this.operationName = operationName;
+ return this;
+ }
+
+ @JsonProperty("workflowSource")
+ public String getWorkflowSource() {
+ return workflowSource;
+ }
+
+ @JsonProperty("workflowSource")
+ public void setWorkflowSource(String workflowSource) {
+ this.workflowSource = workflowSource;
+ }
+
+ public ArtifactInfo withWorkflowSource(String workflowSource) {
+ this.workflowSource = workflowSource;
+ return this;
+ }
+
+ @JsonProperty("workflowResourceTarget")
+ public String getWorkflowResourceTarget() {
+ return workflowResourceTarget;
+ }
+
+ @JsonProperty("workflowResourceTarget")
+ public void setWorkflowResourceTarget(String workflowResourceTarget) {
+ this.workflowResourceTarget = workflowResourceTarget;
+ }
+
+ public ArtifactInfo withWorkflowResourceTarget(String workflowResourceTarget) {
+ this.workflowResourceTarget = workflowResourceTarget;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/Validation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/Validation.java
new file mode 100644
index 0000000000..3a4d5cb5f0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/Validation.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "maxLength",
+ "allowableChars"
+})
+public class Validation {
+
+ @JsonProperty("maxLength")
+ private String maxLength;
+ @JsonProperty("allowableChars")
+ private String allowableChars;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public Validation() {
+ }
+
+ /**
+ *
+ * @param maxLength
+ * @param allowableChars
+ */
+ public Validation(String maxLength, String allowableChars) {
+ super();
+ this.maxLength = maxLength;
+ this.allowableChars = allowableChars;
+ }
+
+ @JsonProperty("maxLength")
+ public String getMaxLength() {
+ return maxLength;
+ }
+
+ @JsonProperty("maxLength")
+ public void setMaxLength(String maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public Validation withMaxLength(String maxLength) {
+ this.maxLength = maxLength;
+ return this;
+ }
+
+ @JsonProperty("allowableChars")
+ public String getAllowableChars() {
+ return allowableChars;
+ }
+
+ @JsonProperty("allowableChars")
+ public void setAllowableChars(String allowableChars) {
+ this.allowableChars = allowableChars;
+ }
+
+ public Validation withAllowableChars(String allowableChars) {
+ this.allowableChars = allowableChars;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowInputParameter.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowInputParameter.java
new file mode 100644
index 0000000000..416442c216
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowInputParameter.java
@@ -0,0 +1,167 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "label",
+ "inputType",
+ "required",
+ "validation",
+ "soFieldName",
+ "soPayloadLocation"
+})
+public class WorkflowInputParameter {
+
+ @JsonProperty("label")
+ private String label;
+ @JsonProperty("inputType")
+ private String inputType;
+ @JsonProperty("required")
+ private Boolean required;
+ @JsonProperty("validation")
+ private List<Validation> validation = null;
+ @JsonProperty("soFieldName")
+ private String soFieldName;
+ @JsonProperty("soPayloadLocation")
+ private String soPayloadLocation;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public WorkflowInputParameter() {
+ }
+
+ /**
+ *
+ * @param validation
+ * @param inputType
+ * @param soPayloadLocation
+ * @param label
+ * @param required
+ * @param soFieldName
+ */
+ public WorkflowInputParameter(String label, String inputType, Boolean required, List<Validation> validation, String soFieldName, String soPayloadLocation) {
+ super();
+ this.label = label;
+ this.inputType = inputType;
+ this.required = required;
+ this.validation = validation;
+ this.soFieldName = soFieldName;
+ this.soPayloadLocation = soPayloadLocation;
+ }
+
+ @JsonProperty("label")
+ public String getLabel() {
+ return label;
+ }
+
+ @JsonProperty("label")
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public WorkflowInputParameter withLabel(String label) {
+ this.label = label;
+ return this;
+ }
+
+ @JsonProperty("inputType")
+ public String getInputType() {
+ return inputType;
+ }
+
+ @JsonProperty("inputType")
+ public void setInputType(String inputType) {
+ this.inputType = inputType;
+ }
+
+ public WorkflowInputParameter withInputType(String inputType) {
+ this.inputType = inputType;
+ return this;
+ }
+
+ @JsonProperty("required")
+ public Boolean getRequired() {
+ return required;
+ }
+
+ @JsonProperty("required")
+ public void setRequired(Boolean required) {
+ this.required = required;
+ }
+
+ public WorkflowInputParameter withRequired(Boolean required) {
+ this.required = required;
+ return this;
+ }
+
+ @JsonProperty("validation")
+ public List<Validation> getValidation() {
+ return validation;
+ }
+
+ @JsonProperty("validation")
+ public void setValidation(List<Validation> validation) {
+ this.validation = validation;
+ }
+
+ public WorkflowInputParameter withValidation(List<Validation> validation) {
+ this.validation = validation;
+ return this;
+ }
+
+ @JsonProperty("soFieldName")
+ public String getSoFieldName() {
+ return soFieldName;
+ }
+
+ @JsonProperty("soFieldName")
+ public void setSoFieldName(String soFieldName) {
+ this.soFieldName = soFieldName;
+ }
+
+ public WorkflowInputParameter withSoFieldName(String soFieldName) {
+ this.soFieldName = soFieldName;
+ return this;
+ }
+
+ @JsonProperty("soPayloadLocation")
+ public String getSoPayloadLocation() {
+ return soPayloadLocation;
+ }
+
+ @JsonProperty("soPayloadLocation")
+ public void setSoPayloadLocation(String soPayloadLocation) {
+ this.soPayloadLocation = soPayloadLocation;
+ }
+
+ public WorkflowInputParameter withSoPayloadLocation(String soPayloadLocation) {
+ this.soPayloadLocation = soPayloadLocation;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecification.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecification.java
new file mode 100644
index 0000000000..86dc44ef39
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecification.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "artifactInfo",
+ "activitySequence",
+ "workflowInputParameters"
+})
+public class WorkflowSpecification {
+
+ @JsonProperty("artifactInfo")
+ private ArtifactInfo artifactInfo;
+ @JsonProperty("activitySequence")
+ private List<ActivitySequence> activitySequence = null;
+ @JsonProperty("workflowInputParameters")
+ private List<WorkflowInputParameter> workflowInputParameters = null;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public WorkflowSpecification() {
+ }
+
+ /**
+ *
+ * @param activitySequence
+ * @param artifactInfo
+ * @param workflowInputParameters
+ */
+ public WorkflowSpecification(ArtifactInfo artifactInfo, List<ActivitySequence> activitySequence, List<WorkflowInputParameter> workflowInputParameters) {
+ super();
+ this.artifactInfo = artifactInfo;
+ this.activitySequence = activitySequence;
+ this.workflowInputParameters = workflowInputParameters;
+ }
+
+ @JsonProperty("artifactInfo")
+ public ArtifactInfo getArtifactInfo() {
+ return artifactInfo;
+ }
+
+ @JsonProperty("artifactInfo")
+ public void setArtifactInfo(ArtifactInfo artifactInfo) {
+ this.artifactInfo = artifactInfo;
+ }
+
+ public WorkflowSpecification withArtifactInfo(ArtifactInfo artifactInfo) {
+ this.artifactInfo = artifactInfo;
+ return this;
+ }
+
+ @JsonProperty("activitySequence")
+ public List<ActivitySequence> getActivitySequence() {
+ return activitySequence;
+ }
+
+ @JsonProperty("activitySequence")
+ public void setActivitySequence(List<ActivitySequence> activitySequence) {
+ this.activitySequence = activitySequence;
+ }
+
+ public WorkflowSpecification withActivitySequence(List<ActivitySequence> activitySequence) {
+ this.activitySequence = activitySequence;
+ return this;
+ }
+
+ @JsonProperty("workflowInputParameters")
+ public List<WorkflowInputParameter> getWorkflowInputParameters() {
+ return workflowInputParameters;
+ }
+
+ @JsonProperty("workflowInputParameters")
+ public void setWorkflowInputParameters(List<WorkflowInputParameter> workflowInputParameters) {
+ this.workflowInputParameters = workflowInputParameters;
+ }
+
+ public WorkflowSpecification withWorkflowInputParameters(List<WorkflowInputParameter> workflowInputParameters) {
+ this.workflowInputParameters = workflowInputParameters;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationList.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationList.java
new file mode 100644
index 0000000000..c6bf4e3d41
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationList.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "workflowSpecification"
+})
+public class WorkflowSpecificationList {
+
+ @JsonProperty("workflowSpecification")
+ private WorkflowSpecification workflowSpecification;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public WorkflowSpecificationList() {
+ }
+
+ /**
+ *
+ * @param workflowSpecification
+ */
+ public WorkflowSpecificationList(WorkflowSpecification workflowSpecification) {
+ super();
+ this.workflowSpecification = workflowSpecification;
+ }
+
+ @JsonProperty("workflowSpecification")
+ public WorkflowSpecification getWorkflowSpecification() {
+ return workflowSpecification;
+ }
+
+ @JsonProperty("workflowSpecification")
+ public void setWorkflowSpecification(WorkflowSpecification workflowSpecification) {
+ this.workflowSpecification = workflowSpecification;
+ }
+
+ public WorkflowSpecificationList withWorkflowSpecification(WorkflowSpecification workflowSpecification) {
+ this.workflowSpecification = workflowSpecification;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecifications.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecifications.java
new file mode 100644
index 0000000000..ffe9980af4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecifications.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "workflowSpecificationList"
+})
+public class WorkflowSpecifications {
+
+ @JsonProperty("workflowSpecificationList")
+ private List<WorkflowSpecificationList> workflowSpecificationList = null;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public WorkflowSpecifications() {
+ }
+
+ /**
+ *
+ * @param workflowSpecificationList
+ */
+ public WorkflowSpecifications(List<WorkflowSpecificationList> workflowSpecificationList) {
+ super();
+ this.workflowSpecificationList = workflowSpecificationList;
+ }
+
+ @JsonProperty("workflowSpecificationList")
+ public List<WorkflowSpecificationList> getWorkflowSpecificationList() {
+ return workflowSpecificationList;
+ }
+
+ @JsonProperty("workflowSpecificationList")
+ public void setWorkflowSpecificationList(List<WorkflowSpecificationList> workflowSpecificationList) {
+ this.workflowSpecificationList = workflowSpecificationList;
+ }
+
+ public WorkflowSpecifications withWorkflowSpecificationList(List<WorkflowSpecificationList> workflowSpecificationList) {
+ this.workflowSpecificationList = workflowSpecificationList;
+ return this;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java
index 68c5c918ba..e249c2d8ef 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java
@@ -53,6 +53,7 @@ public class BeanMultiTest {
test("org.onap.so.apihandlerinfra.tasksbeans");
test("org.onap.so.apihandlerinfra.vnfbeans");
test("org.onap.so.apihandlerinfra.tenantisolationbeans");
+ test("org.onap.so.apihandlerinfra.workflowspecificationbeans");
}
private void test(String packageName) {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
new file mode 100644
index 0000000000..1a2eca6300
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.apihandlerinfra;
+
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.text.ParseException;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONException;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.workflowspecificationbeans.WorkflowSpecifications;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class WorkflowSpecificationsHandlerTest extends BaseTest{
+
+ private final String basePath = "onap/so/infra/workflowSpecifications/v1/workflows";
+
+ @Test
+ public void getTasksTestByOriginalRequestId() throws ParseException, JSONException, JsonParseException, JsonMappingException, IOException{
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(basePath))
+ .queryParam("vnfModelVersionId", "b5fa707a-f55a-11e7-a796-005056856d52");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+ ObjectMapper mapper = new ObjectMapper();
+
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ WorkflowSpecifications expectedResponse = mapper.readValue(new String(Files.readAllBytes(Paths.get("src/test/resources/__files/WorkflowSpecifications.json"))), WorkflowSpecifications.class);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ WorkflowSpecifications realResponse = mapper.readValue(response.getBody(), WorkflowSpecifications.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationBeansTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationBeansTest.java
new file mode 100644
index 0000000000..c469a56e48
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/workflowspecificationbeans/WorkflowSpecificationBeansTest.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.apihandlerinfra.workflowspecificationbeans;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+
+import com.openpojo.reflection.filters.FilterPackageInfo;
+import com.openpojo.validation.Validator;
+import com.openpojo.validation.ValidatorBuilder;
+import com.openpojo.validation.rule.impl.GetterMustExistRule;
+import com.openpojo.validation.rule.impl.SetterMustExistRule;
+import com.openpojo.validation.test.impl.GetterTester;
+import com.openpojo.validation.test.impl.SetterTester;
+
+public class WorkflowSpecificationBeansTest extends BaseTest{
+ @Test
+ public void validateGettersAndSetters() {
+ Validator validator = ValidatorBuilder.create().with(new SetterMustExistRule(), new GetterMustExistRule())
+ .with(new SetterTester(), new GetterTester()).build();
+ validator.validate("org.onap.so.apihandlerinfra.tasksbeans", new FilterPackageInfo());
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/WorkflowSpecifications.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/WorkflowSpecifications.json
new file mode 100644
index 0000000000..beca93bd70
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/WorkflowSpecifications.json
@@ -0,0 +1,116 @@
+{
+ "workflowSpecificationList": [
+ {
+ "workflowSpecification": {
+ "artifactInfo": {
+ "artifactType": "workflow",
+ "artifactUuid": "ab6478e4-ea33-3346-ac12-ab121484a333",
+ "artifactName": "inPlaceSoftwareUpdate-1_0.bpmn",
+ "artifactVersion": "1.0",
+ "artifactDescription": "xyz xyz",
+ "workflowName": "inPlaceSoftwareUpdate",
+ "operationName": "inPlaceSoftwareUpdate",
+ "workflowSource": "sdc",
+ "workflowResourceTarget": "vnf"
+ },
+ "activitySequence": [
+ {
+ "name": "VNFQuiesceTrafficActivity",
+ "description": "Activity to QuiesceTraffic on VNF"
+ },
+ {
+ "name": "VNFHealthCheckActivity",
+ "description": "Activity to HealthCheck VNF"
+ },
+ {
+ "name": "FlowCompleteActivity",
+ "description": "Activity to Complete the BPMN Flow"
+ }
+ ],
+ "workflowInputParameters": [
+ {
+ "label": "Cloud Owner",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "7",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "cloudOwner",
+ "soPayloadLocation": "cloudConfiguration"
+ },
+ {
+ "label": "Cloud Region ID",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "7",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "lcpCloudRegionId",
+ "soPayloadLocation": "cloudConfiguration"
+ },
+ {
+ "label": "Tenant/Project ID",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "36",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "tenantId",
+ "soPayloadLocation": "cloudConfiguration"
+ },
+ {
+ "label": "Operations Timeout",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "50",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "operations_timeout",
+ "soPayloadLocation": "userParams"
+ },
+ {
+ "label": "Existing Software Version",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "50",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "existing_software_version",
+ "soPayloadLocation": "userParams"
+ },
+ {
+ "label": "New Software Version",
+ "inputType": "text",
+ "required": true,
+ "validation": [
+ {
+ "maxLength": "50",
+ "allowableChars": "someRegEx"
+ }
+ ],
+ "soFieldName": "new_software_version",
+ "soPayloadLocation": "userParams"
+ }
+ ]
+ }
+ },
+ {
+ "workflowSpecification": {}
+ }
+ ]
+}