There is a mechanism—you should create a filter to read the swagger definition before returning it to the caller. At that point, you can inspect every part of the definition, and replace descriptions with values from your property files.
See here for an example: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java#L35 <https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java#L35> In this case, we modify the Swagger document to set the allowable values in an enum field. You can read the values from the Swagger doc and mutate it as you see fit. I believe this object is cached, so you can do expensive stuff along the way. > On Jul 27, 2016, at 6:27 AM, arpit sharma <[email protected]> wrote: > > Hi > > Consider following code snippet in a java class A.java > > @GET > @Path("/end_point") > @ApiOperation(value = "This resource does blah blah", > notes = "this is the detailed description", > nickname ="convert a to b") > > > I want to change complete java class to something like this > > @GET > @Path("/end_point") > @ApiOperation(value = "properties.A.ApiOperation.value", > notes = "properties.currentjavaclass.ApiOperation.notes", > nickname ="properties.A.ApiOperation.nickname") > > > Basically i want to > > 1.Generate a property file with all the swagger attributes as defined in > format above . > 2.change the text in any swagger annotation value to a property defined in > A_propertyFile.properties > 3.At Runtime read the actual value from property file after generting swagger > json. > > Do we have any standard or recommended frameworks to take care of this kind > of work. > > > Regards > Arpit > > > -- > 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] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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.
