Tinkoff / invest-openapi-java-sdk

Apache License 2.0
167 stars 46 forks source link

https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml отдает ошибку 404 #147

Closed feezboom closed 2 years ago

feezboom commented 2 years ago
[INFO] 
[INFO] --- swagger-codegen-maven-plugin:3.0.29:generate (default) @ openapi-java-sdk-core ---
[ERROR] unable to read
java.io.FileNotFoundException: https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:423)
    at sun.net.www.protocol.http.HttpURLConnection$10.run (HttpURLConnection.java:1947)
    at sun.net.www.protocol.http.HttpURLConnection$10.run (HttpURLConnection.java:1942)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException (HttpURLConnection.java:1941)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1511)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1495)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream (HttpsURLConnectionImpl.java:268)
    at io.swagger.v3.parser.util.RemoteUrl.urlToString (RemoteUrl.java:155)
    at io.swagger.codegen.v3.config.CodegenConfigurator.loadSpecContent (CodegenConfigurator.java:470)
    at io.swagger.codegen.v3.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:587)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute_ (CodeGenMojo.java:532)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute (CodeGenMojo.java:319)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: java.io.FileNotFoundException: https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1893)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1495)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField (HttpURLConnection.java:3058)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField (HttpsURLConnectionImpl.java:305)
    at io.swagger.v3.parser.util.RemoteUrl.urlToString (RemoteUrl.java:152)
    at io.swagger.codegen.v3.config.CodegenConfigurator.loadSpecContent (CodegenConfigurator.java:470)
    at io.swagger.codegen.v3.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:587)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute_ (CodeGenMojo.java:532)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute (CodeGenMojo.java:319)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
[ERROR] Unable to read URL: https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml
java.io.FileNotFoundException: https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:423)
    at sun.net.www.protocol.http.HttpURLConnection$10.run (HttpURLConnection.java:1947)
    at sun.net.www.protocol.http.HttpURLConnection$10.run (HttpURLConnection.java:1942)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException (HttpURLConnection.java:1941)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1511)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1495)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream (HttpsURLConnectionImpl.java:268)
    at io.swagger.v3.parser.util.RemoteUrl.urlToString (RemoteUrl.java:155)
    at io.swagger.codegen.v3.config.CodegenConfigurator.loadSpecContent (CodegenConfigurator.java:470)
    at io.swagger.codegen.v3.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:587)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute_ (CodeGenMojo.java:532)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute (CodeGenMojo.java:319)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: java.io.FileNotFoundException: https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1893)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1495)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField (HttpURLConnection.java:3058)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField (HttpsURLConnectionImpl.java:305)
    at io.swagger.v3.parser.util.RemoteUrl.urlToString (RemoteUrl.java:152)
    at io.swagger.codegen.v3.config.CodegenConfigurator.loadSpecContent (CodegenConfigurator.java:470)
    at io.swagger.codegen.v3.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:587)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute_ (CodeGenMojo.java:532)
    at io.swagger.codegen.v3.maven.plugin.CodeGenMojo.execute (CodeGenMojo.java:319)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Daolot commented 2 years ago

@feezboom Possible WA: 1) Download https://github.com/Tinkoff/invest-openapi/blob/master/src/docs/swagger-ui/swagger.yaml и разместить где-нибудь например в invest-openapi-java-sdk\core\src\swagger.yaml 2) invest-openapi-java-sdk\core\pom.xml - заменить inputSpec путь на скачанный файл 3) mvn package 4) profit

zlumyo commented 2 years ago

Готовится к выпуску API 2.0 В рамках работ закрыт старый сваггер. Можно воспользоваться советом @Daolot для отображения старого сваггера локально.

Также хочется отметить, что это проблема уровня API, а не SDK. С такими вопросам обращайтесь пожалуйста в соответствующий репозиторий.

ghost commented 2 years ago

@feezboom Possible WA:

  1. Download https://github.com/Tinkoff/invest-openapi/blob/master/src/docs/swagger-ui/swagger.yaml и разместить где-нибудь например в invest-openapi-java-sdk\core\src\swagger.yaml
  2. invest-openapi-java-sdk\core\pom.xml - заменить inputSpec путь на скачанный файл
  3. mvn package
  4. profit

Легче inputSpec поменять на прямую ссылку к raw файлу в гит: https://raw.githubusercontent.com/Tinkoff/invest-openapi/master/src/docs/swagger-ui/swagger.yaml