Hello,
I need to add vendor extensions to the model classes' vars.
Like for example: In the generated JSON data I see there is an
vendorExtensions array for each vars defined for the model. I am not sure
how to add them using Swagger annotation.
"model" : {
"name" : "RequestObject",
"classname" : "RequestObject",
"description" : "Creates an Object.",
.........................................
"unescapedDescription" : "Creates an Object.",
"vars" : [ {
"baseName" : "objectId",
"getter" : "getObjectId",
"setter" : "setObjectId",
"description" : "The identifier of the object",
"datatype" : "string",
"datatypeWithEnum" : "string",
"name" : "ObjectId",
"defaultValue" : "null",
"defaultValueWithParam" : " = data.objectId;",
"baseType" : "string",
"unescapedDescription" : "The identifier of the Object",
"example" : "null",
"jsonSchema" : "{\r\n \"type\" : \"string\",\r\n \"description\"
: \"The identifier of the Object.\"\r\n}",
"hasMore" : true,
"required" : true,
"isPrimitiveType" : true,
"isNotContainer" : true,
"isString" : true,
"isEnum" : false,
* "vendorExtensions" : { },*
"exampleAttribute" : "\"string\""
}, {
If I do the following, I am getting an error saying the extension cannot be
resolved.
@io.swagger.annotations.ApiModelProperty(required = true, value = "The
identifier of the Object", extension = @Extension(properties =
@ExtensionProperty(name="example", value = "object.ref")))
public String objectId;
How can I add vendorextensions then? Please help
Thanks
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.