- updated swagger description
- added api-gateway to docker-compose build
This commit is contained in:
@@ -5,6 +5,7 @@ import net.chrisrichardson.eventstore.client.config.EventStoreHttpClientConfigur
|
|||||||
import net.chrisrichardson.eventstore.javaexamples.banking.commonauth.AuthConfiguration;
|
import net.chrisrichardson.eventstore.javaexamples.banking.commonauth.AuthConfiguration;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
|
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -16,6 +17,7 @@ import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
|||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
@@ -24,9 +26,10 @@ import java.util.Collections;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan
|
@ComponentScan
|
||||||
|
@EnableAutoConfiguration
|
||||||
@Import({EventStoreHttpClientConfiguration.class, AuthConfiguration.class})
|
@Import({EventStoreHttpClientConfiguration.class, AuthConfiguration.class})
|
||||||
@EnableConfigurationProperties({ApiGatewayProperties.class})
|
@EnableConfigurationProperties({ApiGatewayProperties.class})
|
||||||
public class ApiGatewayServiceConfiguration {
|
public class ApiGatewayServiceConfiguration extends WebMvcConfigurerAdapter {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public RestTemplate restTemplate(HttpMessageConverters converters) {
|
public RestTemplate restTemplate(HttpMessageConverters converters) {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import static org.springframework.web.bind.annotation.RequestMethod.*;
|
|||||||
* Created by popikyardo on 15.01.16.
|
* Created by popikyardo on 15.01.16.
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api")
|
|
||||||
public class GatewayController {
|
public class GatewayController {
|
||||||
|
|
||||||
Logger log = LoggerFactory.getLogger(this.getClass());
|
Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
@@ -50,7 +49,7 @@ public class GatewayController {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/**", method = {GET, POST, PUT, DELETE})
|
@RequestMapping(value = "/**", method = {GET, POST})
|
||||||
public String proxyRequest(HttpServletRequest request) throws NoSuchRequestHandlingMethodException, IOException, URISyntaxException {
|
public String proxyRequest(HttpServletRequest request) throws NoSuchRequestHandlingMethodException, IOException, URISyntaxException {
|
||||||
HttpUriRequest proxiedRequest = createHttpUriRequest(request);
|
HttpUriRequest proxiedRequest = createHttpUriRequest(request);
|
||||||
log.info("request: {}", proxiedRequest);
|
log.info("request: {}", proxiedRequest);
|
||||||
|
|||||||
19
java-spring/api-gateway-service/src/main/resources/logback.xml
Executable file
19
java-spring/api-gateway-service/src/main/resources/logback.xml
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
|
||||||
|
<!-- [%thread] -->
|
||||||
|
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||||
|
<Pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</Pattern>
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="error">
|
||||||
|
<appender-ref ref="STDOUT" />
|
||||||
|
</root>
|
||||||
|
<logger name="org.springframework" level='info'>
|
||||||
|
</logger>
|
||||||
|
<logger name="net.chrisrichardson.eventstore.client" level='info'>
|
||||||
|
</logger>
|
||||||
|
</configuration>
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
apigateway:
|
||||||
|
image: java:8
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./api-gateway-service/build/libs:/app
|
||||||
|
command: java -jar /app/api-gateway-service.jar --accounts.commandside.service.host=accountscommandside --transactions.commandside.service.host=transactionscommandside --accounts.queryside.service.host=accountsqueryside --customers.commandside.service.host=customerscommandside --customers.queryside.service.host=customersqueryside
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
links:
|
||||||
|
- accountscommandside
|
||||||
|
- transactionscommandside
|
||||||
|
- accountsqueryside
|
||||||
|
- customerscommandside
|
||||||
|
- customersqueryside
|
||||||
|
environment:
|
||||||
|
EVENTUATE_API_KEY_ID:
|
||||||
|
EVENTUATE_API_KEY_SECRET:
|
||||||
|
|
||||||
accountscommandside:
|
accountscommandside:
|
||||||
image: java:8
|
image: java:8
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
@@ -5,7 +23,7 @@ accountscommandside:
|
|||||||
- ./accounts-command-side-service/build/libs:/app
|
- ./accounts-command-side-service/build/libs:/app
|
||||||
command: java -jar /app/accounts-command-side-service.jar
|
command: java -jar /app/accounts-command-side-service.jar
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8085:8080"
|
||||||
environment:
|
environment:
|
||||||
EVENTUATE_API_KEY_ID:
|
EVENTUATE_API_KEY_ID:
|
||||||
EVENTUATE_API_KEY_SECRET:
|
EVENTUATE_API_KEY_SECRET:
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package net.chrisrichardson.eventstore.examples.bank.web;
|
package net.chrisrichardson.eventstore.examples.bank.web;
|
||||||
|
|
||||||
|
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.Address;
|
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.*;
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerInfo;
|
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerResponse;
|
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.Name;
|
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.commonauth.utils.BasicAuthUtils;
|
import net.chrisrichardson.eventstore.javaexamples.banking.commonauth.utils.BasicAuthUtils;
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.web.commandside.accounts.CreateAccountRequest;
|
import net.chrisrichardson.eventstore.javaexamples.banking.web.commandside.accounts.CreateAccountRequest;
|
||||||
import net.chrisrichardson.eventstore.javaexamples.banking.web.commandside.accounts.CreateAccountResponse;
|
import net.chrisrichardson.eventstore.javaexamples.banking.web.commandside.accounts.CreateAccountResponse;
|
||||||
@@ -147,20 +144,20 @@ public class EndToEndTest {
|
|||||||
|
|
||||||
private void assertCustomerResponse(final String customerId, final CustomerInfo customerInfo) {
|
private void assertCustomerResponse(final String customerId, final CustomerInfo customerInfo) {
|
||||||
eventually(
|
eventually(
|
||||||
new Producer<CustomerResponse>() {
|
new Producer<QuerySideCustomer>() {
|
||||||
@Override
|
@Override
|
||||||
public Observable<CustomerResponse> produce() {
|
public Observable<QuerySideCustomer> produce() {
|
||||||
return Observable.just(BasicAuthUtils.doBasicAuthenticatedRequest(restTemplate,
|
return Observable.just(BasicAuthUtils.doBasicAuthenticatedRequest(restTemplate,
|
||||||
customersQuerySideBaseUrl("/customers/" + customerId),
|
customersQuerySideBaseUrl("/customers/" + customerId),
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
CustomerResponse.class));
|
QuerySideCustomer.class));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Verifier<CustomerResponse>() {
|
new Verifier<QuerySideCustomer>() {
|
||||||
@Override
|
@Override
|
||||||
public void verify(CustomerResponse customerResponse) {
|
public void verify(QuerySideCustomer querySideCustomer) {
|
||||||
Assert.assertEquals(customerId, customerResponse.getId());
|
Assert.assertEquals(customerId, querySideCustomer.getId());
|
||||||
Assert.assertEquals(customerInfo, customerResponse.getCustomerInfo());
|
assertQuerySideCustomerEqualscCustomerInfo(querySideCustomer, customerInfo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -179,4 +176,11 @@ public class EndToEndTest {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void assertQuerySideCustomerEqualscCustomerInfo(QuerySideCustomer querySideCustomer, CustomerInfo customerInfo) {
|
||||||
|
Assert.assertEquals(querySideCustomer.getName(), customerInfo.getName());
|
||||||
|
Assert.assertEquals(querySideCustomer.getEmail(), customerInfo.getEmail());
|
||||||
|
Assert.assertEquals(querySideCustomer.getPhoneNumber(), customerInfo.getPhoneNumber());
|
||||||
|
Assert.assertEquals(querySideCustomer.getSsn(), customerInfo.getSsn());
|
||||||
|
Assert.assertEquals(querySideCustomer.getAddress(), customerInfo.getAddress());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,30 +17,38 @@
|
|||||||
"basePath": "/",
|
"basePath": "/",
|
||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"name": "customer-service-command-side-controller",
|
"name": "account-query-controller",
|
||||||
"description": "Customer Service Commandside Controller"
|
"description": "Account Query Controller"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "customer-service-query-side-controller",
|
"name": "money-transfer-controller",
|
||||||
"description": "Customer Service Queryside Controller"
|
"description": "Money Transfer Controller"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "account-query-side-controller",
|
|
||||||
"description": "Account Service Queryside Controller"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "auth-controller",
|
"name": "auth-controller",
|
||||||
"description": "Authentication Controller"
|
"description": "Auth Controller"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "customer-controller",
|
||||||
|
"description": "Customer Controller"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "customer-query-controller",
|
||||||
|
"description": "Customer Query Controller"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "account-controller",
|
||||||
|
"description": "Account Controller"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"/login": {
|
"/accounts": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"auth-controller"
|
"account-controller"
|
||||||
],
|
],
|
||||||
"summary": "doAuth",
|
"summary": "createAccount",
|
||||||
"operationId": "doAuthUsingPOST",
|
"operationId": "createAccountUsingPOST",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -54,7 +62,7 @@
|
|||||||
"description": "request",
|
"description": "request",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/AuthRequest"
|
"$ref": "#/definitions/CreateAccountRequest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -62,7 +70,39 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CustomerResponse"
|
"$ref": "#/definitions/CreateAccountResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/accounts/{accountId}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"account-query-controller"
|
||||||
|
],
|
||||||
|
"summary": "get",
|
||||||
|
"operationId": "getUsingGET",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"*/*"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "accountId",
|
||||||
|
"in": "path",
|
||||||
|
"description": "accountId",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/GetAccountResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,21 +111,21 @@
|
|||||||
"/customers": {
|
"/customers": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"customer-service-query-side-controller"
|
"customer-query-controller"
|
||||||
],
|
],
|
||||||
"summary": "getAllCustomersByEmail",
|
"summary": "getCustomersByEmail",
|
||||||
"operationId": "getAllCustomersByEmailUsingGET",
|
"operationId": "getCustomersByEmailUsingGET",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"produces": [
|
"produces": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "email",
|
"name": "email",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"description": "customer's email",
|
"description": "email",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@@ -101,10 +141,10 @@
|
|||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"customer-service-command-side-controller"
|
"customer-controller"
|
||||||
],
|
],
|
||||||
"summary": "saveCustomer",
|
"summary": "createCustomer",
|
||||||
"operationId": "saveCustomerUsingPOST",
|
"operationId": "createCustomerUsingPOST",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -128,20 +168,17 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CustomerResponse"
|
"$ref": "#/definitions/CustomerResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Validation error"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/customers/{id}": {
|
"/customers/{customerId}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"customer-service-query-side-controller"
|
"customer-query-controller"
|
||||||
],
|
],
|
||||||
"summary": "getBoard",
|
"summary": "getCustomer",
|
||||||
"operationId": "getBoardUsingGET",
|
"operationId": "getCustomerUsingGET",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -150,9 +187,9 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "customerId",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"description": "id",
|
"description": "customerId",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@@ -161,7 +198,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CustomerResponse"
|
"$ref": "#/definitions/QuerySideCustomer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,7 +207,7 @@
|
|||||||
"/customers/{id}/toaccounts": {
|
"/customers/{id}/toaccounts": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"customer-service-command-side-controller"
|
"customer-controller"
|
||||||
],
|
],
|
||||||
"summary": "addToAccount",
|
"summary": "addToAccount",
|
||||||
"operationId": "addToAccountUsingPOST",
|
"operationId": "addToAccountUsingPOST",
|
||||||
@@ -200,94 +237,166 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK"
|
"description": "OK",
|
||||||
},
|
"schema": {
|
||||||
"400": {
|
"type": "string"
|
||||||
"description": "Validation error"
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/login": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"auth-controller"
|
||||||
|
],
|
||||||
|
"summary": "doAuth",
|
||||||
|
"operationId": "doAuthUsingPOST",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"*/*"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "request",
|
||||||
|
"description": "request",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/AuthRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/QuerySideCustomer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/transfers": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"money-transfer-controller"
|
||||||
|
],
|
||||||
|
"summary": "createMoneyTransfer",
|
||||||
|
"operationId": "createMoneyTransferUsingPOST",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"*/*"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "request",
|
||||||
|
"description": "request",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/CreateMoneyTransferRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/CreateMoneyTransferResponse"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"CreateAccountResponse": {
|
||||||
|
"properties": {
|
||||||
|
"accountId": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"AuthRequest": {
|
"AuthRequest": {
|
||||||
"required": [ "email" ],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AuthResponse": {
|
"QuerySideCustomer": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"token": {
|
"address": {
|
||||||
|
"$ref": "#/definitions/Address"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
},
|
||||||
}
|
"id": {
|
||||||
},
|
"type": "string"
|
||||||
"CustomerInfo": {
|
},
|
||||||
"required": [ "email" ],
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
"name": {
|
||||||
"$ref": "#/definitions/Name"
|
"$ref": "#/definitions/Name"
|
||||||
},
|
},
|
||||||
"email": {
|
"phoneNumber": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"ssn": {
|
"ssn": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"phoneNumber": {
|
"toAccounts": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
},
|
"additionalProperties": {
|
||||||
"address": {
|
"$ref": "#/definitions/ToAccountInfo"
|
||||||
"$ref": "#/definitions/Address"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"CustomersQueryResponse": {
|
|
||||||
"properties": {
|
|
||||||
"customers": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/CustomerResponse"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CustomerResponse": {
|
"Address": {
|
||||||
"required": [ "id", "customerInfo" ],
|
"properties": {
|
||||||
|
"city": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"street1": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"street2": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"zipCode": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreateMoneyTransferResponse": {
|
||||||
|
"properties": {
|
||||||
|
"moneyTransferId": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ToAccountInfo": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"customerInfo": {
|
"owner": {
|
||||||
"$ref": "#/definitions/CustomerInfo"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AccountsQueryResponse": {
|
|
||||||
"properties": {
|
|
||||||
"customers": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/GetAccountResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"GetAccountResponse": {
|
|
||||||
"properties": {
|
|
||||||
"accountId": {
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"balance": {
|
"title": {
|
||||||
"type": "number"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Name": {
|
"Name": {
|
||||||
"required": [ "firstName", "lastName" ],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"firstName": {
|
"firstName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -297,40 +406,83 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ToAccountInfo":{
|
"GetAccountResponse": {
|
||||||
"required": [ "id", "owner" ],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"accountId": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"balance": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreateAccountRequest": {
|
||||||
|
"properties": {
|
||||||
|
"customerId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"initialBalance": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double"
|
||||||
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
"owner": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Address": {
|
"CustomersQueryResponse": {
|
||||||
"required": [ "street1", "city", "state", "zipCode" ],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"street1": {
|
"customers": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/QuerySideCustomer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreateMoneyTransferRequest": {
|
||||||
|
"properties": {
|
||||||
|
"amount": {
|
||||||
|
"type": "number",
|
||||||
|
"format": "double"
|
||||||
|
},
|
||||||
|
"fromAccountId": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"street2": {
|
"toAccountId": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CustomerInfo": {
|
||||||
|
"properties": {
|
||||||
|
"address": {
|
||||||
|
"$ref": "#/definitions/Address"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"city": {
|
"name": {
|
||||||
|
"$ref": "#/definitions/Name"
|
||||||
|
},
|
||||||
|
"phoneNumber": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"state": {
|
"ssn": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CustomerResponse": {
|
||||||
|
"properties": {
|
||||||
|
"customerInfo": {
|
||||||
|
"$ref": "#/definitions/CustomerInfo"
|
||||||
},
|
},
|
||||||
"zipCode": {
|
"id": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user