Method to get id

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-10-29 10:34:58 -03:00
parent b21cd3d41a
commit 9996f5a84c
1 changed files with 31 additions and 0 deletions

View File

@ -37,6 +37,33 @@ function Spec1(_caller) {
* Used to inject compatibility methods or attributes
*/
this.caller = _caller;
// dataschema attribute
this.caller.prototype.dataschema = function(dataschema){
this.spec.dataschema(dataschema);
return this;
}
this.caller.prototype.getDataschema = function() {
return this.spec.getDataschema();
}
// datacontenttype attribute
this.caller.prototype.dataContentType = function(contentType){
this.spec.dataContentType(contentType);
return this;
};
this.caller.prototype.getDataContentType = function(){
return this.spec.getDataContentType();
};
// subject attribute
this.caller.prototype.subject = function(_subject){
this.spec.subject(_subject);
return this;
};
this.caller.prototype.getSubject = function(){
return this.spec.getSubject();
};
}
Spec1.prototype.id = function(_id){
@ -44,4 +71,8 @@ Spec1.prototype.id = function(_id){
return this;
};
Spec1.prototype.getId => {
return this.payload["id"];
}
module.exports = Spec1;