
Questions: 19,736 //
Answers: 43,524 //
Contributing Members: 14,735
Jul 05, 2017 at 04:09 AM, sairam2323ece answered with:
We can make description property as mandatory by setting required filed to true.
types:
Person:
type: object
properties:
name: string
age:
type: number
required: true
description:
required: true
We can't make description tag itself mandatory as RAML defines it as optional node. The only mandatory tag among possible root elements of RAML is 'title'.
Jul 05, 2017 at 04:54 AM, patninad2 answered with:
Hi Nanda,
Good question. I don't think it is possible to make in mandatory in RAML itself as it is constrained by the RAML spec. But you can try out Code quality tool like RAMLLINT: https://www.npmjs.com/package/ramllint. It provides some level of static code analysis on the RAML quality.
Having said that, it's possible that the rule you are looking for is not there, but you can always contribute.
Jul 05, 2017 at 05:23 AM, nandabalakrishnan answered with:
Hi Guys, Thanks for replying. Then what i am thinking is that i need to enforce the developer to provide the description for all resources ,so that we may have consistent data in developer portal.
Jul 16, 2017 at 01:45 AM, giridharmp answered with:
The RAML spec defines the description property for a resource as optional. So, your requirement is something to be achieved through code analysis tooling.