Skip to content

Instantly share code, notes, and snippets.

View Rajmohan's full-sized avatar
🎯
Focusing

rajmohan krishnamurthy Rajmohan

🎯
Focusing
View GitHub Profile
@Rajmohan
Rajmohan / petstore-vendor-ext-mime-type-in-post.json
Last active October 4, 2016 03:28
Petstore with vendor-ext-mime-type in POST
{
"swagger": "2.0",
"info": {
"description": "minimal petstore sample to illustrate issue with post using vendor-extension mime-types",
"version": "1.0.0",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io"
},
<macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmashup.org/schemas/v1.0/EMML/../schemas/EMMLPrestoSpec.xsd"
xmlns="http://www.openmashup.org/schemas/v1.0/EMML"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro"
xmlns:fn="java:org.oma.emml.utils.EMMLFunctions"
domain="Salesforce">
<macro name="Login" xmlns="http://www.openmashup.org/schemas/v1.0/EMML"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
{"geonames":[{"fcodeName":"capital of a political entity","toponymName":"Mexico City","countrycode":"MX","fcl":"P","fclName":"city, village,...","name":"Mexiko-Stadt","wikipedia":"en.wikipedia.org/wiki/Mexico_City","lng":-99.12766456604,"fcode":"PPLC","geonameId":3530597,"lat":19.428472427036,"population":12294193},{"fcodeName":"capital of a political entity","toponymName":"Manila","countrycode":"PH","fcl":"P","fclName":"city, village,...","name":"Manila","wikipedia":"en.wikipedia.org/wiki/Manila","lng":120.9822,"fcode":"PPLC","geonameId":1701668,"lat":14.6042,"population":10444527},{"fcodeName":"capital of a political entity","toponymName":"Dhaka","countrycode":"BD","fcl":"P","fclName":"city, village,...","name":"Dhaka","wikipedia":"en.wikipedia.org/wiki/Dhaka","lng":90.40743827819824,"fcode":"PPLC","geonameId":1185241,"lat":23.710395616597037,"population":10356500},{"fcodeName":"capital of a political entity","toponymName":"Seoul","countrycode":"KR","fcl":"P","fclName":"city, village,...","name":"Seoul","w
<mashup xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.openmashup.org/schemas/v1.0/EMML'
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
name='CacheLoadStore'>
<output name='result' type='document' />
<variable name="cachedMembers" type="document" />
<?xml version="1.0" encoding="UTF-8"?>
<!-- This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
See http://creativecommons.org/licenses/by-sa/3.0/us for the full text. -->
<mashup xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.openmashup.org/schemas/v1.0/EMML'
xmlns:macro = "http://www.openmashup.org/schemas/v1.0/EMMLMacro"
name='LegislatorQueries'>
<input name="qry" type="string" default="1"/>
public static class RowNumberAFunc extends PlainAnalyticFunction<Integer> {
@Override
public void initialize(FunctionContext<Integer> fnCtx) {
fnCtx.setResult(Integer.valueOf(0));
}
@Override
public void map(FunctionContext<Integer> fnCtx, Tuple current, List<Tuple> window) {
fnCtx.setResult( fnCtx.getResult() + 1 );
public static class MyNameOrdinal extends PlainAnalyticFunction<Integer> {
@Override
public void initialize(FunctionContext<Integer> fnCtx) {
fnCtx.putInterimValue("names", new ArrayList());
}
@Override
public void map(FunctionContext<Integer> fnCtx, Tuple current, List<Tuple> window) throws Exception {
<mashup xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.openmashup.org/schemas/v1.0/EMML'
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:ns="http://purl.org/rss/1.0/"
name='NuclearPlantStats'>
<emml-meta name="author">Raj Krishnamurthy(raj@jackbe.com)</emml-meta>
<!-- This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
See http://creativecommons.org/licenses/by-sa/3.0/us for the full text. -->
<mashup xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.openmashup.org/schemas/v1.0/EMML'
xmlns:macro = "http://www.openmashup.org/schemas/v1.0/EMMLMacro"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ns="http://purl.org/rss/1.0/"
name='LegislatorQueries'>
<mashup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmashup.org/schemas/v1.0/EMML/../schemas/EMMLPrestoSpec.xsd"
xmlns="http://www.openmashup.org/schemas/v1.0/EMML"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
name="DynamicMashup">
<operation name="getData">
<output name="dynamicResult" type="document"/>
<variables>