File tree Expand file tree Collapse file tree
src/main/kotlin/io/openapiprocessor/intellij Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import java.net.HttpURLConnection
1414
1515const val GITHUB_PREFIX = " raw.githubusercontent.com/openapi-processor/openapi-processor/master/"
1616
17+ @Suppress(" UnstableApiUsage" )
1718class TypeMappingSchemaProvider : ContentAwareJsonSchemaFileProvider {
1819
1920 override fun getSchemaFile (file : PsiFile ): VirtualFile ? {
@@ -39,15 +40,15 @@ class TypeMappingSchemaProvider: ContentAwareJsonSchemaFileProvider {
3940 return HttpsFileSystem .getHttpsInstance().findFileByPath(mergedUrl)
4041 }
4142
42- // if there is no merged version try the original json schema
43+ // if there is no merged version, try the original json schema
4344 return HttpsFileSystem .getHttpsInstance().findFileByPath(
4445 " ${GITHUB_PREFIX } public/schemas/mapping/$type -$version .json" )
4546 }
4647
4748 private fun exists (url : String ): Boolean {
4849 try {
4950 val connection = HttpConnectionUtils .openHttpConnection(" https://${url} " )
50- connection.setRequestMethod( " HEAD" )
51+ connection.requestMethod = " HEAD"
5152 return connection.responseCode == HttpURLConnection .HTTP_OK
5253 } catch (_: Exception ) {
5354 return false
You can’t perform that action at this time.
0 commit comments