Forum Discussion
richie
Community Hero
Hi venkireddy1991 ,
I appreciate this doesnt help with your problem...as you already state ReadyAPI! performs a wellformed check when you load in a file and each time the file is parsed, but i just wanted to mention the detail below as this might steer you in another direction.
The checks you mention in your last appear to a mix of what id consider as 'validation' along with a single 'wellformed' check.
I appreciate you want to ensure the developers code adheres to the rules defined in your openAPI .yaml, but whether this is actually necessary or not depends on how the developers are creating the apis themselves.
What i mean by this is there are tools out there that support the creation and update of the openAPI (.yaml) files. What i mean is there are tools such as Smartbears Swagger that allow the user to create your .yaml file and this .yaml file is then used by developers to create the code for the apis themselves (at least i think this is the way it works), so the .yaml is a framework and the apis defined in the .yaml can be generated dynamically from the .yaml. if this is the case (and i think it is from the reading i've just done) then checking the developed apis conform to the rules in the .yaml is moot because the .yaml was used to generate the apis themselves.
I hope ive been clear
Cheers
Rich
I appreciate this doesnt help with your problem...as you already state ReadyAPI! performs a wellformed check when you load in a file and each time the file is parsed, but i just wanted to mention the detail below as this might steer you in another direction.
The checks you mention in your last appear to a mix of what id consider as 'validation' along with a single 'wellformed' check.
I appreciate you want to ensure the developers code adheres to the rules defined in your openAPI .yaml, but whether this is actually necessary or not depends on how the developers are creating the apis themselves.
What i mean by this is there are tools out there that support the creation and update of the openAPI (.yaml) files. What i mean is there are tools such as Smartbears Swagger that allow the user to create your .yaml file and this .yaml file is then used by developers to create the code for the apis themselves (at least i think this is the way it works), so the .yaml is a framework and the apis defined in the .yaml can be generated dynamically from the .yaml. if this is the case (and i think it is from the reading i've just done) then checking the developed apis conform to the rules in the .yaml is moot because the .yaml was used to generate the apis themselves.
I hope ive been clear
Cheers
Rich
venkireddy1991
5 years agoOccasional Contributor
Team,
How can add swagger compliance assertion using script??
- HimanshuTayal5 years agoCommunity Hero
- venkireddy19915 years agoOccasional Contributor
Thanks for your reply....
But Would like to know how to add in Script..using groovy Script...
- nmrao5 years agoChampion Level 3Are you creating the ReadyAPI project automatically? Or using the tool? If project is crated using the tool then it is rather simple to create the desired assertion by hand as it is one time job.
Creating automatic assertion would make sense when project itself is created automatically.
What's your case?- sonya_m4 years agoSmartBear Alumni (Retired)
Thank you for helping everyone!
venkireddy1991 Please share more details about your use case as nmrao is asking and the Community will try to help you🙂