private String buildJsonSchemaRefForModel ( Class < ? > modelClass , File artifactFile ) { try { ZipFile zipFile = new ZipFile ( artifactFile ) ; String halDocsDomainPath = getHalDocsDomainPath ( zipFile ) ; if ( halDocsDomainPath != null && hasJsonSchemaFile ( zipFile , modelClass ) ) { return JsonSchemaBundleTracker . SCHEMA_URI_PREFIX + halDocsDomainPath + "/" + modelClass . getName ( ) + ".json" ; } return null ; } catch ( IOException ex ) { throw new RuntimeException ( "Unable to read artifact file: " + artifactFile . getAbsolutePath ( ) + "\n" + ex . getMessage ( ) , ex ) ; } }
Check if JAR file has a doc domain path and corresponding schema file and then builds a documenation path for it .