Directive - Add Properties
I'm currently trying to generate the C-Sharp SDK but need to add a property to our Swagger. Is there a way to do this with using directives? I have looked over plenty of documentation but can only find operations related to modifying or removing properties.
Example:
The line with the red arrow does not exist in the swagger and I need to add it.

Thank you for any help!
Hey @AndrewCS149 Something like that?
directive:
from: swagger-document
where: "$.definitions.Foo.properties"
transform: |
$.myProp = {...}
Hey @timotheeguerin. Thanks for the response. So in my case, would it look similar to this? I can't seem to pin down the exact syntax
directive:
- from: swagger.json
where: $definitions.AssignmentReportProperties.properties
transform: |
$.format = duration
Oh sorry thought you meant an full openapi3 property. If you just want to update a json property that looks about good expect duration must be in quotes "duration".
The content of transform is just Javascript code.
Your directive should be
- from: swagger.json
where: $definitions.AssignmentReportProperties.properties.duration
transform: |
$.format = "duration"
heck yeah that worked @timotheeguerin! Thanks so much!
np