Skip to content

Instantly share code, notes, and snippets.

@caoilte
caoilte / jaxb-in-scala-1_01.scala
Last active August 29, 2015 14:06
Bending JAXB to the will of Scala [1/2]
case class EntryType(entrytypeoption: Seq[scalaxb.DataRecord[Any]] = Nil,
attributes: Map[String, scalaxb.DataRecord[Any]]) extends FeedTypeOption
case class EntryType(entrytypeoption: Seq[scalaxb.DataRecord[Any]] = Nil,
xmlbase: Option[java.net.URI] = None,
xmllang: Option[String] = None,
attributes: Map[String, scalaxb.DataRecord[Any]]) extends FeedTypeOption
@caoilte
caoilte / gist:5241423
Created March 25, 2013 22:29
When I compile and run https://github.com/wordnik/swagger-core/tree/master/samples/scala-scalatra/ and look at the API doc URI for Pet http://localhost:8080/api-docs/pet I get
{
resourcePath: "/pet",
listingPath: "/api-docs/pet",
description: "Pet API",
apis: [
{
path: "/pet/",
description: "",
secured: false,
operations: [
@caoilte
caoilte / gist:2781601
Created May 24, 2012 13:41
Stubble: Unit Test
describe("Build Packager", function(){
var Stubble, mockConfig, realpathSyncMock, writeFileMock, fsMock, writePackageCallback, mapAllFilesSpy,
folderMock, zipAddFilesMock, zipMock, stub, packager, DIRECTORY_TO_ZIP;
beforeEach(function() {
Stubble = require('stubble'),
mockConfig = {
commandArgs: {
product: "mobile"
}