-
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All class decorated with JsonProperty generate a JsonSchema. This JsonSchema can be used with validators and swagger.
- Loading branch information
Showing
45 changed files
with
1,531 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
/** | ||
* @module common/core | ||
*/ | ||
import {descriptorOf} from "../utils"; | ||
|
||
/** */ | ||
|
||
export function Configurable(value: boolean = true): Function { | ||
return (target: any, propertyKey: string, descriptor: PropertyDescriptor = {writable: true, enumerable: true}) => { | ||
return (target: any, propertyKey: string) => { | ||
const descriptor = descriptorOf(target, propertyKey) || {writable: true, enumerable: true}; | ||
descriptor.configurable = value; | ||
return descriptor; | ||
Object.defineProperty(target && target.prototype || target, propertyKey, descriptor); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/** | ||
* @module common/core | ||
*/ | ||
import {descriptorOf} from "../utils"; | ||
|
||
/** */ | ||
|
||
export function Enumerable(value: boolean = true): Function { | ||
return (target: any, propertyKey: string, descriptor: PropertyDescriptor = { | ||
writable: true, | ||
configurable: true | ||
}) => { | ||
return (target: any, propertyKey: string) => { | ||
const descriptor = descriptorOf(target, propertyKey) || {writable: true, configurable: true}; | ||
descriptor.enumerable = value; | ||
return descriptor; | ||
Object.defineProperty(target && target.prototype || target, propertyKey, descriptor); | ||
}; | ||
} | ||
|
Oops, something went wrong.