on 2021 Jan 02 1:36 PM
Hi experts,
I am trying to add some annotations to my entity properties:
@mandatory provider: String (60)
@assert.notNull: false
@description: 'Infrastructure provider';
I would like to add now an annotation for given a property example. Any idea how this can be done using annotation below?
@Core.Example
Many thanks!
Request clarification before answering.
Hi Cristian, how are you doing?
Please try the following:
@Core.Example : {
$Type : 'Core.PrimitiveExampleValue',
Value : '<your example here>',
}
You can also add a complex type if you need as follows:
@Core.Example: {
$Type: 'Core.ComplexExampleValue',
Value: {
myProperty: '<your example here for myProperty>'
}
}
Regards,
Evandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might also check the ExampleValue definition in the OData Standard Vocabulary.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.