java - Swagger is showing _ebean_intercept with everymodel in my play application -


i integrating swagger play application. works fine. ( play 2.2 + swagger 1.3.3 )

although every model adds field need hide

classification {     id (integer, optional),     type (string, optional),     shortcode (string, optional),     active (boolean, optional),     **_ebean_intercept (entitybeanintercept, optional)** } 

i created custom converter in scala ( app written in java way )

class ignoreconverter extends swaggerschemaconverter {     override def skippedclasses: set[string] =    set("com.avaje.ebean.bean.entitybeanintercept")     override def ignoredclasses: set[string] =  set("com.avaje.ebean.bean.entitybeanintercept")     override def ignoredpackages: set[string] = set("com.avaje.ebean") } 

i adding converter when play app loaded via globals.java

@override public void onstart(application application) {     logger.info("registering custom converter");     //hidemodelconverter converter = new hidemodelconverter();     ignoreconverter converter = new ignoreconverter();      modelconverters.addconverter(converter, true); } 

still no luck.

can give me ideas should ?

how can hide fields, classes, packages swagger's introspection ? why swagger ignoring converter ?

thanks help

i've been having same problem. think comes swagger module being loaded before onstart() has chance run. , if change something, application reloads , works fine.

i fixed on end changing loading onstart beforestart:

@override public void beforestart(application app) {     logger.info("registering custom converter");     modelconverters.addconverter(new ignoreconverter(), true); } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -