Skip to content

Instantly share code, notes, and snippets.

@yhaskell
Last active September 28, 2015 19:58
Show Gist options
  • Save yhaskell/cce6d4f4a5f843259fca to your computer and use it in GitHub Desktop.
Save yhaskell/cce6d4f4a5f843259fca to your computer and use it in GitHub Desktop.
#%RAML 0.8
title: New API
version: v1
baseUri: http://api.samplehost.com
/helloWorld:
get:
protocols:
- HTTP
- HTTPS
responses:
200:
body:
application/json:
example: |
{
"message" : "Hello World"
}
#%RAML 0.8
title: New API
version: v1
baseUri: http://api.samplehost.com
/helloWorld:
get:
protocols:
- HTTP
- HTTPS
- HUE
responses:
200:
body:
application/json:
example: |
{
"message" : "Hello World"
}
}
}
}
node.attributes(name).forEach(attr => attr.remove());
['HTTP', 'HTTPS', 'HUE'].forEach(val => node.attrOrCreate(name).addValue(val));
console.log(node.attributes(name).length) // 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment