messages);
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/java/com/backbase/example/model/Message.java b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/java/com/backbase/example/model/Message.java
new file mode 100644
index 0000000..3eed06b
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/java/com/backbase/example/model/Message.java
@@ -0,0 +1,43 @@
+package com.backbase.example.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+import javax.annotation.Generated;
+import javax.validation.constraints.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "messageId",
+ "message"
+})
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Message {
+
+ @JsonProperty("messageId")
+ @NotNull
+ private String messageId;
+
+ @JsonProperty("message")
+ @NotNull
+ private String message;
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/application.yml b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/application.yml
new file mode 100644
index 0000000..9b286a6
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/application.yml
@@ -0,0 +1,27 @@
+server:
+ port: 9915
+
+# API Registry client configuration
+eureka:
+ instance:
+ metadata-map:
+ public: true
+ role: live
+ client:
+ serviceUrl:
+ defaultZone: http://localhost:8080/registry/eureka/
+
+# Configure Internal JWT handler
+sso:
+ jwt:
+ internal:
+ signature:
+ key:
+ type: ENV
+ value: SIG_SECRET_KEY
+
+# Spring health monitoring
+management:
+ health:
+ jms:
+ enabled: false
\ No newline at end of file
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/banner.txt b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/banner.txt
new file mode 100644
index 0000000..3e84197
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/banner.txt
@@ -0,0 +1,9 @@
+ ________ ________ ________ ___ __ ________ ________ ________ _______
+|\ __ \|\ __ \|\ ____\|\ \|\ \ |\ __ \|\ __ \|\ ____\|\ ___ \
+\ \ \|\ /\ \ \|\ \ \ \___|\ \ \/ /|\ \ \|\ /\ \ \|\ \ \ \___|\ \ __/|
+ \ \ __ \ \ __ \ \ \ \ \ ___ \ \ __ \ \ __ \ \_____ \ \ \_|/__
+ \ \ \|\ \ \ \ \ \ \ \____\ \ \\ \ \ \ \|\ \ \ \ \ \|____|\ \ \ \_|\ \
+ \ \_______\ \__\ \__\ \_______\ \__\\ \__\ \_______\ \__\ \__\____\_\ \ \_______\
+ \|_______|\|__|\|__|\|_______|\|__| \|__|\|_______|\|__|\|__|\_________\|_______|
+ \|_________|
+
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/bootstrap.yml b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..4212129
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/main/resources/bootstrap.yml
@@ -0,0 +1,3 @@
+spring:
+ application:
+ name: example-integration-service
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/test/java/com/backbase/example/ExampleControllerIT.java b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/test/java/com/backbase/example/ExampleControllerIT.java
new file mode 100644
index 0000000..9be8800
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-service/src/test/java/com/backbase/example/ExampleControllerIT.java
@@ -0,0 +1,77 @@
+package com.backbase.example;
+
+
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import com.backbase.buildingblocks.testutils.TestTokenUtil;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.util.List;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.annotation.DirtiesContext.ClassMode;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+
+/**
+ * A wrapper annotation for use with integration tests.
+ *
+ * By default, assumes the integration test modifies the {@link ApplicationContext} associated with the test/s and will
+ * therefore be closed and removed from the context cache at the end of the class.
+ */
+@SpringBootTest(classes = Application.class)
+@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
+@RunWith(SpringJUnit4ClassRunner.class)
+@AutoConfigureMockMvc
+@ActiveProfiles("it")
+public class ExampleControllerIT {
+
+ public static final String TEST_JWT =
+ "{\n"
+ + " \"Role\" : [\n"
+ + " \"Manager\",\n"
+ + " \"Project Administrator\"\n"
+ + " ],\n"
+ + " \"inuid\" : \"Jimmy\",\n"
+ + " \"aud\" : \"www.example.com\",\n"
+ + " \"sub\" : \"jrocket@example.com\",\n"
+ + " \"Email\" : \"jrocket@example.com\",\n"
+ + " \"iss\" : \"Online JWT Builder\",\n"
+ + " \"GivenName\" : \"Johnny\",\n"
+ + " \"exp\" : 1516356196,\n"
+ + " \"iat\" : 1484820196,\n"
+ + " \"Surname\" : \"Rocket\"\n"
+ + "}";
+ @Autowired
+ private MockMvc mvc;
+
+ @Test
+ public void exampleTest() throws Exception {
+ MockHttpServletRequestBuilder requestBuilder = get("/client-api/v1/all-messages")
+ .header("Authorization", "Bearer "+TestTokenUtil.encode(TEST_JWT));
+
+ ResultActions result = mvc.perform(requestBuilder);
+
+ // Then the request is successful
+ result.andExpect(status().isOk());
+
+ List message = new ObjectMapper()
+ .readValue(result.andReturn().getResponse().getContentAsString(),
+ new TypeReference>() {
+ });
+
+ assertThat(message, notNullValue());
+ assertThat(message.get(0).getMessage(), notNullValue());
+ assertThat(message.get(0).getId(), notNullValue());
+ }
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/.gitignore b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/.gitignore
new file mode 100644
index 0000000..8fcb18f
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/.gitignore
@@ -0,0 +1,8 @@
+/target
+.DS_Store
+.idea
+*.iml
+/src/main/java
+/src/main/resources/lib
+node_modules
+fe-dist
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/README.md b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/README.md
new file mode 100644
index 0000000..5a9c77a
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/README.md
@@ -0,0 +1,25 @@
+# Example Integration Service API Spec
+
+> _Fill out this file with some information about your OpenAPI spec._
+
+To build this spec, use:
+```
+mvn clean install
+```
+
+The spec is also validated as part of the build.
+
+## Community Documentation
+
+Add links to documentation including setup, config, etc.
+
+##Jira Project
+
+Add link to Jira project.
+
+## Confluence Links
+Links to relevant confluence pages (design etc).
+
+## Support
+
+Slack, Email, Jira etc.
\ No newline at end of file
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/pom.xml b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/pom.xml
new file mode 100644
index 0000000..a6ad526
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/pom.xml
@@ -0,0 +1,96 @@
+
+
+ 4.0.0
+
+
+ com.backbase.buildingblocks
+ backbase-openapi-spec-starter-parent
+ 12.1.0
+
+
+ com.backbase.poc
+ example-integration-spec
+ 1.0.0-SNAPSHOT
+ Backbase :: Example Integration Service API Spec
+
+
+
+ 0.14.1
+
+
+
+
+
+ com.backbase.oss
+ boat-tmaven-plugin
+ ${boat-maven-plugin.version}
+
+
+ boat-validation
+ generate-sources
+
+ validate
+
+
+ ${project.basedir}/src/main/resources/client-api-v1.yaml
+ true
+
+
+
+
+ boat-bundle
+ generate-sources
+
+ bundle
+
+
+ ${project.basedir}/src/main/resources
+
+ true
+
+
+
+
+ boat-bundle-unversioned
+ generate-sources
+
+ bundle
+
+
+ ${project.basedir}/src/main/resources
+
+ false
+
+
+
+ boat-linting
+ package
+
+ lint
+
+
+ ${project.build.directory}
+
+ true
+ true
+
+
+
+ boat-docs
+ package
+
+ generate
+
+
+ ${project.build.directory}/unversioned/client-api-v1.yaml
+
+ html2
+ true
+
+
+
+
+
+
+
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/client-api-v1.yaml b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/client-api-v1.yaml
new file mode 100644
index 0000000..297e773
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/client-api-v1.yaml
@@ -0,0 +1,169 @@
+openapi: 3.0.3
+info:
+ title: Message Service API Spec
+ description: Specs for Message Service API
+ version: 1.0.0
+ x-icon: credit_card
+
+servers:
+ - description: local test
+ url: http://localhost:8080/api/v1
+
+tags:
+ - name: Retail
+
+paths:
+
+ /client-api/v1/messages:
+ description: No description available
+
+ get:
+ summary: Returns available items, optionally filtered by name.
+ description: Returns available items, optionally filtered by name
+ operationId: getMessage
+ parameters:
+ - description: Id of the message record
+ example: a5b0fe7d-c4dd-40a7-bd80-dfc7869327e1
+ in: query
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ $ref: examples/body/example-message.json
+ schema:
+ $ref: '#/components/schemas/Message'
+ description: No description available
+ '400':
+ $ref: 'lib/common-types.yaml#/components/responses/400BadRequest'
+ '500':
+ $ref: 'lib/common-types.yaml#/components/responses/500InternalServerError'
+ tags:
+ - message
+
+ delete:
+ summary: Delete message.
+ description: Deletes a message
+ operationId: deleteMessage
+ parameters:
+ - description: Id of the message record
+ example: a5b0fe7d-c4dd-40a7-bd80-dfc7869327e1
+ in: query
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: request to delete completed
+ '400':
+ $ref: 'lib/common-types.yaml#/components/responses/400BadRequest'
+ '500':
+ $ref: 'lib/common-types.yaml#/components/responses/500InternalServerError'
+ tags:
+ - message
+
+ post:
+ summary: Adds or updates a message.
+ description: Adds or updates a message
+ operationId: postMessage
+ requestBody:
+ content:
+ application/json:
+ example:
+ $ref: examples/body/example-message.json
+ schema:
+ $ref: '#/components/schemas/Message'
+ description: Adds or updates a message
+ responses:
+ '201':
+ content:
+ application/json:
+ example:
+ $ref: examples/body/example-message-created.json
+ schema:
+ $ref: '#/components/schemas/MessagePostResponseBody'
+ description: request to create item accepted
+ '400':
+ $ref: 'lib/common-types.yaml#/components/responses/400BadRequest'
+ '500':
+ $ref: 'lib/common-types.yaml#/components/responses/500InternalServerError'
+ tags:
+ - message
+
+ put:
+ summary: Adds or updates a message.
+ description: Adds or updates a message
+ operationId: putMessage
+ requestBody:
+ content:
+ application/json:
+ example:
+ $ref: examples/body/example-message.json
+ schema:
+ $ref: '#/components/schemas/Message'
+ description: Adds or updates a message
+ responses:
+ '204':
+ description: request to update item completed
+ '400':
+ $ref: 'lib/common-types.yaml#/components/responses/400BadRequest'
+ '500':
+ $ref: 'lib/common-types.yaml#/components/responses/500InternalServerError'
+ tags:
+ - message
+
+ /client-api/v1/all-messages:
+ summary: messages
+ description: No description available
+ get:
+ summary: Returns all available messages.
+ description: Returns all available messages
+ operationId: getMessages
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ $ref: examples/body/example-messages-get.json
+ schema:
+ $ref: '#/components/schemas/MessagesGetResponseBody'
+ description: No description available
+ '400':
+ $ref: 'lib/common-types.yaml#/components/responses/400BadRequest'
+ '500':
+ $ref: 'lib/common-types.yaml#/components/responses/500InternalServerError'
+ tags:
+ - message
+
+components:
+ schemas:
+ ErrorItem:
+ $ref: 'lib/schemas/error-item.yaml'
+ Message:
+ $ref: schemas/body/message.json
+ MessagesGetResponseBody:
+ $ref: schemas/body/messages-get.json
+ MessagePostResponseBody:
+ $ref: schemas/body/message-created.json
+ NotAcceptableError:
+ properties:
+ message:
+ type: string
+ supportedMediaTypes:
+ description: List of supported media types for this endpoint
+ items:
+ type: string
+ type: array
+ type: object
+ UnauthorizedError:
+ properties:
+ message:
+ type: string
+ required:
+ - message
+ type: object
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/docs/api.md b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/docs/api.md
new file mode 100644
index 0000000..3365a26
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/docs/api.md
@@ -0,0 +1,7 @@
+# Example Persistence Service API Spec API Documentation
+
+Currently the Example Persistence Service API Spec API contains the following operations:
+* Create an item or Update an item
+* Get an item by ID
+* Get list of items, optionally filtering by name
+* Delete item
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message-created.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message-created.json
new file mode 100644
index 0000000..66dc6ed
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message-created.json
@@ -0,0 +1,3 @@
+{
+ "id": "a5b0fe7d-c4dd-40a7-bd80-dfc7869327e1"
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message.json
new file mode 100644
index 0000000..03564aa
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-message.json
@@ -0,0 +1,4 @@
+{
+ "id": "a5b0fe7d-c4dd-40a7-bd80-dfc7869327e1",
+ "message": "Hello"
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-messages-get.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-messages-get.json
new file mode 100644
index 0000000..bfcbcd8
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/body/example-messages-get.json
@@ -0,0 +1,14 @@
+[
+ {
+ "id": "a5b0fe7d-c4dd-40a7-bd80-dfc7869327e1",
+ "message": "Hello"
+ },
+ {
+ "id": "d593c212-70ad-41a6-a547-d5d9232414cb",
+ "message": "Hola"
+ },
+ {
+ "id": "9635966b-28e9-4479-8121-bb7bc9beeb62",
+ "message": "hej"
+ }
+]
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/errors/example-error.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/errors/example-error.json
new file mode 100644
index 0000000..2904b69
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/examples/errors/example-error.json
@@ -0,0 +1,3 @@
+{
+ "message": "Description of error"
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message-created.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message-created.json
new file mode 100644
index 0000000..0f30393
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message-created.json
@@ -0,0 +1,8 @@
+{
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ }
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message.json
new file mode 100644
index 0000000..74fd94d
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/message.json
@@ -0,0 +1,15 @@
+{
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "message"
+ ]
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/messages-get.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/messages-get.json
new file mode 100644
index 0000000..00778c9
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/body/messages-get.json
@@ -0,0 +1,6 @@
+{
+ "type": "array",
+ "items": {
+ "$ref": "message.json"
+ }
+}
diff --git a/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/errors/error.json b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/errors/error.json
new file mode 100644
index 0000000..5c30948
--- /dev/null
+++ b/service-sdk/12.0.0/create-outbound-integration-service-openapi/example-integration-spec/src/main/resources/schemas/errors/error.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ]
+}