This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[docker] | |
[docker.dockerConfig] | |
enable = true | |
name = "bookstore" | |
registry = 'hasuniea' | |
tag = 'v1' | |
#buildImage = '' | |
#dockerHost = '' | |
#dockerCertPath = '' | |
#baseImage = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[docker] | |
[docker.dockerConfig] | |
enable = true | |
name = "bookstore" | |
registry = 'hasuniea' | |
tag = 'v1' | |
#buildImage = '' | |
#dockerHost = '' | |
#dockerCertPath = '' | |
#baseImage = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[docker] | |
[docker.dockerConfig] | |
enable = true | |
name = "bookstore" | |
registry = 'hasuniea' | |
tag = 'v1' | |
#buildImage = '' | |
#dockerHost = '' | |
#dockerCertPath = '' | |
#baseImage = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.0" | |
info: | |
version: 1.0.0 | |
title: BookStore | |
license: | |
name: MIT | |
servers: | |
- url: http://bookstore.io/v1 | |
x-wso2-basePath: /bookstore/v1 | |
x-wso2-production-endpoints: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina/http; | |
import ballerina/log; | |
import ballerina/io; | |
import ballerinax/docker; | |
@docker:Expose{} | |
listener http:Listener storeEP = new(8000, config = { | |
secureSocket: { | |
keyStore: { | |
path: "${ballerina.home}/bre/security/ballerinaKeystore.p12", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina/io; | |
import ballerina/http; | |
import ballerina/config; | |
string USER_AGENT = "User-Agent"; | |
public function validateRequest (http:Caller caller, http:Request req) { | |
string contentType= req.getHeader("Content-Type"); | |
json value = {}; | |
if !(contentType.equalsIgnoreCase("application/json")) { | |
var payload = req.getXmlPayload(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tree bookstore/ | |
bookstore/ | |
├── api_definitions | |
├── conf | |
│ └── deployment-config.toml | |
├── extensions | |
│ ├── extension_filter.bal | |
│ ├── startup_extension.bal | |
│ └── token_revocation_extension.bal | |
├── interceptors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: CoffeeBarAPI | |
description: | | |
This is a RESTFul API for Coffe Bar online store. | |
contact: | |
name: Hasunie | |
url: http://www.coffeebar.com | |
email: architecture@coffeebar.com | |
license: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="MasterDataFaultTemplate"> | |
<parameter name="fault_code"/> | |
<parameter name="fault_message"/> | |
<sequence> | |
<log category="ERROR" level="custom"> | |
<property expression="$func:fault_code" name="fault_code"/> | |
<property expression="$func:fault_message" name="fault_message"/> | |
</log> | |
</sequence> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="MasterDataFaultTemplate"> | |
<parameter name="fault_code"/> | |
<parameter name="fault_message"/> | |
<sequence> | |
<log category="ERROR" level="custom"> | |
<property expression="$func:fault_code" name="fault_code"/> | |
<property expression="$func:fault_message" name="fault_message"/> | |
</log> | |
</sequence> | |
</template> |
NewerOlder