File tree Expand file tree Collapse file tree
jooby/src/main/java/io/jooby Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,9 +180,11 @@ public OpenAPIModule() {
180180 public void install (@ NonNull Jooby application ) throws Exception {
181181 String dir = Optional .ofNullable (application .getBasePackage ()).orElse ("/" ).replace ("." , "/" );
182182
183- String appname = application .getName ().replace ("Jooby" , "openapi" ).replace ("Kooby" , "openapi" );
183+ String appName = application .getClass ().getSimpleName ()
184+ .replace ("Jooby" , "openapi" )
185+ .replace ("Kooby" , "openapi" );
184186 for (Format ext : format ) {
185- String filename = String .format ("/%s.%s" , appname , ext .name ().toLowerCase ());
187+ String filename = String .format ("/%s.%s" , appName , ext .name ().toLowerCase ());
186188 String openAPIFileLocation = Router .normalizePath (dir ) + filename ;
187189 application .assets (
188190 fullPath (openAPIPath , "/openapi." + ext .name ().toLowerCase ()), openAPIFileLocation );
You can’t perform that action at this time.
0 commit comments