Skip to content

Instantly share code, notes, and snippets.

@russellhaering
Created June 8, 2011 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russellhaering/1014935 to your computer and use it in GitHub Desktop.
Save russellhaering/1014935 to your computer and use it in GitHub Desktop.
Cast Swiz Def Changes
// New style
/**
* @inheritdoc
*/
SigningRequest.prototype.getSerializerDef = function() {
return {
'name': {
src: 'name',
type: 'string'
},
'csr': {
src: 'getRequestText',
type: 'string'
},
'cert': {
src: 'getCertificateText',
type: 'string'
}
};
};
// Previous style
/**
* @inheritdoc
*/
SigningRequest.prototype.getSerializerDef = function() {
return [
['name', {
src: 'name',
type: 'string'
}],
['csr', {
src: 'getRequestText',
type: 'string'
}],
['cert', {
src: 'getCertificateText',
type: 'string'
}]
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment