vendredi 9 juin 2017

Get swagger data type from the corresponding Java Type

I'm using Java Reflection API to get field names and their respective field types from Class objects.

Now I want to map those field types to their corresponding swagger data type.

ie.:

String getSwaggerTypeFromJavaType(..) {
   // return swagger type as string
}


I'm working on a project on which Swagger Spec is created manually as a json String by iterating through all the resource classes. Annotating every resource is not an option either. It would be useful if there's an existing library that I could use to do the type conversion.





Aucun commentaire:

Enregistrer un commentaire