Skip to content

Instantly share code, notes, and snippets.

View bhatikuldeep's full-sized avatar

Kuldeep Bhati bhatikuldeep

View GitHub Profile
@bhatikuldeep
bhatikuldeep / .spectral.yaml
Last active January 5, 2022 15:23
.spectral.yaml
extends:
- "spectral:oas"
rules:
operation-tag-defined: true
operation-success-response: true
oas3-server-trailing-slash: true
#Path must not end with Slash.
path-keys-no-trailing-slash:
message: "Path must not end with slash."
@bhatikuldeep
bhatikuldeep / bitbucket-pipelines.yml
Last active March 10, 2021 22:24
mulesoft cloudhub - deployment - bitbucket pipeline configuration
# Template maven-build
image: atlassian/default-image:2
pipelines:
default:
- step:
name: Git Security Scan
caches:
- maven
@bhatikuldeep
bhatikuldeep / pom.xml
Last active March 10, 2021 01:07
mulesoft-deployment-sample-pom.xml
...
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<cloudHubDeployment>
<uri>https://anypoint.mulesoft.com</uri>
<muleVersion>${app.runtime}</muleVersion>
@bhatikuldeep
bhatikuldeep / project-structure.txt
Last active March 10, 2021 01:02
mulesoft-deployment-project-structure
.
├── bitbucket-pipelines.yml
├── mule-artifact.json
├── pom.xml
└── src
├── main
│   ├── java
│   ├── mule
│   │   └── cloud-hub-deploy.xml
│   └── resources
@bhatikuldeep
bhatikuldeep / setMessageLogging.xml
Created February 26, 2019 13:52
Apigee Edge - Extensive logging
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="setMessageLogging">
<DisplayName>setMessageLogging</DisplayName>
<Syslog>
<Message variablePrefix="%" variableSuffix="#">[customerToken@41058 tag="%organization.name#.%apiproxy.name#.%environment.name#"] {
"apiproxy": {
"name": "%apiproxy.name#",
"revision": "%apiproxy.revision#"
},
"application": {
@bhatikuldeep
bhatikuldeep / logstash-sample.conf
Created February 26, 2019 08:32
Sample Logstash Configuration File - to log messages from Apigee Edge to ELK stack
input {
tcp {
port => 5044
type => syslog
}
}
filter {
mutate {
gsub => [
"message", "[\u0000]", ""
@bhatikuldeep
bhatikuldeep / setMessageLogging.xml
Created February 26, 2019 08:30
Message Logging Policy Configuration - Apigee Edge + ELK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="setMessageLogging">
<DisplayName>setMessageLogging</DisplayName>
<Syslog>
<!-- add logstash IP or host withhout HTTP scheme-->
<Host>{LOGSTASH_IP_OR_HOST}</Host>
<!-- make sure the JSON message is whitespaced free, workaround to parse JSON properly at logstash side-->
<Message variablePrefix="%" variableSuffix="#">{"systemTimeStamp":"%system.time.year#-%system.time.month#-%system.time.day#T%system.time.hour#:%system.time.minute#:%system.time.second#.%system.time.millisecond#Z","messageId":"%messageid#","statusCode":"%message.status.code#","contentType":"%request.header.Content-Type#","contentLength":"%client.received.content.length#","uri":"%request.uri#","path":"%request.path#","verb":"%request.verb#","meta":{"organization":"%organization.name#","product":"%apigee.apiproduct.name#","application":"%apigee.developer.app.name#","env ":"%enviro